More robust bootstrap, fix X11 typo

slava 2006-05-29 04:19:31 +00:00
parent fa48c9f1f5
commit 9ca8b2a448
2 changed files with 73 additions and 68 deletions

View File

@ -1,14 +1,17 @@
! Copyright (C) 2004, 2006 Slava Pestov. ! Copyright (C) 2004, 2006 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: compiler generic help io io-internals kernel USING: compiler errors generic help io io-internals kernel
kernel-internals math memory namespaces optimizer parser kernel-internals listener math memory namespaces optimizer
sequences sequences-internals words ; parser sequences sequences-internals words ;
"Cross-referencing..." print flush ! Wrap everything in a catch which starts a listener so you can
H{ } clone crossref set-global xref-words ! see what went wrong, instead of dealing with a fep
H{ } clone help-graph set-global xref-articles [
"Cross-referencing..." print flush
H{ } clone crossref set-global xref-words
H{ } clone help-graph set-global xref-articles
"compile" get [ "compile" get [
"native-io" get [ "native-io" get [
unix? [ unix? [
"/library/unix/load.factor" run-resource "/library/unix/load.factor" run-resource
@ -53,29 +56,31 @@ H{ } clone help-graph set-global xref-articles
"/library/windows/clipboard.factor" run-resource "/library/windows/clipboard.factor" run-resource
compile-all compile-all
] when ] when
] when ] when
[ [
boot boot
run-user-init run-user-init
"shell" get "shells" lookup execute "shell" get "shells" lookup execute
0 exit 0 exit
] set-boot ] set-boot
[ compiled? ] word-subset length [ compiled? ] word-subset length
number>string write " compiled words" print number>string write " compiled words" print
[ symbol? ] word-subset length [ symbol? ] word-subset length
number>string write " symbol words" print number>string write " symbol words" print
all-words length all-words length
number>string write " words total" print number>string write " words total" print
"Total bootstrap GC time: " write gc-time "Total bootstrap GC time: " write gc-time
number>string write " ms" print number>string write " ms" print
"Bootstrapping is complete." print "Bootstrapping is complete." print
"Now, you can run ./f factor.image" print flush "Now, you can run ./f factor.image" print flush
"factor.image" resource-path save-image
] catch [ print-error listener ] when*
"factor.image" resource-path save-image
0 exit 0 exit

View File

@ -26,7 +26,7 @@ SYMBOL: root
: with-x ( display-string quot -- ) : with-x ( display-string quot -- )
[ [
reset-views reset-windows
swap initialize-x swap initialize-x
[ close-x ] cleanup [ close-x ] cleanup
] with-scope ; ] with-scope ;