From 1877a5ddd55d5c89afe14200c7451456df9ab8e2 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 12 May 2009 04:02:08 -0500 Subject: [PATCH] bootstrap.stage2: strip out UTF16 encoding. It will only be loaded again if needed. This reduces deployed binary size --- basis/bootstrap/stage2.factor | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/basis/bootstrap/stage2.factor b/basis/bootstrap/stage2.factor index 9d19e4a231..3cbe155dd2 100644 --- a/basis/bootstrap/stage2.factor +++ b/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