Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IMCC tracing, leaving subroutines

6 views
Skip to first unread message

William Coleda

unread,
Nov 22, 2004, 8:18:14 AM11/22/04
to Perl 6 Internals
Given IMC like:

.sub main @MAIN
$P1 = whee()
print $P1
.end

.sub whee
$P2 = new PerlString
$P2 = "leo\n"
.return ($P2)
.end

We get a trace like:
0 set P16, PMC_C[2] - P16=PMCNULL,
3 set I0, 1 - I0=0,
6 set I1, 0 - I1=0,
9 set I2, 0 - I2=0,
12 set I3, 0 - I3=1,
15 set I4, 0 - I4=0,
18 set P0, P16 - P0=PMCNULL, P16=Sub=PMC(0xf90a98 Adr:0x190b580)
21 invokecc
# Calling sub 'whee'
# in file '(unknown file)' near line -1
28 new P30, 34 - P30=PMCNULL,
31 set P30, "leo\n" - P30=PerlString=PMC(0xf90a38 Str:"(null)"),
34 set P5, P30 - P5=PMCNULL, P30=PerlString=PMC(0xf90a38 Str:"leo\n")
37 set I0, 1 - I0=1,
40 set I1, 0 - I1=0,
43 set I2, 0 - I2=0,
46 set I3, 1 - I3=0,
49 set I4, 0 - I4=0,
52 returncc
22 set P30, P5 - P30=PMCNULL, P5=PerlString=PMC(0xf90a38 Str:"leo\n")
25 print P30 - P30=PerlString=PMC(0xf90a38 Str:"leo\n")
leo
27 end

After the returncc, is it possible to indicate what routine we are returning into?


Leopold Toetsch

unread,
Nov 22, 2004, 9:03:19 AM11/22/04
to William Coleda, perl6-i...@perl.org
William Coleda <wi...@coleda.com> wrote:

> After the returncc, is it possible to indicate what routine we are
> returning into?

Good idea. Implemented (location printing needs cleanup, so just a
current hack).

leo

0 new messages