factor/core/bootstrap/compiler/compiler.factor

58 lines
1.3 KiB
Factor
Raw Normal View History

2007-10-29 01:12:27 -04:00
USING: compiler cpu.architecture vocabs.loader system sequences
namespaces parser kernel kernel.private classes classes.private
2007-09-20 18:09:08 -04:00
arrays hashtables vectors tuples sbufs inference.dataflow
hashtables.private sequences.private math tuples.private
2007-10-29 01:12:27 -04:00
growable namespaces.private alien.remote-control assocs words
generator command-line vocabs io prettyprint libc ;
2007-09-20 18:09:08 -04:00
"cpu." cpu append require
2007-09-20 18:09:08 -04:00
"-no-stack-traces" cli-args member? [
2007-10-29 01:12:27 -04:00
f compiled-stack-traces? set-global
2007-12-16 15:17:28 -05:00
0 profiler-prologue set-global
] when
2007-09-20 18:09:08 -04:00
! Compile a set of words ahead of our general
! compile-all. This set of words was determined
! semi-empirically using the profiler. It improves
! bootstrap time significantly, because frequenly
! called words which are also quick to compile
! are replaced by compiled definitions as soon as
! possible.
{
roll -roll declare not
2007-09-20 18:09:08 -04:00
tuple-class-eq? array? hashtable? vector?
tuple? sbuf? node? tombstone?
2007-09-20 18:09:08 -04:00
array-capacity array-nth set-array-nth
2007-09-20 18:09:08 -04:00
wrap probe
2007-09-20 18:09:08 -04:00
delegate
2007-09-20 18:09:08 -04:00
underlying
2007-09-20 18:09:08 -04:00
find-pair-next namestack*
2007-09-20 18:09:08 -04:00
bitand bitor bitxor bitnot
} compile
2007-09-20 18:09:08 -04:00
2007-12-16 15:17:28 -05:00
{
+ 1+ 1- 2/ < <= > >= shift min
} compile
2007-09-20 18:09:08 -04:00
{
new nth push pop peek hashcode* = get set
} compile
2007-09-20 18:09:08 -04:00
{
. lines
} compile
{
malloc free memcpy
} compile
2007-09-20 18:09:08 -04:00
[ compile ] recompile-hook set-global