Minor tweaks
parent
75456f99de
commit
4d7acd57e7
|
@ -1,8 +1,8 @@
|
|||
! Copyright (C) 2004, 2006 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
IN: compiler
|
||||
USING: errors hashtables inference io kernel math
|
||||
namespaces optimizer prettyprint sequences test words ;
|
||||
USING: errors hashtables inference io kernel math namespaces
|
||||
optimizer prettyprint sequences test threads words ;
|
||||
|
||||
: (compile) ( word -- )
|
||||
dup specialized-def dataflow optimize generate ;
|
||||
|
@ -27,7 +27,7 @@ namespaces optimizer prettyprint sequences test words ;
|
|||
: compile-vocabs ( vocabs -- )
|
||||
[ words ] map concat
|
||||
dup [ f "no-effect" set-word-prop ] each
|
||||
[ try-compile ] each ;
|
||||
[ try-compile yield ] each ;
|
||||
|
||||
: compile-all ( -- ) vocabs compile-vocabs ;
|
||||
|
||||
|
|
|
@ -11,7 +11,9 @@ M: assert summary drop "Assertion failed" ;
|
|||
|
||||
: assert= ( a b -- ) 2dup = [ 2drop ] [ <assert> throw ] if ;
|
||||
|
||||
: print-test ( input output -- ) "--> " write 2array . flush ;
|
||||
: print-test ( input output -- )
|
||||
"----> Quotation: " write .
|
||||
"Expected output: " write . flush ;
|
||||
|
||||
: benchmark ( quot -- gctime runtime )
|
||||
millis >r gc-time >r call gc-time r> - millis r> - ;
|
||||
|
|
Loading…
Reference in New Issue