Versions in this module Expand all Collapse all v0 v0.1.3 Jan 21, 2023 Changes in this version + const AllErrorsCatchSet + const GrowStackBy + const OptionalCatchSet + var InstructionsExecuted atomic.Int64 + var MaxStackSize atomic.Int32 + var Optimizations = []optimization + func CopyPackagesToSymbols(s *symbols.SymbolTable) + func Format(opcodes []instruction) string + func FormatInstruction(i instruction) string + func GetPackage(name string) (*data.Package, bool) + func GoRoutine(fName string, parentCtx *Context, args []interface{}) + func IsPackage(name string) bool + type ByteCode struct + func New(name string) *ByteCode + func (b *ByteCode) Append(a *ByteCode) + func (b *ByteCode) Call(s *symbols.SymbolTable) (interface{}, error) + func (b *ByteCode) ClearLineNumbers() + func (b *ByteCode) Declaration() *data.FunctionDeclaration + func (b *ByteCode) Disasm(ranges ...int) + func (b *ByteCode) Emit(opcode Opcode, operands ...interface{}) + func (b *ByteCode) EmitAt(address int, opcode Opcode, operands ...interface{}) + func (b *ByteCode) Instruction(address int) *instruction + func (b *ByteCode) Mark() int + func (b *ByteCode) Name() string + func (b *ByteCode) Opcodes() []instruction + func (b *ByteCode) Patch(start, deleteSize int, insert []instruction) + func (b *ByteCode) Remove(address int) + func (b *ByteCode) Run(s *symbols.SymbolTable) error + func (b *ByteCode) Seal() *ByteCode + func (b *ByteCode) SetAddress(mark int, address int) error + func (b *ByteCode) SetAddressHere(mark int) error + func (b *ByteCode) SetDeclaration(fd *data.FunctionDeclaration) *ByteCode + func (b *ByteCode) SetName(name string) *ByteCode + func (b *ByteCode) String() string + func (b ByteCode) NeedsCoerce(kind *data.Type) bool + type CallFrame struct + Line int + Module string + Package string + func (f CallFrame) String() string + type ConstantWrapper struct + Value interface{} + func (w ConstantWrapper) String() string + type Context struct + func NewContext(s *symbols.SymbolTable, b *ByteCode) *Context + func (c *Context) AppendSymbols(s *symbols.SymbolTable) *Context + func (c *Context) EnableConsoleOutput(flag bool) *Context + func (c *Context) FormatFrames(maxDepth int) string + func (c *Context) GetLine() int + func (c *Context) GetModuleName() string + func (c *Context) GetName() string + func (c *Context) GetOutput() string + func (c *Context) GetSymbols() *symbols.SymbolTable + func (c *Context) GetTokenizer() *tokenizer.Tokenizer + func (c *Context) IsRunning() bool + func (c *Context) Pop() (interface{}, error) + func (c *Context) PrintThisStack(operation string) + func (c *Context) Result() interface{} + func (c *Context) Resume() error + func (c *Context) Run() error + func (c *Context) RunFromAddress(addr int) error + func (c *Context) SetBreakOnReturn() + func (c *Context) SetByteCode(b *ByteCode) *Context + func (c *Context) SetDebug(b bool) *Context + func (c *Context) SetFullSymbolScope(b bool) *Context + func (c *Context) SetGlobal(name string, value interface{}) error + func (c *Context) SetPC(pc int) *Context + func (c *Context) SetSingleStep(b bool) *Context + func (c *Context) SetStepOver(b bool) *Context + func (c *Context) SetTokenizer(t *tokenizer.Tokenizer) *Context + func (c *Context) SingleStep() bool + func (c *Context) StepOver(b bool) + func (c *Context) Tracing() bool + type DispatchMap map[Opcode]OpcodeHandler + type Opcode int + const Add + const AddressOf + const And + const ArgCheck + const Array + const AtLine + const Auth + const BitAnd + const BitOr + const BitShift + const Branch + const BranchFalse + const BranchInstructions + const BranchTrue + const Call + const Coerce + const Constant + const Copy + const CreateAndStore + const DeRef + const Div + const Drop + const DropToMarker + const Dup + const EntryPoint + const Equal + const Exp + const Explode + const Flatten + const FromFile + const GetThis + const GetVarArgs + const Go + const GreaterThan + const GreaterThanOrEqual + const Import + const InFile + const InPackage + const LessThan + const LessThanOrEqual + const Load + const LoadIndex + const LoadSlice + const LoadThis + const LocalCall + const Log + const MakeArray + const MakeMap + const Member + const ModeCheck + const Modulo + const Mul + const Negate + const Newline + const NoOperation + const NotEqual + const Or + const Panic + const PopPackage + const PopScope + const Print + const Push + const PushPackage + const PushScope + const RangeInit + const RangeNext + const ReadStack + const RequiredType + const Response + const Return + const Say + const SetThis + const StackCheck + const StaticTyping + const Stop + const Store + const StoreAlways + const StoreBytecode + const StoreChan + const StoreGlobal + const StoreIndex + const StoreInto + const StoreViaPointer + const Struct + const Sub + const Swap + const SymbolCreate + const SymbolDelete + const SymbolOptCreate + const Template + const Timer + const Try + const TryPop + const Wait + const WillCatch + type OpcodeHandler func(b *Context, i interface{}) error + type OptimizerOperation int + const OptCount + const OptNothing + const OptRead + const OptRunConstantFragment + const OptStore + type StackMarker struct + func NewStackMarker(label string, values ...interface{}) StackMarker + func (sm StackMarker) String() string