]> gitweb.factorcode.org Git - factor.git/blob - basis/bootstrap/stage1.factor
arm64: 9999 BRK works again
[factor.git] / basis / bootstrap / stage1.factor
1 ! Copyright (C) 2004, 2009 Slava Pestov.
2 ! See http://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 ;
6
7 "Bootstrap stage 1..." print flush
8
9 "resource:basis/bootstrap/primitives.factor" run-file
10
11 load-help? off
12 { "resource:core" } vocab-roots set
13
14 ! Create a boot quotation for the target by collecting all top-level
15 ! forms into a quotation, surrounded by some boilerplate.
16 [
17     [
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
22         boot
23     ] %
24
25     "math.integers" require
26     "math.ratios" require
27     "math.floats" require
28     "memory" require
29
30     "io.streams.c" require
31     "io.streams.byte-array" require ! for utf16 on Windows
32     "vocabs.loader" require
33
34     "syntax" require
35
36     "locals" require
37     "locals.fry" require
38     "locals.macros" require
39
40     "resource:basis/bootstrap/layouts.factor" parse-file %
41
42     [
43         f parser-quiet? set-global
44
45         init-resource-path
46
47         "resource:basis/bootstrap/stage2.factor"
48         dup file-exists? [
49             run-file
50         ] [
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
54             1 (exit)
55         ] if
56     ] %
57 ] [ ] make
58
59 drop
60
61 [  ]
62 OBJ-STARTUP-QUOT
63 bootstrap.image.private:special-objects get set-at