Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[java] Fix code-gen of block setup, so now invocation bottoms out.
  • Loading branch information
jnthn committed Jan 16, 2011
1 parent 422f867 commit d944750
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion java/compiler/JST2Java.pm
Expand Up @@ -215,7 +215,8 @@ our multi sub java_for(JST::New $new) {
$code := $code ~ " " ~ $new.type ~ " $*LAST_TEMP = new ";
$code := $code ~ $new.type;
if $new.type eq 'RakudoCodeRef.IFunc_Body' {
$code := $code ~ "() \{ public RakudoObject Invoke( ThreadContext TC, RakudoObject Obj, RakudoObject Cap ) \{ return ((RakudoCodeRef.Instance)Obj).Body.Invoke(TC, Obj, Cap);\}\}";
my $block_name := (@($new))[0];
$code := $code ~ "() \{ public RakudoObject Invoke( ThreadContext TC, RakudoObject Obj, RakudoObject Cap ) \{ return $block_name(TC, Obj, Cap);\}\}";
}
else {
$code := $code ~ "(" ~ pir::join(', ', @arg_names) ~ ")";
Expand Down

0 comments on commit d944750

Please sign in to comment.