kernel.private math memory continuations kernel io.files
io.backend system parser vocabs sequences prettyprint
vocabs.loader combinators splitting source-files strings
-definitions assocs ;
+definitions assocs compiler.errors ;
IN: bootstrap.stage2
! Wrap everything in a catch which starts a listener so
vm file-name windows? [ >lower ".exe" ?tail drop ] when
".image" append "output-image" set-global
- "math compiler tools help ui ui.tools io" "include" set-global
+ "math tools help compiler ui ui.tools io" "include" set-global
"" "exclude" set-global
parse-command-line
- all-words [ dup ] H{ } map>assoc changed-words set-global
-
"-no-crossref" cli-args member? [
"Cross-referencing..." print flush
H{ } clone crossref set-global
] [
"listener" require
"none" require
- "listener" use+
] if
[
[ get-global " " split [ empty? not ] subset ] 2apply
seq-diff
[ "bootstrap." swap append require ] each
- ] no-parse-hook
-
- init-io
- init-stdio
- changed-words get clear-assoc
+ run-bootstrap-init
- "compile-errors" "generator" lookup [
- f swap set-global
- ] when*
+ "Compiling remaining words..." print
- run-bootstrap-init
+ all-words [ compiled? not ] subset recompile-hook get call
+ ] with-compiler-errors
f error set-global
f error-continuation set-global
] set-boot-quot
: count-words all-words swap subset length pprint ;
-
+
[ compiled? ] count-words " compiled words" print
[ symbol? ] count-words " symbol words" print
[ ] count-words " words total" print
"Bootstrapping is complete." print
- "Now, you can run ./factor -i=" write
- "output-image" get print flush
+ "Now, you can run Factor:" print
+ vm write " -i=" write "output-image" get print flush
"output-image" get resource-path save-image-and-exit
] if