bootstrap.compiler: compile a few more words early, for a big bootstrap speed boost
parent
a9977d7c79
commit
e1caaca6df
|
@ -6,9 +6,8 @@ classes.private arrays hashtables vectors classes.tuple sbufs
|
||||||
hashtables.private sequences.private math classes.tuple.private
|
hashtables.private sequences.private math classes.tuple.private
|
||||||
growable namespaces.private assocs words command-line vocabs io
|
growable namespaces.private assocs words command-line vocabs io
|
||||||
io.encodings.string libc splitting math.parser memory compiler.units
|
io.encodings.string libc splitting math.parser memory compiler.units
|
||||||
math.order compiler.tree.builder compiler.tree.optimizer
|
math.order quotations quotations.private assocs.private ;
|
||||||
compiler.cfg.optimizer ;
|
FROM: compiler => enable-optimizer ;
|
||||||
FROM: compiler => enable-optimizer compile-word ;
|
|
||||||
IN: bootstrap.compiler
|
IN: bootstrap.compiler
|
||||||
|
|
||||||
! Don't bring this in when deploying, since it will store a
|
! Don't bring this in when deploying, since it will store a
|
||||||
|
@ -42,16 +41,24 @@ nl
|
||||||
! 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
|
||||||
|
|
||||||
array? hashtable? vector?
|
array? hashtable? vector?
|
||||||
tuple? sbuf? tombstone?
|
tuple? sbuf? tombstone?
|
||||||
|
curry? compose? callable?
|
||||||
|
quotation?
|
||||||
|
|
||||||
array-nth set-array-nth
|
curry compose uncurry
|
||||||
|
|
||||||
|
array-nth set-array-nth length>>
|
||||||
|
|
||||||
wrap probe
|
wrap probe
|
||||||
|
|
||||||
namestack*
|
namestack*
|
||||||
|
|
||||||
|
layout-of
|
||||||
} compile-unoptimized
|
} compile-unoptimized
|
||||||
|
|
||||||
"." write flush
|
"." write flush
|
||||||
|
@ -75,7 +82,7 @@ nl
|
||||||
"." write flush
|
"." write flush
|
||||||
|
|
||||||
{
|
{
|
||||||
hashcode* = get set
|
hashcode* = equal? assoc-stack (assoc-stack) get set
|
||||||
} compile-unoptimized
|
} compile-unoptimized
|
||||||
|
|
||||||
"." write flush
|
"." write flush
|
||||||
|
@ -100,22 +107,6 @@ nl
|
||||||
|
|
||||||
"." write flush
|
"." write flush
|
||||||
|
|
||||||
{ build-tree } compile-unoptimized
|
|
||||||
|
|
||||||
"." write flush
|
|
||||||
|
|
||||||
{ optimize-tree } compile-unoptimized
|
|
||||||
|
|
||||||
"." write flush
|
|
||||||
|
|
||||||
{ optimize-cfg } compile-unoptimized
|
|
||||||
|
|
||||||
"." write flush
|
|
||||||
|
|
||||||
{ compile-word } compile-unoptimized
|
|
||||||
|
|
||||||
"." write flush
|
|
||||||
|
|
||||||
vocabs [ words compile-unoptimized "." write flush ] each
|
vocabs [ words compile-unoptimized "." write flush ] each
|
||||||
|
|
||||||
" done" print flush
|
" done" print flush
|
||||||
|
|
Loading…
Reference in New Issue