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
|
2007-12-24 21:54:45 -05:00
|
|
|
generator command-line vocabs io prettyprint libc definitions ;
|
|
|
|
IN: bootstrap.compiler
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-10-14 20:38:23 -04:00
|
|
|
"cpu." cpu append require
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-10-14 20:38:23 -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
|
2007-10-14 20:38:23 -04:00
|
|
|
] when
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-12-26 20:21:46 -05:00
|
|
|
! Compile a set of words ahead of the full compile.
|
|
|
|
! 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.
|
2007-10-14 20:38:23 -04:00
|
|
|
{
|
|
|
|
roll -roll declare not
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-10-14 20:38:23 -04:00
|
|
|
tuple-class-eq? array? hashtable? vector?
|
|
|
|
tuple? sbuf? node? tombstone?
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-10-14 20:38:23 -04:00
|
|
|
array-capacity array-nth set-array-nth
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-10-14 20:38:23 -04:00
|
|
|
wrap probe
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-10-14 20:38:23 -04:00
|
|
|
delegate
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-12-16 18:42:56 -05:00
|
|
|
underlying
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-10-14 20:38:23 -04:00
|
|
|
find-pair-next namestack*
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-10-14 20:38:23 -04:00
|
|
|
bitand bitor bitxor bitnot
|
2007-12-26 20:21:46 -05:00
|
|
|
} compile
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-12-16 15:17:28 -05:00
|
|
|
{
|
2007-10-14 20:38:23 -04:00
|
|
|
+ 1+ 1- 2/ < <= > >= shift min
|
2007-12-26 20:21:46 -05:00
|
|
|
} compile
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-12-21 21:18:24 -05:00
|
|
|
{
|
2007-10-14 20:38:23 -04:00
|
|
|
new nth push pop peek hashcode* = get set
|
2007-12-26 20:21:46 -05:00
|
|
|
} compile
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-12-21 21:18:24 -05:00
|
|
|
{
|
2007-10-14 20:38:23 -04:00
|
|
|
. lines
|
2007-12-26 20:21:46 -05:00
|
|
|
} compile
|
2007-10-05 17:54:25 -04:00
|
|
|
|
2007-12-21 21:18:24 -05:00
|
|
|
{
|
2007-10-14 20:38:23 -04:00
|
|
|
malloc free memcpy
|
2007-12-26 20:21:46 -05:00
|
|
|
} compile
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2007-12-26 20:21:46 -05:00
|
|
|
[ recompile ] recompile-hook set-global
|