instructionset

package
v0.6.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2022 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Instuctionset struct of Weblang bytecode files

Index

Constants

View Source
const InstructionSetType_CallObjMethod uint16 = 0x0009

Weblang Instruction type: call object method. At runtime would create WebCall struct and would call FunctionHandler

View Source
const InstructionSetType_DeclareVar uint16 = 0x0002

Weblang Instruction type: declare new variable in current scope

View Source
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

View Source
const InstructionSetType_GetCurrentRequestUrl uint16 = 0x0007

Weblang Instruction type: getCurrentRequestUrl() buil-in function to get current request url. Works only in controller class

View Source
const InstructionSetType_GetModel uint16 = 0x000a

Weblang Instruction type: get binded model class. Works only with repository and controller class types

View Source
const InstructionSetType_IfElse uint16 = 0x0005

WebLang Instruction type: if sentence else code block

View Source
const InstructionSetType_IfMain uint16 = 0x0004

WebLang Instruction type: if sentence main code block

View Source
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

View Source
const InstructionSetType_PrintLog uint16 = 0x0001

Weblang Instruction type: printLog(format, args) built-in function to print log message. Works with all class types

View Source
const InstructionSetType_ReturnDataModel uint16 = 0x000c

Weblang Instruction type: return data model. Works only with repository class type

View Source
const InstructionSetType_SetModel uint16 = 0x000b

Weblang Instruction type: set binded model class. Works only with repository class type

View Source
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  int64  // Index number
	Type   uint16 // InstructionSet type
	Length int64  // Instruction block size (bytes)
}

Header struct for dynamic length instruction block for Weblang VM

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL