in reply to Re: Perl bytecode
in thread Perl bytecode
Sample Terse output:
>perl -MO=Terse -e "print qq{Hello, world!\n};" LISTOP (0x1ab0b04) leave [1] OP (0x1ab8bac) enter COP (0x1ab0b3c) nextstate LISTOP (0x1ab0bb8) print OP (0x1ab0b90) pushmark SVOP (0x1ab0be0) const SPECIAL #0 Nullsv -e syntax OK
The Concise equivalent:
>perl -MO=Concise -e "print qq{Hello, world!\n};" 6 <@> leave[t1] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 5 -e:1) v ->3 5 <@> print vK ->6 3 <0> pushmark s ->4 4 <$> const(SPECIAL Null)[t2] s ->5 -e syntax OK
The Debug equivalent:
>perl -MO=Debug -e "print qq{Hello, world!\n};" LISTOP (0x1bb2ec0) op_next 0x0 op_sibling 0x0 op_ppaddr PL_ppaddr[OP_LEAVE] op_targ 1 op_type 178 op_seq 6612 op_flags 13 op_private 64 op_first 0x1ab8b84 op_last 0x1bb2f84 op_children 3 OP (0x1ab8b84) op_next 0x1bb2f08 op_sibling 0x1bb2f08 op_ppaddr PL_ppaddr[OP_ENTER] op_targ 0 op_type 177 op_seq 6607 op_flags 0 op_private 0 COP (0x1bb2f08) op_next 0x1bb2f5c op_sibling 0x1bb2f84 op_ppaddr PL_ppaddr[OP_NEXTSTATE] op_targ 0 op_type 174 op_seq 6608 op_flags 1 op_private 0 cop_label cop_stashpv main cop_file -e cop_seq 6608 cop_arybase 0 cop_line 1 cop_warnings 0x0 . . .
|
|---|