Documentation
¶
Index ¶
Constants ¶
View Source
const ByteCodeVersion uint16 = 0x0001
Constant for current Weblang bytecode version
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClassHeader ¶
type ClassHeader struct {
FileFormatText [8]byte // First 8 bytes of file. It's contains "WEBLANG\x0f"
ByteCodeVersion uint16 // Version of bytecode file
InstructionSetCount uint64 // Count of InstructionSet struct
ClassMethodsCount uint64 // Count of ClassMethodHeader struct
}
Header struct for Weblang bytecode class file
func (*ClassHeader) WriteHeader ¶
func (header *ClassHeader) WriteHeader()
Write header data to struct. Use to prepare for write header struct to file
type ClassMethodHeader ¶
type ClassMethodHeader struct {
ClassName [80]byte // Class name
InstructionSetStartIndex uint64 // Index of first InstructionSet block
InstructionSetEndIndex uint64 // Index of last InstructionSet block
}
Header struct for classMethod declaration in Weblang bytecode file
type InstructionSet ¶
type InstructionSet struct {
Index uint64 // Index number
Type uint16 // InstructionSet type
ByteCode [255]byte // Array of 255 bytes
}
255 bytes Instruction block for Weblang VM
Click to show internal directories.
Click to hide internal directories.