]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix for local definitions
authorKeldan Chapman <keldan.chapman@gmail.com>
Thu, 7 Sep 2023 17:46:38 +0000 (19:46 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 7 Sep 2023 18:24:30 +0000 (11:24 -0700)
basis/bootstrap/image/image.factor

index 9730593457c5504baec2f8dda0c335497b33fb69..40172750f0397226a9f6b9e52b6c33cff14ab708 100644 (file)
@@ -6,7 +6,7 @@ classes.tuple.private combinators combinators.short-circuit
 combinators.smart command-line compiler.codegen.relocation
 compiler.units endian generic generic.single.private grouping
 hashtables hashtables.private io io.encodings.binary io.files
-io.pathnames kernel kernel.private layouts make math
+io.pathnames kernel kernel.private layouts locals.types make math
 math.bitwise math.order namespaces namespaces.private parser
 parser.notes prettyprint quotations sequences sequences.private
 source-files splitting strings system vectors vocabs words ;
@@ -474,6 +474,9 @@ M: quotation prepare-object
 : emit-special-objects ( -- )
     special-objects get [ swap emit-special-object ] assoc-each ;
 
+: emit-locals ( -- )
+    bootstrapping-image get [ dup local? [ emit-word ] [ drop ] if ] each ;
+
 : fixup-header ( -- )
     heap-size data-heap-size-offset fixup ;
 
@@ -508,7 +511,7 @@ M: quotation prepare-object
     "Serializing special object table..." print flush
     emit-special-objects
     "Performing word fixups..." print flush
-    fixup-words
+    emit-locals fixup-words
     "Performing header fixups..." print flush
     fixup-header
     "Image length: " write bootstrapping-image get length .