diff --git a/basis/alien/c-types/c-types-docs.factor b/basis/alien/c-types/c-types-docs.factor index 390477dcac7..8b5a526e827 100755 --- a/basis/alien/c-types/c-types-docs.factor +++ b/basis/alien/c-types/c-types-docs.factor @@ -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." } ; diff --git a/basis/alien/c-types/c-types.factor b/basis/alien/c-types/c-types.factor index 0ed111c077f..9aea6fe252e 100755 --- a/basis/alien/c-types/c-types.factor +++ b/basis/alien/c-types/c-types.factor @@ -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 diff --git a/basis/compiler/tree/propagation/propagation-tests.factor b/basis/compiler/tree/propagation/propagation-tests.factor index b436b21329f..79016585f6b 100644 --- a/basis/compiler/tree/propagation/propagation-tests.factor +++ b/basis/compiler/tree/propagation/propagation-tests.factor @@ -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* ] { } inlined? ] unit-test diff --git a/basis/tools/deploy/shaker/shaker.factor b/basis/tools/deploy/shaker/shaker.factor index 42d1ee2a9fb..2b4c38beaf8 100755 --- a/basis/tools/deploy/shaker/shaker.factor +++ b/basis/tools/deploy/shaker/shaker.factor @@ -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