]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/test/test.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / basis / compiler / test / test.factor
1 ! Copyright (C) 2010 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors arrays compiler.units kernel stack-checker
4 sequences vocabs words tools.test tools.test.private ;
5 IN: compiler.test
6
7 : decompile ( word -- )
8     dup def>> 2array 1array t t modify-code-heap ;
9
10 : recompile-all ( -- )
11     all-words compile ;
12
13 : compile-call ( quot -- )
14     [ dup infer define-temp ] with-compilation-unit execute ;
15
16 << \ compile-call t "no-compile" set-word-prop >>
17
18 : compiler-test ( name -- )
19     "resource:basis/compiler/tests/" ".factor" surround run-test-file ;