1 ! Copyright (C) 2004, 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: arrays assocs continuations debugger generic hashtables
4 init io io.files kernel kernel.private make math memory
5 namespaces parser prettyprint sequences splitting system
6 vectors vocabs vocabs.loader words destructors ;
7 QUALIFIED: bootstrap.image.private
10 "Bootstrap stage 1..." print flush
12 "vocab:bootstrap/primitives.factor" run-file
15 { "resource:core" } vocab-roots set
17 ! Create a boot quotation for the target by collecting all top-level
18 ! forms into a quotation, surrounded by some boilerplate.
21 ! Rehash hashtables first, since bootstrap.image creates
22 ! them using the host image's hashing algorithms.
23 [ hashtable? ] instances [ rehash ] each
27 "math.integers" require
31 "io.streams.c" require
32 "vocabs.loader" require
35 "bootstrap.layouts" require
38 "resource:basis/bootstrap/stage2.factor"
40 [ run-file ] with-destructors
42 "Cannot find " write write "." print
43 "Please move " write image write " to the same directory as the Factor sources," print
44 "and try again." print
49 bootstrap.image.private:bootstrap-boot-quot set