Documentation ¶
Index ¶
- Constants
- Variables
- func IsFalsey(v Value) bool
- func PrintValue(v Value)
- func ToString(v Value) string
- type Array
- type CallInfo
- type Chunk
- type Class
- type Closure
- type DebugInfo
- type ExceptionTable
- type ExceptionTableEntry
- type Function
- func (f *Function) AddCallInfo(i *CallInfo) uint16
- func (f *Function) AddExceptionBreakEntry(start int, end int)
- func (f *Function) AddExceptionNextEntry(start int, end int)
- func (f *Function) AddExceptionRescueEntry(start int, end int, fn *Function)
- func (f *Function) AddExceptionReturnEntry(start int, end int)
- type Hash
- type InlineCache
- type Instance
- type Keyword
- type NativeFunction
- type OpcodeToLine
- type ParamList
- type UpValue
- type Value
Constants ¶
View Source
const ( EXCEPTION_BLOCK_RETURN uint8 = iota EXCEPTION_BLOCK_BREAK EXCEPTION_BLOCK_NEXT EXCEPTION_BLOCK_RAISE )
View Source
const ( VAL_NIL uint8 = iota VAL_TRUE VAL_FALSE VAL_OBJ VAL_INT VAL_DOUBLE VAL_FUNC VAL_CLASS VAL_INSTANCE VAL_STRING VAL_NATIVE VAL_ARRAY VAL_HASH VAL_CALLINFO VAL_UPVALUE VAL_CLOSURE )
Variables ¶
View Source
var VALUE_FALSE = Value{Type: VAL_FALSE}
View Source
var VALUE_NIL = Value{Type: VAL_NIL}
View Source
var VALUE_TRUE = Value{Type: VAL_TRUE}
Functions ¶
func PrintValue ¶
func PrintValue(v Value)
Types ¶
type CallInfo ¶
type CallInfo struct { Keys []string Block bool Name string Arity uint8 // inline cache Cache InlineCache }
type Class ¶
type Class struct { Name string ID int Methods map[string]interface{} Constants map[string]Value Initializer interface{} Enclosing *Class SuperClass *Class ChildClasses []*Class }
func (*Class) NewInstance ¶
type Closure ¶
func NewClosure ¶
type DebugInfo ¶
type DebugInfo struct { Filename string Lines []OpcodeToLine }
func (*DebugInfo) InsertDebugInfo ¶
type ExceptionTable ¶
type ExceptionTable []ExceptionTableEntry
func (ExceptionTable) FindEntry ¶
func (t ExceptionTable) FindEntry(pc int, entryType uint8) (ExceptionTableEntry, bool)
type ExceptionTableEntry ¶
type Function ¶
type Function struct { Chunk ParamList Name string ExceptionTable LocalCount uint8 UpvalueCount uint8 }
func NewFunction ¶
func (*Function) AddCallInfo ¶
func (*Function) AddExceptionBreakEntry ¶
func (*Function) AddExceptionNextEntry ¶
func (*Function) AddExceptionRescueEntry ¶
func (*Function) AddExceptionReturnEntry ¶
type InlineCache ¶
type Instance ¶
func (*Instance) IsInstanceOf ¶
type NativeFunction ¶
type OpcodeToLine ¶
Click to show internal directories.
Click to hide internal directories.