]> gitweb.factorcode.org Git - factor.git/commitdiff
core: fix bad interaction between stage1 bootstrap and manifest update code
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 27 Jan 2010 14:02:54 +0000 (03:02 +1300)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 27 Jan 2010 14:02:54 +0000 (03:02 +1300)
core/bootstrap/primitives.factor
core/compiler/units/units.factor
core/source-files/source-files.factor

index 2288b89cf48cd0d4af86ffa9051898176e6ffd72..7b9f8e9cc80ff64e54a4fdc384e295106a8a6c95 100644 (file)
@@ -44,7 +44,7 @@ init-caches
 ! Vocabulary for slot accessors
 "accessors" create-vocab drop
 
-dummy-compiler compiler-impl set
+bootstrapping? on
 
 call( -- )
 call( -- )
@@ -53,8 +53,6 @@ call( -- )
 ! After we execute bootstrap/layouts
 num-types get f <array> builtins set
 
-bootstrapping? on
-
 [
 
 ! Create some empty vocabs where the below primitives and
index a64080e510afce7f0a888dcc1acf196d9efe3c29..87a25f2af7dad3a1b9be9fc567435f4c424196d5 100644 (file)
@@ -64,16 +64,6 @@ M: f process-forgotten-words drop ;
 : without-optimizer ( quot -- )
     [ f compiler-impl ] dip with-variable ; inline
 
-! Trivial compiler. We don't want to touch the code heap
-! during stage1 bootstrap, it would just waste time.
-SINGLETON: dummy-compiler
-
-M: dummy-compiler to-recompile f ;
-
-M: dummy-compiler recompile drop { } ;
-
-M: dummy-compiler process-forgotten-words drop ;
-
 : <definitions> ( -- pair ) { H{ } H{ } } [ clone ] map ;
 
 SYMBOL: definition-observers
@@ -143,13 +133,15 @@ M: object bump-effect-counter* drop f ;
     [ drop ] [ notify-definition-observers notify-error-observers ] if ;
 
 : finish-compilation-unit ( -- )
-    remake-generics
-    to-recompile recompile
-    update-tuples
-    process-forgotten-definitions
-    modify-code-heap
-    bump-effect-counter
-    notify-observers ;
+    [ ] [
+        remake-generics
+        to-recompile recompile
+        update-tuples
+        process-forgotten-definitions
+        modify-code-heap
+        bump-effect-counter
+        notify-observers
+    ] if-bootstrapping ;
 
 PRIVATE>
 
index 4991a0860a6fde24f9fd88e58c6ba375bafc1479..840ed94b966ffdfa2a0bcdae43450b15fd07f01b 100644 (file)
@@ -16,7 +16,8 @@ checksum
 definitions ;
 
 : record-top-level-form ( quot file -- )
-    (>>top-level-form) H{ } notify-definition-observers ;
+    (>>top-level-form)
+    [ ] [ H{ } notify-definition-observers ] if-bootstrapping ;
 
 : record-checksum ( lines source-file -- )
     [ crc32 checksum-lines ] dip (>>checksum) ;