Make alien.c-types reloadable
parent
4373cb1630
commit
cece726e54
|
@ -3,7 +3,7 @@
|
|||
USING: byte-arrays arrays generator.registers assocs
|
||||
kernel kernel.private libc math namespaces parser sequences
|
||||
strings words assocs splitting math.parser cpu.architecture
|
||||
alien quotations system ;
|
||||
alien quotations system compiler.units ;
|
||||
IN: alien.c-types
|
||||
|
||||
TUPLE: c-type
|
||||
|
@ -227,10 +227,14 @@ M: long-long-type box-return ( type -- )
|
|||
define-out ;
|
||||
|
||||
: expand-constants ( c-type -- c-type' )
|
||||
#! We use word-def call instead of execute to get around
|
||||
#! staging violations
|
||||
dup array? [
|
||||
unclip >r [ dup word? [ execute ] when ] map r> add*
|
||||
unclip >r [ dup word? [ word-def call ] when ] map
|
||||
r> add*
|
||||
] when ;
|
||||
|
||||
[
|
||||
[ alien-cell ]
|
||||
[ set-alien-cell ]
|
||||
bootstrap-cell
|
||||
|
@ -354,3 +358,4 @@ bootstrap-cell
|
|||
"ushort*" define-primitive-type
|
||||
|
||||
[ string>u16-alien ] "ushort*" c-type set-c-type-prep
|
||||
] with-compilation-unit
|
||||
|
|
Loading…
Reference in New Issue