Fix bootstrap for a different cell size
parent
30eae6b77a
commit
952f6ca363
|
@ -427,32 +427,22 @@ M: curry '
|
||||||
"Writing image to " write dup write "..." print flush
|
"Writing image to " write dup write "..." print flush
|
||||||
<file-writer> [ (write-image) ] with-stream ;
|
<file-writer> [ (write-image) ] with-stream ;
|
||||||
|
|
||||||
: prepare-profile ( arch -- )
|
: prepare-image ( -- )
|
||||||
"resource:core/bootstrap/layouts/layouts.factor" run-file
|
|
||||||
"resource:core/cpu/" swap {
|
|
||||||
{ "x86.32" "x86/32" }
|
|
||||||
{ "x86.64" "x86/64" }
|
|
||||||
{ "linux-ppc" "ppc/linux" }
|
|
||||||
{ "macosx-ppc" "ppc/macosx" }
|
|
||||||
{ "arm" "arm" }
|
|
||||||
} at "/bootstrap.factor" 3append ?resource-path run-file ;
|
|
||||||
|
|
||||||
: prepare-image ( arch -- )
|
|
||||||
dup architecture set prepare-profile
|
|
||||||
bootstrapping? on
|
bootstrapping? on
|
||||||
load-help? off
|
load-help? off
|
||||||
800000 <vector> image set 20000 <hashtable> objects set ;
|
800000 <vector> image set
|
||||||
|
20000 <hashtable> objects set ;
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
: make-image ( arch -- )
|
: make-image ( arch -- )
|
||||||
[
|
architecture [
|
||||||
prepare-image
|
prepare-image
|
||||||
begin-image
|
begin-image
|
||||||
"resource:/core/bootstrap/stage1.factor" run-file
|
"resource:/core/bootstrap/stage1.factor" run-file
|
||||||
end-image
|
end-image
|
||||||
image get image-name write-image
|
image get image-name write-image
|
||||||
] with-scope ;
|
] with-variable ;
|
||||||
|
|
||||||
: my-arch ( -- arch )
|
: my-arch ( -- arch )
|
||||||
cpu dup "ppc" = [ os "-" rot 3append ] when ;
|
cpu dup "ppc" = [ os "-" rot 3append ] when ;
|
||||||
|
@ -460,7 +450,7 @@ PRIVATE>
|
||||||
: make-images ( -- )
|
: make-images ( -- )
|
||||||
{
|
{
|
||||||
"x86.32"
|
"x86.32"
|
||||||
! "x86.64"
|
"x86.64"
|
||||||
"linux-ppc" "macosx-ppc"
|
"linux-ppc" "macosx-ppc"
|
||||||
! "arm"
|
! "arm"
|
||||||
} [ make-image ] each ;
|
} [ make-image ] each ;
|
||||||
|
|
|
@ -54,6 +54,7 @@ IN: bootstrap.stage2
|
||||||
] each
|
] each
|
||||||
] when
|
] when
|
||||||
] with-compiler-errors
|
] with-compiler-errors
|
||||||
|
:errors
|
||||||
|
|
||||||
f error set-global
|
f error set-global
|
||||||
f error-continuation set-global
|
f error-continuation set-global
|
||||||
|
|
|
@ -44,7 +44,7 @@ IN: compiler
|
||||||
|
|
||||||
: compile-loop ( assoc -- )
|
: compile-loop ( assoc -- )
|
||||||
dup assoc-empty? [ drop ] [
|
dup assoc-empty? [ drop ] [
|
||||||
dup delete-any (compile)
|
dup delete-any drop (compile)
|
||||||
yield
|
yield
|
||||||
compile-loop
|
compile-loop
|
||||||
] if ;
|
] if ;
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
! Copyright (C) 2007 Slava Pestov.
|
! Copyright (C) 2007, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: parser layouts system ;
|
USING: parser layouts system kernel ;
|
||||||
IN: bootstrap.ppc
|
IN: bootstrap.ppc
|
||||||
|
|
||||||
: c-area-size 10 bootstrap-cells ;
|
: c-area-size 10 bootstrap-cells ;
|
||||||
: lr-save bootstrap-cell ;
|
: lr-save bootstrap-cell ;
|
||||||
|
|
||||||
"resource:core/cpu/ppc/bootstrap.factor" run-file
|
<< "resource:core/cpu/ppc/bootstrap.factor" parse-file parsed >>
|
||||||
|
call
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
! Copyright (C) 2007 Slava Pestov.
|
! Copyright (C) 2007, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: parser layouts system ;
|
USING: parser layouts system kernel ;
|
||||||
IN: bootstrap.ppc
|
IN: bootstrap.ppc
|
||||||
|
|
||||||
: c-area-size 14 bootstrap-cells ;
|
: c-area-size 14 bootstrap-cells ;
|
||||||
: lr-save 2 bootstrap-cells ;
|
: lr-save 2 bootstrap-cells ;
|
||||||
|
|
||||||
"resource:core/cpu/ppc/bootstrap.factor" run-file
|
<< "resource:core/cpu/ppc/bootstrap.factor" parse-file parsed >>
|
||||||
|
call
|
||||||
|
|
|
@ -14,4 +14,5 @@ IN: bootstrap.x86
|
||||||
: fixnum>slot@ arg0 1 SAR ;
|
: fixnum>slot@ arg0 1 SAR ;
|
||||||
: rex-length 0 ;
|
: rex-length 0 ;
|
||||||
|
|
||||||
"resource:core/cpu/x86/bootstrap.factor" run-file
|
<< "resource:core/cpu/x86/bootstrap.factor" parse-file parsed >>
|
||||||
|
call
|
||||||
|
|
|
@ -14,4 +14,5 @@ IN: bootstrap.x86
|
||||||
: fixnum>slot@ ;
|
: fixnum>slot@ ;
|
||||||
: rex-length 1 ;
|
: rex-length 1 ;
|
||||||
|
|
||||||
"resource:core/cpu/x86/bootstrap.factor" run-file
|
<< "resource:core/cpu/x86/bootstrap.factor" parse-file parsed >>
|
||||||
|
call
|
||||||
|
|
Loading…
Reference in New Issue