Dan Sugalski writes:
> I wouldn't worry about this too much. If it's all keyed off an opcode of
> some sort ("Current line info"), we could easily just strip those opcodes
> out. They won't take up that much space relative to the rest of the
> program, but I can see some sort of runtime overhead if we have each
> 'current line' op smack a pointer to the current line info into the
> interpreter structure or something.

That'd be an incentive to write one-liners ... they'd be faster :-)

Wouldn't removing opcodes make it impossible for you to give the user
a position in the optree that they can turn back into a point in their
program?  It seems like you'd only be able to say "division by zero at
position 4501 of the opcode stream" and position 4501 has a different
opcode in stripped and unstripped programs.  You'd have to recompile
your Perl program, and have a pseudo-strip that calculates where 4501
in the stripped opcode tree would be, then tells you where in your
program that corresponds to.

I could also be missing the point. :)

Nat

Reply via email to