 
 : here-as ( tag -- pointer ) here swap bitor ;
 
-USE: continuations
-
 : align-here ( -- )
-    here 8 mod 4 = [ break heap-size drop 0 emit ] when ;
+    here 8 mod 4 = [ heap-size drop 0 emit ] when ;
 
 : emit-fixnum ( n -- ) tag-fixnum emit ;
 

        [ >le write ] curry each
    ] if ;

: write-image ( image filename -- )
    "Writing image to " write dup write "..." print flush
    <file-writer> [ (write-image) ] with-stream ;

: prepare-image ( -- )
    bootstrapping? on
    load-help? off
    800000 <vector> image set
    20000 <hashtable> objects set ;

PRIVATE>

: make-image ( arch -- )
    architecture [
        prepare-image
        "resource:/core/bootstrap/stage1.factor" run-file
        begin-image
        end-image
        image get
        architecture get boot-image-name resource-path
        write-image
    ] with-variable ;

: make-images ( -- )
    images [ make-image ] each ;

:  0,  0 >bignum '  0-offset fixup ;
:  1,  1 >bignum '  1-offset fixup ;
: -1, -1 >bignum ' -1-offset fixup ;

! Words

