Permalink
Browse files

bootstrap.stage2: strip out UTF16 encoding. It will only be loaded ag…

…ain if needed. This reduces deployed binary size
  • Loading branch information...
1 parent f2ab6a2 commit 7fc7f5da2e47c90a5ca9e66d9197cbb3b040cde5 Slava Pestov committed May 12, 2009
Showing with 12 additions and 0 deletions.
  1. +12 −0 basis/bootstrap/stage2.factor
@@ -12,6 +12,16 @@ SYMBOL: core-bootstrap-time
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" [ child-vocabs [ forget-vocab ] each ] bi@
+ ] with-compilation-unit
+ ] when ;
+
: default-image-name ( -- string )
vm file-name os windows? [ "." split1-last drop ] when
".image" append resource-path ;
@@ -55,6 +65,8 @@ SYMBOL: bootstrap-time
"math compiler threads help io tools ui ui.tools unicode handbook" "include" set-global
"" "exclude" set-global
+ strip-encodings
+
(command-line) parse-command-line
! Set dll paths

0 comments on commit 7fc7f5d

Please sign in to comment.