Documentation ¶
Index ¶
- Constants
- Variables
- func EncodeObject(buf []byte, mem thrift.NocopyWriter, val interface{}) (ret int, err error)
- func EncodedSize(val interface{}) int
- func Pretouch(vt *rt.GoType, opts opts.Options) error
- func SetLinker(v Linker)
- func Translate(s Program) hir.Program
- type BasicBlock
- type Compiler
- type Encoder
- type GraphBuilder
- type Instr
- type Linker
- type LinkerAMD64
- type OpCode
- type Program
- type RuntimeState
- type StateItem
Constants ¶
View Source
const ( LnOffset = int64(unsafe.Offsetof(StateItem{}.Ln)) MiOffset = int64(unsafe.Offsetof(StateItem{}.Mi)) WpOffset = int64(unsafe.Offsetof(StateItem{}.Wp)) BmOffset = int64(unsafe.Offsetof(RuntimeState{}.Bm)) )
View Source
const ( MiKeyOffset = int64(unsafe.Offsetof(rt.GoMapIterator{}.K)) MiValueOffset = int64(unsafe.Offsetof(rt.GoMapIterator{}.V)) )
View Source
const ( StateMax = (defs.StackSize - 1) * StateSize StateSize = int64(unsafe.Sizeof(StateItem{})) )
View Source
const ( RangeUint8 = math.MaxUint8 + 1 RangeUint16 = math.MaxUint16 + 1 )
View Source
const ( ARG_buf = 0 ARG_len = 1 ARG_mem_itab = 2 ARG_mem_data = 3 ARG_p = 4 ARG_rs = 5 ARG_st = 6 )
View Source
const ( WP = hir.P1 RP = hir.P2 RS = hir.P3 ET = hir.P4 // may also be used as a temporary pointer register EP = hir.P5 // may also be used as a temporary pointer register )
View Source
const ( LB_halt = "_halt" LB_error = "_error" LB_nomem = "_nomem" LB_overflow = "_overflow" LB_duplicated = "_duplicated" )
Variables ¶
View Source
var ( MissCount uint64 = 0 TypeCount uint64 = 0 )
View Source
var ( F_mapiternext = hir.RegisterGCall(mapiternext, emu_gcall_mapiternext) F_mapiterstart = hir.RegisterGCall(mapiterstart, emu_gcall_mapiterstart) )
View Source
var ( F_unique32 = hir.RegisterGCall(unique32, emu_gcall_unique32) F_unique64 = hir.RegisterGCall(unique64, emu_gcall_unique64) F_uniquestr = hir.RegisterGCall(uniquestr, emu_gcall_uniquestr) )
View Source
var (
F_encode *hir.CallHandle
)
Functions ¶
func EncodeObject ¶
func EncodeObject(buf []byte, mem thrift.NocopyWriter, val interface{}) (ret int, err error)
func EncodedSize ¶
func EncodedSize(val interface{}) int
Types ¶
type BasicBlock ¶
type BasicBlock struct { P Program Src int End int Next *BasicBlock Link *BasicBlock }
func (*BasicBlock) Free ¶
func (self *BasicBlock) Free()
func (*BasicBlock) Len ¶
func (self *BasicBlock) Len() int
func (*BasicBlock) String ¶
func (self *BasicBlock) String() string
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
func CreateCompiler ¶
func CreateCompiler() *Compiler
func (*Compiler) CompileAndFree ¶
type Encoder ¶
type GraphBuilder ¶
type GraphBuilder struct { Pin map[int]bool Graph map[int]*BasicBlock }
func (*GraphBuilder) Build ¶
func (self *GraphBuilder) Build(p Program) *BasicBlock
func (*GraphBuilder) BuildAndFree ¶
func (self *GraphBuilder) BuildAndFree(p Program) (bb *BasicBlock)
func (*GraphBuilder) Free ¶
func (self *GraphBuilder) Free()
type Instr ¶
func (Instr) Disassemble ¶
type LinkerAMD64 ¶
type LinkerAMD64 struct{}
type OpCode ¶
type OpCode uint8
const ( OP_size_check OpCode = iota OP_size_const OP_size_dyn OP_size_map OP_size_defer OP_byte OP_word OP_long OP_quad OP_sint OP_length OP_memcpy_be OP_seek OP_deref OP_defer OP_map_len OP_map_key OP_map_next OP_map_value OP_map_begin OP_map_if_next OP_map_if_empty OP_list_decr OP_list_begin OP_list_if_next OP_list_if_empty OP_unique OP_goto OP_if_nil OP_if_hasbuf OP_if_eq_imm OP_if_eq_str OP_make_state OP_drop_state OP_halt )
type RuntimeState ¶
Click to show internal directories.
Click to hide internal directories.