stack-checker.alien: get a bit more inlining going with callbacks, to expose another bug

db4
Slava Pestov 2010-09-05 21:27:39 -07:00
parent ee2169eb6c
commit 3323284db4
2 changed files with 6 additions and 1 deletions

View File

@ -541,3 +541,8 @@ USING: alien alien.c-types ;
[ char { char char } cdecl [ + ] alien-callback ]
\ fixnum+fast inlined?
] unit-test
[ t ] [
[ void { } cdecl [ ] alien-callback void { } cdecl alien-indirect ]
\ >c-ptr inlined?
] unit-test

View File

@ -109,7 +109,7 @@ TUPLE: alien-callback-params < alien-node-params xt ;
: callback-bottom ( params -- )
"( callback )" <uninterned-word> >>xt
xt>> '[ _ callback-xt ] infer-quot-here ;
xt>> '[ _ callback-xt { alien } declare ] infer-quot-here ;
: callback-return-quot ( ctype -- quot )
return>> [ [ ] ] [ c-type c-type-unboxer-quot ] if-void ;