Chunk

This is the compiled form of a program. It includes a table of constants that all functions under the same compilation share.

Members

Functions

serialize
ubyte[] serialize()

serialize to raw bytes that can be written and read to files

Static functions

deserialize
Chunk deserialize(ubyte[] stream)

deserialize chunk from ubyte stream

Static variables

MAGIC
uint MAGIC;

enums used when serializing to and from file in the future

MAGIC_REVERSE
uint MAGIC_REVERSE;

see above

VERSION
ubyte VERSION;

binary file format version

Variables

bytecode
ubyte[] bytecode;

raw byte code

constTable
ConstTable constTable;

const table

debugMap
DebugMap debugMap;

Optional debug map. Each function under the same chunk compilation can be added to this table.

Meta