...

Package abi

import "github.com/bytedance/sonic/internal/abi"
Overview
Index

Overview ▾

Constants

const (
    PtrSize  = 8 // pointer size
    PtrAlign = 8 // pointer alignment
)

Variables

var (
    F_morestack_noctxt = uintptr(rt.FuncAddr(morestack_noctxt))
)

func CallC

func CallC(addr uintptr, fr Frame, maxStack uintptr) []byte

func ReservedRegs

func ReservedRegs(callc bool) []Register

type Frame

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

func NewFrame

func NewFrame(desc *FunctionLayout, locals []bool, ccall bool) Frame

func (*Frame) ArgPtrs

func (self *Frame) ArgPtrs() *rt.StackMap

func (*Frame) GrowStackTextSize

func (self *Frame) GrowStackTextSize() uint32

func (*Frame) LocalPtrs

func (self *Frame) LocalPtrs() *rt.StackMap

func (*Frame) Offs

func (self *Frame) Offs() uint32

func (*Frame) Prev

func (self *Frame) Prev() uint32

func (*Frame) Size

func (self *Frame) Size() uint32

func (*Frame) StackCheckTextSize

func (self *Frame) StackCheckTextSize() uint32

func (*Frame) String

func (self *Frame) String() string

type FunctionLayout

type FunctionLayout struct {
    FP   uint32
    Args []Parameter
    Rets []Parameter
}

func NewFunctionLayout

func NewFunctionLayout(ft reflect.Type) FunctionLayout

func (FunctionLayout) ArgSize

func (self FunctionLayout) ArgSize() uint32

func (FunctionLayout) StackMap

func (self FunctionLayout) StackMap() *rt.StackMap

func (FunctionLayout) String

func (self FunctionLayout) String() string

type Parameter

type Parameter struct {
    InRegister bool
    IsPointer  bool
    IsFloat    floatKind
    Reg        Register
    Mem        uint32
    Type       reflect.Type
}

func (Parameter) String

func (self Parameter) String() string