Rice is a part of every healthy diet
parent
9224b1675b
commit
c6db662b3b
|
@ -42,6 +42,7 @@ IN: tools.deploy.shaker
|
||||||
] when
|
] when
|
||||||
strip-dictionary? [
|
strip-dictionary? [
|
||||||
"compiler.units" init-hooks get delete-at
|
"compiler.units" init-hooks get delete-at
|
||||||
|
"tools.vocabs" init-hooks get delete-at
|
||||||
] when ;
|
] when ;
|
||||||
|
|
||||||
: strip-debugger ( -- )
|
: strip-debugger ( -- )
|
||||||
|
@ -88,16 +89,28 @@ IN: tools.deploy.shaker
|
||||||
] [
|
] [
|
||||||
"Remaining word properties:" print
|
"Remaining word properties:" print
|
||||||
[ props>> keys ] gather .
|
[ props>> keys ] gather .
|
||||||
] bi ;
|
] [
|
||||||
|
H{ } clone '[
|
||||||
|
[ [ _ [ ] cache ] map ] change-props drop
|
||||||
|
] each
|
||||||
|
] tri ;
|
||||||
|
|
||||||
: stripped-word-props ( -- seq )
|
: stripped-word-props ( -- seq )
|
||||||
[
|
[
|
||||||
|
strip-dictionary? deploy-compiler? get and [
|
||||||
|
{
|
||||||
|
"combination"
|
||||||
|
"members"
|
||||||
|
"methods"
|
||||||
|
} %
|
||||||
|
] when
|
||||||
|
|
||||||
strip-dictionary? [
|
strip-dictionary? [
|
||||||
{
|
{
|
||||||
|
"alias"
|
||||||
"boa-check"
|
"boa-check"
|
||||||
"cannot-infer"
|
"cannot-infer"
|
||||||
"coercer"
|
"coercer"
|
||||||
"combination"
|
|
||||||
"compiled-effect"
|
"compiled-effect"
|
||||||
"compiled-generic-uses"
|
"compiled-generic-uses"
|
||||||
"compiled-uses"
|
"compiled-uses"
|
||||||
|
@ -127,12 +140,10 @@ IN: tools.deploy.shaker
|
||||||
"local-writer?"
|
"local-writer?"
|
||||||
"local?"
|
"local?"
|
||||||
"macro"
|
"macro"
|
||||||
"members"
|
|
||||||
"memo-quot"
|
"memo-quot"
|
||||||
"mixin"
|
"mixin"
|
||||||
"method-class"
|
"method-class"
|
||||||
"method-generic"
|
"method-generic"
|
||||||
"methods"
|
|
||||||
"modular-arithmetic"
|
"modular-arithmetic"
|
||||||
"no-compile"
|
"no-compile"
|
||||||
"optimizer-hooks"
|
"optimizer-hooks"
|
||||||
|
@ -145,6 +156,8 @@ IN: tools.deploy.shaker
|
||||||
"reader"
|
"reader"
|
||||||
"reading"
|
"reading"
|
||||||
"recursive"
|
"recursive"
|
||||||
|
"register"
|
||||||
|
"register-size"
|
||||||
"shuffle"
|
"shuffle"
|
||||||
"slot-names"
|
"slot-names"
|
||||||
"slots"
|
"slots"
|
||||||
|
@ -226,9 +239,12 @@ IN: tools.deploy.shaker
|
||||||
"alarms"
|
"alarms"
|
||||||
"tools"
|
"tools"
|
||||||
"io.launcher"
|
"io.launcher"
|
||||||
|
"random"
|
||||||
} strip-vocab-globals %
|
} strip-vocab-globals %
|
||||||
|
|
||||||
strip-dictionary? [
|
strip-dictionary? [
|
||||||
|
"libraries" "alien" lookup ,
|
||||||
|
|
||||||
{ } { "cpu" } strip-vocab-globals %
|
{ } { "cpu" } strip-vocab-globals %
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
18
vm/image.c
18
vm/image.c
|
@ -169,8 +169,26 @@ DEFINE_PRIMITIVE(save_image)
|
||||||
save_image(unbox_native_string());
|
save_image(unbox_native_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void strip_compiled_quotations(void)
|
||||||
|
{
|
||||||
|
begin_scan();
|
||||||
|
CELL obj;
|
||||||
|
while((obj = next_object()) != F)
|
||||||
|
{
|
||||||
|
if(type_of(obj) == QUOTATION_TYPE)
|
||||||
|
{
|
||||||
|
F_QUOTATION *quot = untag_object(obj);
|
||||||
|
quot->compiledp = F;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gc_off = false;
|
||||||
|
}
|
||||||
|
|
||||||
DEFINE_PRIMITIVE(save_image_and_exit)
|
DEFINE_PRIMITIVE(save_image_and_exit)
|
||||||
{
|
{
|
||||||
|
/* This reduces deployed image size */
|
||||||
|
strip_compiled_quotations();
|
||||||
|
|
||||||
F_CHAR *path = unbox_native_string();
|
F_CHAR *path = unbox_native_string();
|
||||||
|
|
||||||
REGISTER_C_STRING(path);
|
REGISTER_C_STRING(path);
|
||||||
|
|
Loading…
Reference in New Issue