MirOS Manual: B::Asmdata(3p)

ext::B::B::AsmdatPerl)Programmers Referenceext::B::B::Asmdata(3p)


     B::Asmdata - Autogenerated data about Perl ops, used to gen-
     erate bytecode


             use B::Asmdata qw(%insn_data @insn_name @optype @specialsv_name);


     Provides information about Perl ops in order to generate
     bytecode via a bunch of exported variables.  Its mostly used
     by B::Assembler and B::Disassembler.

           my($bytecode_num, $put_sub, $get_meth) = @$insn_data{$op_name};

         For a given $op_name (for example, 'cop_label',
         'sv_flags', etc...) you get an array ref containing the
         bytecode number of the op, a reference to the subroutine
         used to 'PUT', and the name of the method used to 'GET'.

           my $op_name = $insn_name[$bytecode_num];

         A simple mapping of the bytecode number to the name of
         the op. Suitable for using with %insn_data like so:

           my $op_info = $insn_data{$insn_name[$bytecode_num]};

           my $op_type = $optype[$op_type_num];

         A simple mapping of the op type number to its type (like
         'COP' or 'BINOP').

           my $sv_name = $specialsv_name[$sv_index];

         Certain SV types are considered 'special'.  They're
         represented by B::SPECIAL and are referred to by a
         number from the specialsv_list. This array maps that
         number back to the name of the SV (like 'Nullsv' or


     Malcolm Beattie, "mbeattie@sable.ox.ac.uk"

perl v5.8.8                2005-02-05                           1

Generated on 2017-04-03 16:26:17 by $MirOS: src/scripts/roff2htm,v 1.88 2017/01/29 00:51:06 tg Exp $

These manual pages and other documentation are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002–2017 The MirOS Project, Germany.
This product includes material provided by mirabilos.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.