develooper Front page | perl.perl5.porters | Postings from December 2001

B::Concise, ithreads, and constants in the pad

From:
Robin Houston
Date:
December 19, 2001 06:23
Subject:
B::Concise, ithreads, and constants in the pad
Message ID:
20011219142332.A20573@puffinry.freeserve.co.uk
Under ithreads, constants are stuffed into the pad rather than being
left in the optree. For the OP_CONST, op_sv is left null and op_targ
is an index into the pad.

B::Concise handles that up to a point. For example, under ithreads:

[robin@penderel perl@13687]$ ./perl -Ilib -MO=Concise -e 'print 23'
23 <@> leave[t1] vKP/REFC ->(end)
1y    <0> enter ->1z
1z    <;> nextstate(main 10 -e:1) v ->20
22    <@> print vK ->23
20       <0> pushmark s ->21
21       <$> const(SPECIAL Null)[t1] s ->22
-e syntax OK

The [t1] indicates the value of op_targ.

But ought it to show the *value* of the constant as well? It would
certainly make the output more useful.

 .robin.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About