[EMAIL PROTECTED] wrote:

Leo / Dan --

Have we allocated PASM or IMC directives to replace the setline, setfile,
and setpackage ops?

    * .file <name>
    * .line [<filename>] <line>
    * .package <name>

Should we have an indicator of the name of a sub, too?


We don't need .file/.line, imcc knows these, and passes the information in the PBC metadata already to jit_debug. The parrot debugger still needs work.
For HL file/line information I'd rather use (the already in perl6/P6C implemented) comment syntax, like:


#line 13 "mops.p6"

$ imcc -d -o p.pbc primes.pasm
$ pdump -t p.pbc
...
BYTECODE_DB => [ # offs 0xa0(160) = op_count 40, itype 0, id 0, size 32, ...
00a4: 00000005 00000007 00000008 00000009
00a8: 0000000a 0000000b 0000000c 0000000f 00000010 00000012 00000013 00000017
00b0: 00000018 00000019 0000001b 0000001c 00000020 00000021 00000022 00000023
00b8: 00000024 00000025 00000026 00000027 00000028 00000029 0000002a 0000002b
00c0: 00000000 00000000 00000000 00000000 6d697270 702e7365 006d7361 00000000
]
In the last bytes you can decipher the filename.



Regards,

-- Gregor

leo




Reply via email to