Tweak stuff to reduce deploy image size
parent
5663707cda
commit
620103351e
|
@ -7,7 +7,7 @@ math.parser classes alien.arrays alien.c-types alien.strings
|
||||||
alien.structs alien.syntax cpu.architecture alien inspector
|
alien.structs alien.syntax cpu.architecture alien inspector
|
||||||
quotations assocs kernel.private threads continuations.private
|
quotations assocs kernel.private threads continuations.private
|
||||||
libc combinators compiler.errors continuations layouts accessors
|
libc combinators compiler.errors continuations layouts accessors
|
||||||
;
|
init ;
|
||||||
IN: alien.compiler
|
IN: alien.compiler
|
||||||
|
|
||||||
TUPLE: #alien-node < node return parameters abi ;
|
TUPLE: #alien-node < node return parameters abi ;
|
||||||
|
@ -336,7 +336,7 @@ M: #alien-indirect generate-node
|
||||||
! this hashtable, they will all be blown away by code GC, beware
|
! this hashtable, they will all be blown away by code GC, beware
|
||||||
SYMBOL: callbacks
|
SYMBOL: callbacks
|
||||||
|
|
||||||
callbacks global [ H{ } assoc-like ] change-at
|
[ H{ } clone callbacks set-global ] "alien.compiler" add-init-hook
|
||||||
|
|
||||||
: register-callback ( word -- ) dup callbacks get set-at ;
|
: register-callback ( word -- ) dup callbacks get set-at ;
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ M: alien-callback-error summary
|
||||||
drop "Words calling ``alien-callback'' must be compiled with the optimizing compiler." ;
|
drop "Words calling ``alien-callback'' must be compiled with the optimizing compiler." ;
|
||||||
|
|
||||||
: callback-bottom ( node -- )
|
: callback-bottom ( node -- )
|
||||||
xt>> [ word-xt drop <alien> ] curry
|
xt>> [ [ register-callback ] [ word-xt drop <alien> ] bi ] curry
|
||||||
recursive-state get infer-quot ;
|
recursive-state get infer-quot ;
|
||||||
|
|
||||||
\ alien-callback [
|
\ alien-callback [
|
||||||
|
@ -354,7 +354,7 @@ M: alien-callback-error summary
|
||||||
pop-literal nip >>abi
|
pop-literal nip >>abi
|
||||||
pop-parameters >>parameters
|
pop-parameters >>parameters
|
||||||
pop-literal nip >>return
|
pop-literal nip >>return
|
||||||
gensym dup register-callback >>xt
|
gensym >>xt
|
||||||
callback-bottom
|
callback-bottom
|
||||||
] "infer" set-word-prop
|
] "infer" set-word-prop
|
||||||
|
|
||||||
|
|
|
@ -35,10 +35,8 @@ IN: bunny.model
|
||||||
[ normalize ] map ;
|
[ normalize ] map ;
|
||||||
|
|
||||||
: read-model ( stream -- model )
|
: read-model ( stream -- model )
|
||||||
"Reading model" print flush [
|
ascii [ parse-model ] with-file-reader
|
||||||
ascii [ parse-model ] with-file-reader
|
[ normals ] 2keep 3array ;
|
||||||
[ normals ] 2keep 3array
|
|
||||||
] time ;
|
|
||||||
|
|
||||||
: model-path "bun_zipper.ply" temp-file ;
|
: model-path "bun_zipper.ply" temp-file ;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespaces continuations layouts accessors ;
|
||||||
[ ] [ "sudoku" shake-and-bake ] unit-test
|
[ ] [ "sudoku" shake-and-bake ] unit-test
|
||||||
|
|
||||||
[ t ] [
|
[ t ] [
|
||||||
cell 8 = 30 15 ? 100000 * small-enough?
|
cell 8 = 20 10 ? 100000 * small-enough?
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ ] [ "hello-ui" shake-and-bake ] unit-test
|
[ ] [ "hello-ui" shake-and-bake ] unit-test
|
||||||
|
@ -37,6 +37,12 @@ namespaces continuations layouts accessors ;
|
||||||
cell 8 = 40 20 ? 100000 * small-enough?
|
cell 8 = 40 20 ? 100000 * small-enough?
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
[ ] [ "maze" shake-and-bake ] unit-test
|
||||||
|
|
||||||
|
[ t ] [
|
||||||
|
cell 8 = 30 15 ? 100000 * small-enough?
|
||||||
|
] unit-test
|
||||||
|
|
||||||
[ ] [ "bunny" shake-and-bake ] unit-test
|
[ ] [ "bunny" shake-and-bake ] unit-test
|
||||||
|
|
||||||
[ t ] [
|
[ t ] [
|
||||||
|
|
|
@ -108,6 +108,8 @@ IN: tools.deploy.shaker
|
||||||
|
|
||||||
: stripped-globals ( -- seq )
|
: stripped-globals ( -- seq )
|
||||||
[
|
[
|
||||||
|
"callbacks" "alien.compiler" lookup ,
|
||||||
|
|
||||||
{
|
{
|
||||||
bootstrap.stage2:bootstrap-time
|
bootstrap.stage2:bootstrap-time
|
||||||
continuations:error
|
continuations:error
|
||||||
|
@ -142,6 +144,7 @@ IN: tools.deploy.shaker
|
||||||
|
|
||||||
{
|
{
|
||||||
gensym
|
gensym
|
||||||
|
name>char-hook
|
||||||
classes:class-and-cache
|
classes:class-and-cache
|
||||||
classes:class-not-cache
|
classes:class-not-cache
|
||||||
classes:class-or-cache
|
classes:class-or-cache
|
||||||
|
@ -167,6 +170,8 @@ IN: tools.deploy.shaker
|
||||||
vocabs:load-vocab-hook
|
vocabs:load-vocab-hook
|
||||||
word
|
word
|
||||||
} %
|
} %
|
||||||
|
|
||||||
|
{ } { "optimizer.math.partial" } strip-vocab-globals %
|
||||||
] when
|
] when
|
||||||
|
|
||||||
strip-prettyprint? [
|
strip-prettyprint? [
|
||||||
|
|
Loading…
Reference in New Issue