Ticket #133 (new bug) — at Initial Version

Opened 13 years ago

Last modified 12 years ago

methodtailcall broken

Reported by: kjs Owned by:
Priority: major Milestone:
Component: core Version: trunk
Severity: medium Keywords: method tailcall
Cc: parrot-dev@… Language:
Patch status: Platform:

Description

methodtailcalls are broken. The next example shows this. the call to foo() fails, whereas the semantic equivalent call to bar() is ok. foo() returns with a method tailcall, bar() returns with a normal return statement.

.sub main

say "ok 1" $P0 = foo() ## fails :-( $P0 = bar() ## ok. say "ok 2" $I0 = $P0 say "ok 3" say $I0 say "ok 4"

.end

.sub foo

.local pmc p p = new "Class" .tailcall p."attributes"()

.end

.sub bar

.local pmc p p = new "Class" $P0 = p."attributes"() .return ($P0)

.end

Note: See TracTickets for help on using tickets.