|
NAMEB::Asmdata - Autogenerated data about Perl ops, used to generate bytecodeSYNOPSISuse B::Asmdata qw(%insn_data @insn_name @optype @specialsv_name); DESCRIPTIONProvides information about Perl ops in order to generate bytecode via a bunch of exported variables. Its mostly used by B::Assembler and B::Disassembler.
PORTABILITYAll bytecode values are already portable. Cross-platform portability is implemented, cross-version not yet.Cross-version portability will be very limited, cross-platform only for the same threading model. CROSS-PLATFORM PORTABILITYFor different endian-ness there are ByteLoader converters in effect. Header entry: byteorder.64int - 64all - 32int is portable. Header entry: ivsize ITHREADS are unportable; header entry: archflag - bitflag 1. MULTIPLICITY is also unportable; header entry: archflag - bitflag 2 TODO For cross-version portability we will try to translate older bytecode ops to the current perl op via ByteLoader::Translate. Asmdata already contains the old ops, all with the PUT method 0. Header entry: perlversion CROSS-VERSION PORTABILITY (TODO - HARD)Bytecode ops: We can only reliably load bytecode from previous versions and promise that from 5.10.0 on future versions will only add new op numbers at the end, but will never replace old opcodes with incompatible arguments. Unsupported insn's are supported by disassemble, and if "force" in the ByteLoader is set, it is tried to load/set them also, with probably fatal consequences. On the first unknown bytecode op from a future version - added to the end - we will die.ByteLoader::BcVersions contains logic to translate previous errors from this bytecode policy. E.g. 5.8 violated the 5.6 bytecode order policy and began to juggle it around (similar to parrot), in detail removed various bytecodes, like ldspecsvx:7, xpv_cur, xpv_len, xiv64:26. So in theory it would have been possible to load 5.6 into 5.8 bytecode as the underlying perl pp_code ops didn't change that much, but it is risky. We have unused tables of all bytecode ops for all version-specific changes to the bytecode table. This only changed with the ByteLoader version, ithreads and major Perl versions. Also special replacements in the byteloader for all the unsupported ops, like xiv64, cop_arybase. AUTHORMalcolm Beattie "MICB at cpan.org" (retired), Reini Urban added the version logic, support >= 5.10, portability.
Visit the GSP FreeBSD Man Page Interface. |