Don't print compiler warnings during bootstrap, they're useless
parent
4165804ee8
commit
5e17832dbb
|
@ -1,6 +1,7 @@
|
||||||
- sometimes fep when closing window
|
- sometimes fep when closing window
|
||||||
- windows rollover broken again
|
- windows rollover broken again
|
||||||
- compile error after reloading library/math/float.factor
|
- compile error after reloading library/math/float.factor
|
||||||
|
- move window while factor is busy: mouse gets messed up!
|
||||||
|
|
||||||
+ ui:
|
+ ui:
|
||||||
|
|
||||||
|
|
|
@ -5,97 +5,104 @@ kernel kernel-internals listener math memory modules namespaces
|
||||||
optimizer parser sequences sequences-internals words ;
|
optimizer parser sequences sequences-internals words ;
|
||||||
|
|
||||||
[
|
[
|
||||||
! Wrap everything in a catch which starts a listener so you
|
print-warnings off
|
||||||
! can see what went wrong, instead of dealing with a fep
|
|
||||||
[
|
[
|
||||||
"Cross-referencing..." print flush
|
! Wrap everything in a catch which starts a listener so
|
||||||
H{ } clone changed-words set-global
|
! you can see what went wrong, instead of dealing with a
|
||||||
H{ } clone crossref set-global xref-words
|
! fep
|
||||||
|
[
|
||||||
|
"Cross-referencing..." print flush
|
||||||
|
H{ } clone changed-words set-global
|
||||||
|
H{ } clone crossref set-global xref-words
|
||||||
|
|
||||||
cpu "x86" = [
|
cpu "x86" = [
|
||||||
macosx?
|
macosx?
|
||||||
"resource:/library/compiler/x86/alien-macosx.factor"
|
"resource:/library/compiler/x86/alien-macosx.factor"
|
||||||
"resource:/library/compiler/x86/alien.factor"
|
"resource:/library/compiler/x86/alien.factor"
|
||||||
? run-file
|
? run-file
|
||||||
] when
|
|
||||||
|
|
||||||
"compile" get [
|
|
||||||
windows? [
|
|
||||||
"resource:/library/windows/dlls.factor" run-file
|
|
||||||
] when
|
] when
|
||||||
|
|
||||||
\ number= compile
|
"compile" get [
|
||||||
\ + compile
|
|
||||||
\ nth compile
|
|
||||||
\ set-nth compile
|
|
||||||
\ = compile
|
|
||||||
|
|
||||||
! Load UI backend
|
|
||||||
"cocoa" get [
|
|
||||||
"library/ui/cocoa" require
|
|
||||||
] when
|
|
||||||
|
|
||||||
"x11" get [
|
|
||||||
"library/ui/x11" require
|
|
||||||
] when
|
|
||||||
|
|
||||||
windows? [
|
|
||||||
"library/ui/windows" require
|
|
||||||
] when
|
|
||||||
|
|
||||||
! Load native I/O code
|
|
||||||
"native-io" get [
|
|
||||||
unix? [
|
|
||||||
"library/io/unix" require
|
|
||||||
] when
|
|
||||||
windows? [
|
windows? [
|
||||||
"library/io/windows" require
|
"resource:/library/windows/dlls.factor"
|
||||||
|
run-file
|
||||||
] when
|
] when
|
||||||
|
|
||||||
|
\ number= compile
|
||||||
|
\ + compile
|
||||||
|
\ nth compile
|
||||||
|
\ set-nth compile
|
||||||
|
\ = compile
|
||||||
|
|
||||||
|
! Load UI backend
|
||||||
|
"cocoa" get [
|
||||||
|
"library/ui/cocoa" require
|
||||||
|
] when
|
||||||
|
|
||||||
|
"x11" get [
|
||||||
|
"library/ui/x11" require
|
||||||
|
] when
|
||||||
|
|
||||||
|
windows? [
|
||||||
|
"library/ui/windows" require
|
||||||
|
] when
|
||||||
|
|
||||||
|
! Load native I/O code
|
||||||
|
"native-io" get [
|
||||||
|
unix? [
|
||||||
|
"library/io/unix" require
|
||||||
|
] when
|
||||||
|
windows? [
|
||||||
|
"library/io/windows" require
|
||||||
|
] when
|
||||||
|
] when
|
||||||
|
|
||||||
|
parse-command-line
|
||||||
|
|
||||||
|
compile-all
|
||||||
|
|
||||||
|
"Initializing native I/O..." print flush
|
||||||
|
"native-io" get [ init-io ] when
|
||||||
|
|
||||||
|
! We only do this if we are compiled, otherwise
|
||||||
|
! it takes too long.
|
||||||
|
"Building online help search index..." print
|
||||||
|
flush
|
||||||
|
H{ } clone parent-graph set-global xref-help
|
||||||
|
H{ } clone term-index set-global index-help
|
||||||
] when
|
] when
|
||||||
|
] no-parse-hook
|
||||||
|
|
||||||
parse-command-line
|
run-bootstrap-init
|
||||||
|
|
||||||
compile-all
|
[
|
||||||
|
boot
|
||||||
|
run-user-init
|
||||||
|
"shell" get "shells" lookup execute
|
||||||
|
0 exit
|
||||||
|
] set-boot
|
||||||
|
|
||||||
"Initializing native I/O..." print flush
|
f error set-global
|
||||||
"native-io" get [ init-io ] when
|
f error-continuation set-global
|
||||||
|
|
||||||
! We only do this if we are compiled, otherwise it
|
[ compiled? ] word-subset length
|
||||||
! takes too long.
|
number>string write " compiled words" print
|
||||||
"Building online help search index..." print flush
|
|
||||||
H{ } clone parent-graph set-global xref-help
|
|
||||||
H{ } clone term-index set-global index-help
|
|
||||||
] when
|
|
||||||
] no-parse-hook
|
|
||||||
|
|
||||||
run-bootstrap-init
|
[ symbol? ] word-subset length
|
||||||
|
number>string write " symbol words" print
|
||||||
|
|
||||||
[
|
all-words length
|
||||||
boot
|
number>string write " words total" print
|
||||||
run-user-init
|
|
||||||
"shell" get "shells" lookup execute
|
|
||||||
0 exit
|
|
||||||
] set-boot
|
|
||||||
|
|
||||||
f error set-global
|
"Total bootstrap GC time: " write gc-time
|
||||||
f error-continuation set-global
|
number>string write " ms" print
|
||||||
|
|
||||||
[ compiled? ] word-subset length
|
"Bootstrapping is complete." print
|
||||||
number>string write " compiled words" print
|
"Now, you can run ./f factor.image" print flush
|
||||||
|
|
||||||
[ symbol? ] word-subset length
|
"factor.image" resource-path save-image
|
||||||
number>string write " symbol words" print
|
] [ print-error :c ] recover
|
||||||
|
] with-scope
|
||||||
all-words length
|
|
||||||
number>string write " words total" print
|
|
||||||
|
|
||||||
"Total bootstrap GC time: " write gc-time
|
|
||||||
number>string write " ms" print
|
|
||||||
|
|
||||||
"Bootstrapping is complete." print
|
|
||||||
"Now, you can run ./f factor.image" print flush
|
|
||||||
|
|
||||||
"factor.image" resource-path save-image
|
|
||||||
] [ print-error :c ] recover
|
|
||||||
|
|
||||||
0 exit
|
0 exit
|
||||||
|
|
|
@ -5,6 +5,10 @@ USING: errors generic hashtables inference io kernel math
|
||||||
namespaces optimizer parser prettyprint sequences test threads
|
namespaces optimizer parser prettyprint sequences test threads
|
||||||
words ;
|
words ;
|
||||||
|
|
||||||
|
SYMBOL: print-warnings
|
||||||
|
|
||||||
|
t print-warnings set-global
|
||||||
|
|
||||||
SYMBOL: batch-errors
|
SYMBOL: batch-errors
|
||||||
|
|
||||||
GENERIC: batch-begins ( batch-errors -- )
|
GENERIC: batch-begins ( batch-errors -- )
|
||||||
|
@ -17,7 +21,10 @@ M: f compile-begins drop "Compiling " write . flush ;
|
||||||
|
|
||||||
GENERIC: compile-error ( error batch-errors -- )
|
GENERIC: compile-error ( error batch-errors -- )
|
||||||
|
|
||||||
M: f compile-error drop error. flush ;
|
M: f compile-error
|
||||||
|
drop
|
||||||
|
dup inference-error-major? print-warnings get or
|
||||||
|
[ dup error. flush ] when drop ;
|
||||||
|
|
||||||
GENERIC: batch-ends ( batch-errors -- )
|
GENERIC: batch-ends ( batch-errors -- )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue