Documentation
¶
Overview ¶
Instuctionset struct of Weblang bytecode files
Index ¶
Constants ¶
const InstructionSetType_CallObjMethod uint16 = 0x0009
Weblang Instruction type: call object method. At runtime would create WebCall struct and would call FunctionHandler
const InstructionSetType_DeclareVar uint16 = 0x0002
Weblang Instruction type: declare new variable in current scope
const InstructionSetType_GetCurrentRequestParam uint16 = 0x0008
Weblang Instruction type: getCurrentRequestParam(name) buil-in function to get current request parameter by name. Works only in controller class
const InstructionSetType_GetCurrentRequestUrl uint16 = 0x0007
Weblang Instruction type: getCurrentRequestUrl() buil-in function to get current request url. Works only in controller class
const InstructionSetType_GetModel uint16 = 0x000a
Weblang Instruction type: get binded model class. Works only with repository and controller class types
const InstructionSetType_IfElse uint16 = 0x0005
WebLang Instruction type: if sentence else code block
const InstructionSetType_IfMain uint16 = 0x0004
WebLang Instruction type: if sentence main code block
const InstructionSetType_LoadViewTemplate uint16 = 0x0006
Weblang Instruction type: loadView(model) built-in function to load html template and parse with html/template package. Works only with controller class type
const InstructionSetType_PrintLog uint16 = 0x0001
Weblang Instruction type: printLog(format, args) built-in function to print log message. Works with all class types
const InstructionSetType_ReturnDataModel uint16 = 0x000c
Weblang Instruction type: return data model. Works only with repository class type
const InstructionSetType_SetModel uint16 = 0x000b
Weblang Instruction type: set binded model class. Works only with repository class type
const InstructionSetType_UpdateVarValue uint16 = 0x0003
Weblang Instruction type: update variable value only if reachable in current scope
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstructionSet ¶
type InstructionSet struct {
Header *InstructionSetHeader // Heaader info: index number, type and length
ByteCode []byte // data array (bytes)
}
Dynamic length instruction set for Weblang Vm
type InstructionSetHeader ¶
type InstructionSetHeader struct {
Index uint64 // Index number
Type uint16 // InstructionSet type
Length uint64 // Instruction block size (bytes)
}
Header struct for dynamic length instruction block for Weblang VM