Fix and clean up stage1 bootstrap

db4
Slava Pestov 2010-01-28 17:30:35 +13:00
parent ce60f3c6b6
commit 6cdf4de4eb
2 changed files with 20 additions and 12 deletions

View File

@ -554,12 +554,19 @@ M: quotation '
: fixup-header ( -- )
heap-size data-heap-size-offset fixup ;
: build-generics ( -- )
[
all-words
[ generic? ] filter
[ make-generic ] each
] with-compilation-unit ;
: build-image ( -- image )
800000 <vector> image set
20000 <hashtable> objects set
emit-image-header t, 0, 1, -1,
"Building generic words..." print flush
remake-generics
build-generics
"Serializing words..." print flush
emit-words
"Serializing JIT data..." print flush

View File

@ -31,30 +31,31 @@ architecture get {
! Now we have ( syntax-quot arch-quot layouts-quot ) on the stack
! Bring up a bare cross-compiling vocabulary.
"syntax" vocab vocab-words bootstrap-syntax set {
dictionary
new-classes
changed-definitions changed-generics changed-effects
outdated-generics forgotten-definitions
root-cache source-files update-map implementors-map
} [ H{ } clone swap set ] each
"syntax" vocab vocab-words bootstrap-syntax set
H{ } clone dictionary set
H{ } clone root-cache set
H{ } clone source-files set
H{ } clone update-map set
H{ } clone implementors-map set
init-caches
! Vocabulary for slot accessors
"accessors" create-vocab drop
bootstrapping? on
call( -- )
call( -- )
call( -- )
! Vocabulary for slot accessors
"accessors" create-vocab drop
! After we execute bootstrap/layouts
num-types get f <array> builtins set
[
call( -- )
! Create some empty vocabs where the below primitives and
! classes will go
{