1 ! Copyright (C) 2007, 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors compiler cpu.architecture vocabs.loader system
4 sequences namespaces parser kernel kernel.private classes
5 classes.private arrays hashtables vectors classes.tuple sbufs
6 inference.dataflow hashtables.private sequences.private math
7 classes.tuple.private growable namespaces.private assocs words
8 generator command-line vocabs io io.encodings.string
9 prettyprint libc compiler.units math.order ;
10 IN: bootstrap.compiler
12 ! Don't bring this in when deploying, since it will store a
13 ! reference to 'eval' in a global variable
15 "alien.remote-control" require
18 "cpu." cpu name>> append require
22 : compile-uncompiled ( words -- )
23 [ compiled>> not ] filter compile ;
26 "Compiling..." write flush
28 ! Compile a set of words ahead of the full compile.
29 ! This set of words was determined semi-empirically
30 ! using the profiler. It improves bootstrap time
31 ! significantly, because frequenly called words
32 ! which are also quick to compile are replaced by
33 ! compiled definitions as soon as possible.
35 roll -roll declare not
37 array? hashtable? vector?
38 tuple? sbuf? node? tombstone?
40 array-nth set-array-nth
50 bitand bitor bitxor bitnot
56 + 1+ 1- 2/ < <= > >= shift
62 new-sequence nth push pop peek
80 malloc calloc free memcpy
83 vocabs [ words compile-uncompiled "." write flush ] each