ir

package
v1.12.6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const OpSize = unsafe.Sizeof(NewInsOp(0))

Variables

View Source
var OpNames = [256]string{
	OP_null:           "null",
	OP_empty_arr:      "empty_arr",
	OP_empty_obj:      "empty_obj",
	OP_bool:           "bool",
	OP_i8:             "i8",
	OP_i16:            "i16",
	OP_i32:            "i32",
	OP_i64:            "i64",
	OP_u8:             "u8",
	OP_u16:            "u16",
	OP_u32:            "u32",
	OP_u64:            "u64",
	OP_f32:            "f32",
	OP_f64:            "f64",
	OP_str:            "str",
	OP_bin:            "bin",
	OP_quote:          "quote",
	OP_number:         "number",
	OP_eface:          "eface",
	OP_iface:          "iface",
	OP_byte:           "byte",
	OP_text:           "text",
	OP_deref:          "deref",
	OP_index:          "index",
	OP_load:           "load",
	OP_save:           "save",
	OP_drop:           "drop",
	OP_drop_2:         "drop_2",
	OP_recurse:        "recurse",
	OP_is_nil:         "is_nil",
	OP_is_nil_p1:      "is_nil_p1",
	OP_is_zero_1:      "is_zero_1",
	OP_is_zero_2:      "is_zero_2",
	OP_is_zero_4:      "is_zero_4",
	OP_is_zero_8:      "is_zero_8",
	OP_is_zero_map:    "is_zero_map",
	OP_goto:           "goto",
	OP_map_iter:       "map_iter",
	OP_map_stop:       "map_stop",
	OP_map_check_key:  "map_check_key",
	OP_map_write_key:  "map_write_key",
	OP_map_value_next: "map_value_next",
	OP_slice_len:      "slice_len",
	OP_slice_next:     "slice_next",
	OP_marshal:        "marshal",
	OP_marshal_p:      "marshal_p",
	OP_marshal_text:   "marshal_text",
	OP_marshal_text_p: "marshal_text_p",
	OP_cond_set:       "cond_set",
	OP_cond_testc:     "cond_testc",
}

Functions

This section is empty.

Types

type Instr

type Instr struct {
	// contains filtered or unexported fields
}

func NewInsOp

func NewInsOp(op Op) Instr

func NewInsVi

func NewInsVi(op Op, vi int) Instr

func NewInsVp

func NewInsVp(op Op, vt reflect.Type, pv bool) Instr

func NewInsVs

func NewInsVs(op Op, vs string) Instr

func NewInsVt

func NewInsVt(op Op, vt reflect.Type) Instr

func NewInsVtab

func NewInsVtab(op Op, vt reflect.Type, itab *rt.GoItab) Instr

func (Instr) Byte

func (self Instr) Byte() byte

func (Instr) Disassemble

func (self Instr) Disassemble() string

func (Instr) I64

func (self Instr) I64() int64

func (Instr) Op

func (self Instr) Op() Op

func (Instr) Vf

func (self Instr) Vf() uint8

func (Instr) Vi

func (self Instr) Vi() int

func (Instr) Vk

func (self Instr) Vk() reflect.Kind

func (Instr) Vlen

func (self Instr) Vlen() int

func (Instr) Vp

func (self Instr) Vp() (vt reflect.Type, pv bool)

func (Instr) Vp2

func (self Instr) Vp2() (vt *rt.GoType, pv bool)

func (Instr) Vr

func (self Instr) Vr() *rt.GoType

func (Instr) Vs

func (self Instr) Vs() (v string)

func (Instr) Vt

func (self Instr) Vt() reflect.Type

func (Instr) Vtab

func (self Instr) Vtab() (vt *rt.GoType, itab *rt.GoItab)

type Op

type Op uint8
const (
	OP_null Op = iota + 1
	OP_empty_arr
	OP_empty_obj
	OP_bool
	OP_i8
	OP_i16
	OP_i32
	OP_i64
	OP_u8
	OP_u16
	OP_u32
	OP_u64
	OP_f32
	OP_f64
	OP_str
	OP_bin
	OP_quote
	OP_number
	OP_eface
	OP_iface
	OP_byte
	OP_text
	OP_deref
	OP_index
	OP_load
	OP_save
	OP_drop
	OP_drop_2
	OP_recurse
	OP_is_nil
	OP_is_nil_p1
	OP_is_zero_1
	OP_is_zero_2
	OP_is_zero_4
	OP_is_zero_8
	OP_is_zero_map
	OP_goto
	OP_map_iter
	OP_map_stop
	OP_map_check_key
	OP_map_write_key
	OP_map_value_next
	OP_slice_len
	OP_slice_next
	OP_marshal
	OP_marshal_p
	OP_marshal_text
	OP_marshal_text_p
	OP_cond_set
	OP_cond_testc
)

func OP_int

func OP_int() Op

func OP_is_zero_ints

func OP_is_zero_ints() Op

func OP_uint

func OP_uint() Op

func OP_uintptr

func OP_uintptr() Op

func (Op) String

func (self Op) String() string

type Program

type Program []Instr

func (*Program) Add

func (self *Program) Add(op Op)

func (Program) Disassemble

func (self Program) Disassemble() string

func (*Program) Int

func (self *Program) Int(op Op, vi int)

func (*Program) Key

func (self *Program) Key(op Op)

func (Program) PC

func (self Program) PC() int

func (Program) Pin

func (self Program) Pin(i int)

func (Program) Rel

func (self Program) Rel(v []int)

func (*Program) Rtt

func (self *Program) Rtt(op Op, vt reflect.Type)

func (*Program) Str

func (self *Program) Str(op Op, vs string)

func (Program) Tag

func (self Program) Tag(n int)

func (*Program) Vp

func (self *Program) Vp(op Op, vt reflect.Type, pv bool)

func (*Program) Vtab

func (self *Program) Vtab(op Op, vt reflect.Type, itab *rt.GoItab)

Jump to

Keyboard shortcuts

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