NAME
Parrot::Opcode - Read opcode definitions
SYNOPSIS
use Parrot::Opcode;
%opcodes = Parrot::Opcode::read_ops();
DESCRIPTION
The read_ops() function parses the Parrot opcode_table file, and returns the contents as a hash. The hash key is the opcode name; values are hashrefs containing the following fields:
- CODE
-
The opcode number.
- ARGS
-
The opcode argument count.
- TYPES
-
The opcode argument types, as an arrayref.
- FUNC
-
The name of the C function implementing this op.
read_ops() takes an optional argument: the file to read the opcode table from.
The fingerprint() function returns a checksum for the opcode table. It is used to ensure that bytecode is only executed if it was generated for a version of parrot supporting the appropriate opcodes.