From 3323284db41126bb8890be9cd6f19a1f39a2c76b Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 5 Sep 2010 21:27:39 -0700 Subject: [PATCH] stack-checker.alien: get a bit more inlining going with callbacks, to expose another bug --- basis/compiler/tree/cleanup/cleanup-tests.factor | 5 +++++ basis/stack-checker/alien/alien.factor | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/basis/compiler/tree/cleanup/cleanup-tests.factor b/basis/compiler/tree/cleanup/cleanup-tests.factor index 2c5c469201..88e7895c89 100644 --- a/basis/compiler/tree/cleanup/cleanup-tests.factor +++ b/basis/compiler/tree/cleanup/cleanup-tests.factor @@ -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 diff --git a/basis/stack-checker/alien/alien.factor b/basis/stack-checker/alien/alien.factor index 6e9314792f..149168532f 100644 --- a/basis/stack-checker/alien/alien.factor +++ b/basis/stack-checker/alien/alien.factor @@ -109,7 +109,7 @@ TUPLE: alien-callback-params < alien-node-params xt ; : callback-bottom ( params -- ) "( callback )" >>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 ;