bootstrap.stage2: more logging output and fix for #1444
The error clearing needs to happen almost last so that an error is not set in the image.db4
parent
4f698db8fc
commit
fc9eb0d5ac
|
@ -13,9 +13,9 @@ SYMBOL: bootstrap-time
|
||||||
: strip-encodings ( -- )
|
: strip-encodings ( -- )
|
||||||
os unix? [
|
os unix? [
|
||||||
[
|
[
|
||||||
P" resource:core/io/encodings/utf16/utf16.factor"
|
P" resource:core/io/encodings/utf16/utf16.factor"
|
||||||
P" resource:core/io/encodings/utf16n/utf16n.factor" [ forget ] bi@
|
P" resource:core/io/encodings/utf16n/utf16n.factor" [ forget ] bi@
|
||||||
"io.encodings.utf16"
|
"io.encodings.utf16"
|
||||||
"io.encodings.utf16n" [ loaded-child-vocab-names [ forget-vocab ] each ] bi@
|
"io.encodings.utf16n" [ loaded-child-vocab-names [ forget-vocab ] each ] bi@
|
||||||
] with-compilation-unit
|
] with-compilation-unit
|
||||||
] when ;
|
] when ;
|
||||||
|
@ -24,14 +24,13 @@ SYMBOL: bootstrap-time
|
||||||
vm-path file-name os windows? [ "." split1-last drop ] when
|
vm-path file-name os windows? [ "." split1-last drop ] when
|
||||||
".image" append resource-path ;
|
".image" append resource-path ;
|
||||||
|
|
||||||
: load-components ( -- )
|
: load-component ( name -- )
|
||||||
"include" "exclude"
|
dup "* Loading the " write write " component" print
|
||||||
[ get-global " " split harvest ] bi@
|
"bootstrap." prepend require ;
|
||||||
diff
|
|
||||||
[ "bootstrap." prepend require ] each ;
|
|
||||||
|
|
||||||
: count-words ( pred -- )
|
: load-components ( -- )
|
||||||
all-words swap count number>string write ; inline
|
"include" "exclude" [ get-global " " split harvest ] bi@ diff
|
||||||
|
[ load-component ] each ;
|
||||||
|
|
||||||
: print-time ( us -- )
|
: print-time ( us -- )
|
||||||
1,000,000,000 /i
|
1,000,000,000 /i
|
||||||
|
@ -56,6 +55,9 @@ SYMBOL: bootstrap-time
|
||||||
original-error set-global
|
original-error set-global
|
||||||
error set-global ; inline
|
error set-global ; inline
|
||||||
|
|
||||||
|
CONSTANT: default-components
|
||||||
|
"math compiler threads help io tools ui ui.tools unicode handbook"
|
||||||
|
|
||||||
[
|
[
|
||||||
! We time bootstrap
|
! We time bootstrap
|
||||||
nano-count
|
nano-count
|
||||||
|
@ -66,7 +68,7 @@ SYMBOL: bootstrap-time
|
||||||
|
|
||||||
default-image-name "output-image" set-global
|
default-image-name "output-image" set-global
|
||||||
|
|
||||||
"math compiler threads help io tools ui ui.tools unicode handbook" "include" set-global
|
default-components "include" set-global
|
||||||
"" "exclude" set-global
|
"" "exclude" set-global
|
||||||
|
|
||||||
strip-encodings
|
strip-encodings
|
||||||
|
@ -90,10 +92,6 @@ SYMBOL: bootstrap-time
|
||||||
|
|
||||||
run-bootstrap-init
|
run-bootstrap-init
|
||||||
|
|
||||||
f error set-global
|
|
||||||
f original-error set-global
|
|
||||||
f error-continuation set-global
|
|
||||||
|
|
||||||
nano-count swap - bootstrap-time set-global
|
nano-count swap - bootstrap-time set-global
|
||||||
print-report
|
print-report
|
||||||
|
|
||||||
|
@ -106,6 +104,9 @@ SYMBOL: bootstrap-time
|
||||||
"vocab:bootstrap/finish-bootstrap.factor" run-file
|
"vocab:bootstrap/finish-bootstrap.factor" run-file
|
||||||
] if
|
] if
|
||||||
|
|
||||||
|
f error set-global
|
||||||
|
f original-error set-global
|
||||||
|
f error-continuation set-global
|
||||||
"output-image" get save-image-and-exit
|
"output-image" get save-image-and-exit
|
||||||
] if
|
] if
|
||||||
] [
|
] [
|
||||||
|
|
Loading…
Reference in New Issue