Documentation
¶
Index ¶
- Constants
- func CompileModule(ctx context.Context, name, code string, builtins map[string]object.Object) (*object.Module, error)
- type Frame
- func (f *Frame) ActivateCode(code *object.Code)
- func (f *Frame) ActivateFunction(fn *object.Function, returnAddr int, localValues []object.Object)
- func (f *Frame) CaptureLocals() []object.Object
- func (f *Frame) Code() *object.Code
- func (f *Frame) Function() *object.Function
- func (f *Frame) Locals() []object.Object
- func (f *Frame) SetReturnAddr(addr int)
- type Option
- type Options
- type SimpleImporter
- type VirtualMachine
Constants ¶
View Source
const ( MaxArgs = 255 MaxFrameDepth = 1024 MaxStackDepth = 1024 StopSignal = -1 MB = 1024 * 1024 )
View Source
const DefaultFrameLocals = 8
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Frame ¶
type Frame struct {
// contains filtered or unexported fields
}
func (*Frame) ActivateCode ¶
func (*Frame) ActivateFunction ¶
func (*Frame) CaptureLocals ¶
func (*Frame) SetReturnAddr ¶
type Option ¶
type Option func(*VirtualMachine)
Option is a configuration function for a Virtual Machine.
func WithImporter ¶
WithImporter is used to supply an Importer to the Virtual Machine.
func WithInstructionOffset ¶
WithInstructionOffset sets the initial instruction offset.
func WithLimits ¶
WithLimits sets the limits for the Virtual Machine.
type SimpleImporter ¶
type SimpleImporter struct {
// contains filtered or unexported fields
}
func NewSimpleImporter ¶
type VirtualMachine ¶
type VirtualMachine struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.