]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/bootstrap/stage2.factor
io.encodings.utf16: add a utf16n word for native utf16 type.
[factor.git] / basis / bootstrap / stage2.factor
index 4da83de1b3ac58e90160a58dd5a922cf470a0601..8ff0d37d59edf231cdf60d9c880a5715c8def329 100644 (file)
@@ -13,10 +13,8 @@ SYMBOL: bootstrap-time
 : strip-encodings ( -- )
     os unix? [
         [
-            P" resource:core/io/encodings/utf16/utf16.factor" 
-            P" resource:core/io/encodings/utf16n/utf16n.factor" [ forget ] bi@
-            "io.encodings.utf16" 
-            "io.encodings.utf16n" [ loaded-child-vocab-names [ forget-vocab ] each ] bi@
+            P" resource:core/io/encodings/utf16/utf16.factor" forget
+            "io.encodings.utf16" loaded-child-vocab-names [ forget-vocab ] each
         ] with-compilation-unit
     ] when ;
 
@@ -24,14 +22,13 @@ SYMBOL: bootstrap-time
     vm-path file-name os windows? [ "." split1-last drop ] when
     ".image" append resource-path ;
 
-: load-components ( -- )
-    "include" "exclude"
-    [ get-global " " split harvest ] bi@
-    diff
-    [ "bootstrap." prepend require ] each ;
+: load-component ( name -- )
+    dup "* Loading the " write write " component" print
+    "bootstrap." prepend require ;
 
-: count-words ( pred -- )
-    all-words swap count number>string write ; inline
+: load-components ( -- )
+    "include" "exclude" [ get-global " " split harvest ] bi@ diff
+    [ load-component ] each ;
 
 : print-time ( us -- )
     1,000,000,000 /i
@@ -56,6 +53,9 @@ SYMBOL: bootstrap-time
     original-error set-global
     error set-global ; inline
 
+CONSTANT: default-components
+    "math compiler threads io tools ui ui.tools unicode help handbook"
+
 [
     ! We time bootstrap
     nano-count
@@ -66,7 +66,7 @@ SYMBOL: bootstrap-time
 
     default-image-name "output-image" set-global
 
-    "math compiler threads help io tools ui ui.tools unicode handbook" "include" set-global
+    default-components "include" set-global
     "" "exclude" set-global
 
     strip-encodings
@@ -76,12 +76,11 @@ SYMBOL: bootstrap-time
     ! Set dll paths
     os windows? [ "windows" require ] when
 
-    "staging" get "deploy-vocab" get or [
+    "staging" get [
         "stage2: deployment mode" print
     ] [
         "debugger" require
         "listener" require
-        "none" require
     ] if
 
     load-components
@@ -90,24 +89,19 @@ SYMBOL: bootstrap-time
 
     run-bootstrap-init
 
-    f error set-global
-    f original-error set-global
-    f error-continuation set-global
-
     nano-count swap - bootstrap-time set-global
     print-report
 
-    "deploy-vocab" get [
-        "tools.deploy.shaker" run
+    "staging" get [
+        "vocab:bootstrap/finish-staging.factor" run-file
     ] [
-        "staging" get [
-            "vocab:bootstrap/finish-staging.factor" run-file
-        ] [
-            "vocab:bootstrap/finish-bootstrap.factor" run-file
-        ] if
-
-        "output-image" get save-image-and-exit
+        "vocab:bootstrap/finish-bootstrap.factor" run-file
     ] if
+
+    f error set-global
+    f original-error set-global
+    f error-continuation set-global
+    "output-image" get save-image-and-exit
 ] [
     drop
     [