Ticket #1172 (closed bug: fixed)
Lexical Associations Not Thawed with Tailcalls
Reported by: | chromatic | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | none | Version: | |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: |
Description
From t/pmc/exception.t test #26:
.sub main :main .local pmc a .lex 'a', a a = new 'Integer' a = 42 push_eh handler exit 0 handler: .tailcall exit_handler() .end
.sub exit_handler :outer(main) say "at_exit" .local pmc a a = find_lex 'a' print 'a = ' say a .end
When run as PIR, the output shows that a is 42. When compiled to PBC and run from PBC, this produces:
at_exit a = Null PMC in say current instr.: 'exit_handler' pc 24 (t/op/exceptions_23.pir:17)
Remove .tailcall, recompile to PBC, and you get the correct answer.
-- c
Change History
Note: See
TracTickets for help on using
tickets.