Tweaks to reduce deployed image size
parent
cb497f009b
commit
7ea8832556
|
@ -13,8 +13,7 @@ HELP: heap-size
|
|||
{ $values { "type" string } { "size" math:integer } }
|
||||
{ $description "Outputs the number of bytes needed for a heap-allocated value of this C type." }
|
||||
{ $examples
|
||||
"On a 32-bit system, you will get the following output:"
|
||||
{ $unchecked-example "USE: alien\n\"void*\" heap-size ." "4" }
|
||||
{ $example "USING: alien alien.c-types prettyprint ;\nint heap-size ." "4" }
|
||||
}
|
||||
{ $errors "Throws a " { $link no-c-type } " error if the type does not exist." } ;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ ERROR: no-c-type name ;
|
|||
PREDICATE: c-type-word < word
|
||||
"c-type" word-prop ;
|
||||
|
||||
UNION: c-type-name string c-type-word ;
|
||||
UNION: c-type-name string word ;
|
||||
|
||||
! C type protocol
|
||||
GENERIC: c-type ( name -- type ) foldable
|
||||
|
|
|
@ -9,7 +9,7 @@ compiler.tree.propagation.info compiler.tree.def-use
|
|||
compiler.tree.debugger compiler.tree.checker
|
||||
slots.private words hashtables classes assocs locals
|
||||
specialized-arrays system sorting math.libm
|
||||
math.intervals quotations effects alien ;
|
||||
math.intervals quotations effects alien alien.data ;
|
||||
FROM: math => float ;
|
||||
SPECIALIZED-ARRAY: double
|
||||
IN: compiler.tree.propagation.tests
|
||||
|
@ -894,3 +894,6 @@ M: tuple-with-read-only-slot clone
|
|||
[ t ] [ [ >fixnum dup 0 >= [ 16 /i ] when ] { /i fixnum/i fixnum/i-fast } inlined? ] unit-test
|
||||
[ f ] [ [ >fixnum dup 0 >= [ 16 /i ] when ] { fixnum-shift-fast } inlined? ] unit-test
|
||||
[ f ] [ [ >float dup 0 >= [ 16 /i ] when ] { /i float/f } inlined? ] unit-test
|
||||
|
||||
! We want this to inline
|
||||
[ t ] [ [ void* <c-direct-array> ] { <c-direct-array> } inlined? ] unit-test
|
||||
|
|
|
@ -196,6 +196,10 @@ IN: tools.deploy.shaker
|
|||
"word-style"
|
||||
} %
|
||||
] when
|
||||
|
||||
deploy-c-types? get [
|
||||
{ "c-type" "struct-slots" "struct-size" "struct-align" } %
|
||||
] unless
|
||||
] { } make ;
|
||||
|
||||
: strip-words ( props -- )
|
||||
|
@ -345,6 +349,8 @@ IN: tools.deploy.shaker
|
|||
|
||||
{ } { "math.partial-dispatch" } strip-vocab-globals %
|
||||
|
||||
{ } { "math.vectors.simd" } strip-vocab-globals %
|
||||
|
||||
{ } { "peg" } strip-vocab-globals %
|
||||
] when
|
||||
|
||||
|
|
Loading…
Reference in New Issue