Merge branch 'master' of http://factorcode.org/git/factor into db
commit
6ca02e9b37
|
@ -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
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Slava Pestov
|
|
@ -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 -- )
|
||||
[
|
||||
<dlist> \ graft-queue [
|
||||
over
|
||||
graft notify-queued
|
||||
dip
|
||||
ungraft notify-queued
|
||||
] with-variable
|
||||
] with-string-writer print ;
|
|
@ -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 -- )
|
||||
[
|
||||
<dlist> \ graft-queue set
|
||||
<dlist> \ 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>> ;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ;
|
|||
|
||||
<PRIVATE
|
||||
|
||||
: graft-queue ( -- dlist ) \ graft-queue ui-state ;
|
||||
: graft-queue ( -- dlist )
|
||||
\ graft-queue get [ "UI not running" throw ] unless* ;
|
||||
|
||||
: unqueue-graft ( gadget -- )
|
||||
[ graft-node>> graft-queue delete-node ]
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ;
|
||||
|
||||
\ <browser-gadget> must-infer
|
||||
[ ] [ \ + <browser-gadget> [ ] with-grafted-gadget ] unit-test
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Slava Pestov
|
|
@ -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
|
Loading…
Reference in New Issue