bootstrap.compiler: add -debug-compiler switch which loads compiler but doesn't compile any words

db4
Slava Pestov 2009-08-20 03:48:03 -05:00
parent 9ef8f6c81d
commit a3631f1878
1 changed files with 59 additions and 55 deletions

View File

@ -35,83 +35,87 @@ gc
: compile-unoptimized ( words -- ) : compile-unoptimized ( words -- )
[ optimized? not ] filter compile ; [ optimized? not ] filter compile ;
nl "debug-compiler" get [
"Compiling..." write flush
nl
"Compiling..." write flush
! Compile a set of words ahead of the full compile. ! Compile a set of words ahead of the full compile.
! This set of words was determined semi-empirically ! This set of words was determined semi-empirically
! using the profiler. It improves bootstrap time ! using the profiler. It improves bootstrap time
! significantly, because frequenly called words ! significantly, because frequenly called words
! which are also quick to compile are replaced by ! which are also quick to compile are replaced by
! compiled definitions as soon as possible. ! compiled definitions as soon as possible.
{ {
not ? not ?
2over roll -roll 2over roll -roll
array? hashtable? vector? array? hashtable? vector?
tuple? sbuf? tombstone? tuple? sbuf? tombstone?
curry? compose? callable? curry? compose? callable?
quotation? quotation?
curry compose uncurry curry compose uncurry
array-nth set-array-nth length>> array-nth set-array-nth length>>
wrap probe wrap probe
namestack* namestack*
layout-of layout-of
} compile-unoptimized } compile-unoptimized
"." write flush "." write flush
{ {
bitand bitor bitxor bitnot bitand bitor bitxor bitnot
} compile-unoptimized } compile-unoptimized
"." write flush "." write flush
{ {
+ 2/ < <= > >= shift + 2/ < <= > >= shift
} compile-unoptimized } compile-unoptimized
"." write flush "." write flush
{ {
new-sequence nth push pop last flip new-sequence nth push pop last flip
} compile-unoptimized } compile-unoptimized
"." write flush "." write flush
{ {
hashcode* = equal? assoc-stack (assoc-stack) get set hashcode* = equal? assoc-stack (assoc-stack) get set
} compile-unoptimized } compile-unoptimized
"." write flush "." write flush
{ {
memq? split harvest sift cut cut-slice start index clone memq? split harvest sift cut cut-slice start index clone
set-at reverse push-all class number>string string>number set-at reverse push-all class number>string string>number
like clone-like like clone-like
} compile-unoptimized } compile-unoptimized
"." write flush "." write flush
{ {
lines prefix suffix unclip new-assoc update lines prefix suffix unclip new-assoc update
word-prop set-word-prop 1array 2array 3array ?nth word-prop set-word-prop 1array 2array 3array ?nth
} compile-unoptimized } compile-unoptimized
"." write flush "." write flush
{ {
malloc calloc free memcpy malloc calloc free memcpy
} compile-unoptimized } compile-unoptimized
"." write flush "." write flush
vocabs [ words compile-unoptimized "." write flush ] each vocabs [ words compile-unoptimized "." write flush ] each
" done" print flush " done" print flush
] unless