parrotcode: A Parrot Bytecode File | |
Contents | Perl Modules |
Parrot::PackFile - A Parrot Bytecode File
use Parrot::PackFile;
Parrot::PackFile
contains all the functions required to process a Parrot bytecode file. It is not intended to understand the contents of the bytecode file's segments, but merely to dissect and reconstruct data from the various segments. See docs/parrotbyte.pod for information about the structure of the frozen bycode.
new()
magic()
wordsize()
byteorder()
major()
minor()
flags()
pad()
floattype()
opcodetype()
fixup_table()
Parrot::PackFile::FixupTable
.const_table()
Parrot::PackFile::ConstTable
.byte_code($code)
byte_code()
unpack($string)
Magic: 4-byte signed integer
Fixup: 4-byte length N + N bytes
Const: 4-byte length N + N bytes
BCode: N bytes
unpack_filehandle($filehandle)
unpack_file($file)
pack()
pack_filehandle($filehandle)
pack_file($file)
Parrot::PackFile::ConstTable
Parrot::PackFile::Constant
Parrot::PackFile::FixupTable
Author: Gregor N. Purdy <gregor@focusresearch.com>
Gregor writes:
"Packfile" is a proposed term based on the fact that the file contains more than just byte code, and another language (Java) calls its binary files by a broader notion of what's in them (Class Files). Since Perl has packages, and since we use pack()
to write them, we'll call them PackFiles (at least for now).
That does, however, beg the question of file extension. Should we name the files "foo.pack" instead of "foo.pbc"?
|