1 ! Copyright (C) 2004, 2009 Slava Pestov.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: assocs bootstrap.image.private hash-sets hashtables init
4 io io.files kernel kernel.private make memory namespaces parser
5 parser.notes sequences system vocabs vocabs.loader ;
7 "Bootstrap stage 1..." print flush
9 "resource:basis/bootstrap/primitives.factor" run-file
12 { "resource:core" } vocab-roots set
14 ! Create a boot quotation for the target by collecting all top-level
15 ! forms into a quotation, surrounded by some boilerplate.
18 ! Rehash hashtables first, since bootstrap.image creates
19 ! them using the host image's hashing algorithms.
20 [ hashtable? ] instances [ hashtables:rehash ] each
21 [ hash-set? ] instances [ hash-sets:rehash ] each
25 "math.integers" require
30 "io.streams.c" require
31 "io.streams.byte-array" require ! for utf16 on Windows
32 "vocabs.loader" require
38 "locals.macros" require
40 "resource:basis/bootstrap/layouts.factor" parse-file %
43 f parser-quiet? set-global
47 "resource:basis/bootstrap/stage2.factor"
51 "Cannot find " write write "." print
52 "Please move " write image-path write " into the same directory as the Factor sources," print
53 "and try again." print
59 bootstrap.image.private:special-objects get set-at