2010-01-22 06:39:56 -05:00
|
|
|
! Copyright (C) 2010 Slava Pestov.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2014-12-13 19:10:21 -05:00
|
|
|
USING: accessors arrays compiler.units kernel sequences
|
|
|
|
stack-checker tools.test vocabs words ;
|
2010-01-22 06:39:56 -05:00
|
|
|
IN: compiler.test
|
|
|
|
|
|
|
|
: decompile ( word -- )
|
2010-02-01 08:49:05 -05:00
|
|
|
dup def>> 2array 1array t t modify-code-heap ;
|
2010-01-22 06:39:56 -05:00
|
|
|
|
|
|
|
: recompile-all ( -- )
|
|
|
|
all-words compile ;
|
|
|
|
|
|
|
|
: compile-call ( quot -- )
|
|
|
|
[ dup infer define-temp ] with-compilation-unit execute ;
|
|
|
|
|
2010-01-22 06:40:56 -05:00
|
|
|
<< \ compile-call t "no-compile" set-word-prop >>
|
2010-01-22 06:39:56 -05:00
|
|
|
|
|
|
|
: compiler-test ( name -- )
|
|
|
|
"resource:basis/compiler/tests/" ".factor" surround run-test-file ;
|