diff --git a/basis/compiler/tree/debugger/debugger-tests.factor b/basis/compiler/tree/debugger/debugger-tests.factor index 4d1c5c824d..9b4a6da12a 100644 --- a/basis/compiler/tree/debugger/debugger-tests.factor +++ b/basis/compiler/tree/debugger/debugger-tests.factor @@ -1,5 +1,5 @@ IN: compiler.tree.debugger.tests -USING: compiler.tree.debugger tools.test sorting sequences io ; +USING: compiler.tree.debugger tools.test sorting sequences io math.order ; \ optimized. must-infer \ optimizer-report. must-infer diff --git a/basis/tools/test/ui/authors.txt b/basis/tools/test/ui/authors.txt deleted file mode 100755 index 1901f27a24..0000000000 --- a/basis/tools/test/ui/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Slava Pestov diff --git a/basis/tools/test/ui/ui.factor b/basis/tools/test/ui/ui.factor deleted file mode 100644 index c37e7799cb..0000000000 --- a/basis/tools/test/ui/ui.factor +++ /dev/null @@ -1,16 +0,0 @@ -USING: dlists ui.gadgets ui.gadgets.private -kernel ui namespaces io.streams.string io ; -IN: tools.test.ui - -! We can't print to output-stream here because that might be a pane -! stream, and our graft-queue rebinding here would be captured -! by code adding children to the pane... -: with-grafted-gadget ( gadget quot -- ) - [ - \ graft-queue [ - over - graft notify-queued - dip - ungraft notify-queued - ] with-variable - ] with-string-writer print ; diff --git a/basis/ui/gadgets/debug/debug.factor b/basis/ui/gadgets/debug/debug.factor index 076c772f97..f8d496c1fc 100644 --- a/basis/ui/gadgets/debug/debug.factor +++ b/basis/ui/gadgets/debug/debug.factor @@ -2,9 +2,23 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays colors.constants combinators kernel opengl sequences ui ui.baseline-alignment ui.gadgets -ui.gadgets.buttons ui.gadgets.labels ui.pens ui.render ui.text ; +ui.gadgets.buttons ui.gadgets.labels ui.pens ui.render ui.text +ui.gadgets.private dlists namespaces io.streams.string io ; IN: ui.gadgets.debug +! We can't print to output-stream here because that might be a pane +! stream, and our graft-queue rebinding here would be captured +! by code adding children to the pane... +: with-grafted-gadget ( gadget quot -- ) + [ + \ graft-queue set + \ layout-queue set + over + graft notify-queued + dip + ungraft notify-queued + ] with-string-writer print ; inline + TUPLE: baseline-gadget < gadget baseline cap-height ; M: baseline-gadget baseline baseline>> ; diff --git a/basis/ui/gadgets/editors/editors-tests.factor b/basis/ui/gadgets/editors/editors-tests.factor index f8dc5b91c9..bd610ba53b 100644 --- a/basis/ui/gadgets/editors/editors-tests.factor +++ b/basis/ui/gadgets/editors/editors-tests.factor @@ -1,6 +1,6 @@ USING: accessors ui.gadgets.editors tools.test kernel io io.streams.plain definitions namespaces ui.gadgets -ui.gadgets.grids prettyprint documents ui.gestures tools.test.ui +ui.gadgets.grids prettyprint documents ui.gestures ui.gadgets.debug models documents.elements ui.gadgets.scrollers ui.gadgets.line-support sequences ; IN: ui.gadgets.editors.tests diff --git a/basis/ui/gadgets/gadgets.factor b/basis/ui/gadgets/gadgets.factor index a4bedf1ef7..adcfdfb00d 100644 --- a/basis/ui/gadgets/gadgets.factor +++ b/basis/ui/gadgets/gadgets.factor @@ -135,9 +135,7 @@ SYMBOL: ui-notify-flag : forget-pref-dim ( gadget -- ) f >>pref-dim drop ; -: ui-state ( symbol -- value ) get [ "UI not running" throw ] unless* ; - -: layout-queue ( -- queue ) \ layout-queue ui-state ; +: layout-queue ( -- queue ) \ layout-queue get ; : layout-later ( gadget -- ) #! When unit testing gadgets without the UI running, the @@ -216,7 +214,8 @@ M: gadget ungraft* drop ; > graft-queue delete-node ] diff --git a/basis/ui/gadgets/panes/panes-tests.factor b/basis/ui/gadgets/panes/panes-tests.factor index 0c47af0214..0529437a76 100644 --- a/basis/ui/gadgets/panes/panes-tests.factor +++ b/basis/ui/gadgets/panes/panes-tests.factor @@ -1,7 +1,7 @@ USING: alien ui.gadgets.panes ui.gadgets namespaces kernel sequences io io.styles io.streams.string tools.test prettyprint definitions help help.syntax help.markup -help.stylesheet splitting tools.test.ui models math summary +help.stylesheet splitting ui.gadgets.debug models math summary inspector accessors help.topics see ; IN: ui.gadgets.panes.tests diff --git a/basis/ui/gadgets/scrollers/scrollers-tests.factor b/basis/ui/gadgets/scrollers/scrollers-tests.factor index 4e61c9b1ed..d4cdc95daf 100644 --- a/basis/ui/gadgets/scrollers/scrollers-tests.factor +++ b/basis/ui/gadgets/scrollers/scrollers-tests.factor @@ -1,7 +1,7 @@ USING: ui.gadgets ui.gadgets.scrollers namespaces tools.test kernel models models.product models.range ui.gadgets.viewports ui.gadgets.labels ui.gadgets.grids ui.gadgets.sliders math -math.vectors arrays sequences tools.test.ui math.rectangles +math.vectors arrays sequences ui.gadgets.debug math.rectangles accessors ui.gadgets.buttons ui.gadgets.packs ui.gadgets.scrollers.private ; IN: ui.gadgets.scrollers.tests diff --git a/basis/ui/tools/browser/browser-tests.factor b/basis/ui/tools/browser/browser-tests.factor index 7477edbe6a..3757f392c4 100644 --- a/basis/ui/tools/browser/browser-tests.factor +++ b/basis/ui/tools/browser/browser-tests.factor @@ -1,5 +1,5 @@ IN: ui.tools.browser.tests -USING: tools.test tools.test.ui ui.tools.browser math ; +USING: tools.test ui.gadgets.debug ui.tools.browser math ; \ must-infer [ ] [ \ + [ ] with-grafted-gadget ] unit-test diff --git a/basis/ui/tools/listener/listener-tests.factor b/basis/ui/tools/listener/listener-tests.factor index 63df55b71a..986e1270eb 100644 --- a/basis/ui/tools/listener/listener-tests.factor +++ b/basis/ui/tools/listener/listener-tests.factor @@ -1,7 +1,7 @@ USING: continuations documents ui.tools.listener hashtables kernel namespaces parser sequences tools.test ui.commands ui.gadgets ui.gadgets.editors -ui.gadgets.panes vocabs words tools.test.ui slots.private +ui.gadgets.panes vocabs words ui.gadgets.debug slots.private threads arrays generic threads accessors listener math calendar concurrency.promises io ui.tools.common ; IN: ui.tools.listener.tests diff --git a/extra/chicago-talk/authors.txt b/extra/chicago-talk/authors.txt new file mode 100644 index 0000000000..d4f5d6b3ae --- /dev/null +++ b/extra/chicago-talk/authors.txt @@ -0,0 +1 @@ +Slava Pestov \ No newline at end of file diff --git a/extra/chicago-talk/chicago-talk.factor b/extra/chicago-talk/chicago-talk.factor new file mode 100644 index 0000000000..9d42ff13f2 --- /dev/null +++ b/extra/chicago-talk/chicago-talk.factor @@ -0,0 +1,65 @@ +! Copyright (C) 2009 Slava Pestov. +! See http://factorcode.org/license.txt for BSD license. +USING: slides help.markup ; +IN: chicago-talk + +CONSTANT: chicago-slides +{ +{ $slide "factor" + +{ $url "http://factorcode.org" } + +} +{ $slide "goals" + +"high level language" +"expressive and extensible" +"reasonable performance" +"interactive development with arbitrary redefinition" +"standalone app deployment (strip out compiler and REPL)" + +} +{ $slide "challenges" + +"higher-order functions" +"dynamic typing" +"memory allocation" +"float boxing/unboxing" +"integer overflow checks" +"user-defined abstractions" + +} +{ $slide "implementation" + +"VM: 12 kloc of C, library: >100 kloc of Factor" +"generational copying garbage collection, card marking write barrier" +"full continuations, tail calls" +"simple non-optimizing “bootstrap” compiler" +"optimizing compiler" + +} +{ $slide "optimizing compiler" + +"about 12,000 lines of Factor code" +"targets x86-32, x86-64, PowerPC" +"factor code ⇒ high-level SSA ⇒ low-level SSA ⇒ machine code" + +} +{ $slide "high-level optimizer" + +"macro expansion, defunctionalization" +"type and interval inference, sparse conditional constant propagation, method inlining" +"escape analysis and tuple unboxing" + +} +{ $slide "low-level optimizer" + +"alias analysis, value numbering, write barrier elimination" +"linear scan register allocation" + +} +} + +: chicago-talk ( -- ) chicago-slides slides-window ; + +MAIN: chicago-talk \ No newline at end of file