Documentation ¶
Index ¶
- Variables
- func BestAlignment() uint
- func MaxOptimizationLevel() uint
- type Block
- type Context
- type Function
- func (f *Function) Abandon()
- func (f *Function) Abs(value1 *Value) *Value
- func (f *Function) Acos(value1 *Value) *Value
- func (f *Function) Add(value1, value2 *Value) *Value
- func (f *Function) AddOvf(value1, value2 *Value) *Value
- func (f *Function) AddRelative(value *Value, offset int) *Value
- func (f *Function) AddressOf(value1 *Value) *Value
- func (f *Function) AddressOfLabel(label *Label) *Value
- func (f *Function) Alloca(size *Value) *Value
- func (f *Function) And(value1, value2 *Value) *Value
- func (f *Function) Apply(args []interface{}) interface{}
- func (f *Function) Asin(value1 *Value) *Value
- func (f *Function) Atan(value1 *Value) *Value
- func (f *Function) Atan2(value1, value2 *Value) *Value
- func (f *Function) BlockFromLabel(label *Label) *Block
- func (f *Function) Branch(label *Label) bool
- func (f *Function) BranchIf(value *Value, label *Label) bool
- func (f *Function) BranchIfNot(value *Value, label *Label) bool
- func (f *Function) Call(name string, fn *Function, args Values) *Value
- func (f *Function) CallIndirect(fn *Function, value *Value, signature *Type, args Values) *Value
- func (f *Function) CallIndirectVtable(fn *Function, value *Value, signature *Type, args Values) *Value
- func (f *Function) CallNative(fn *Function, name string, nativeFunc unsafe.Pointer, signature *Type, ...) *Value
- func (f *Function) CallNestedIndirect(fn *Function, value *Value, parentFrame *Value, signature *Type, args Values) *Value
- func (f *Function) Ceil(value1 *Value) *Value
- func (f *Function) CheckNull(value *Value) bool
- func (f *Function) ClearRecompilable()
- func (f *Function) Cmpg(value1, value2 *Value) *Value
- func (f *Function) Cmpl(value1, value2 *Value) *Value
- func (f *Function) Compile() bool
- func (f *Function) Context() *Context
- func (f *Function) Convert(value *Value, typ *Type, overflowCheck int) *Value
- func (f *Function) Cos(value1 *Value) *Value
- func (f *Function) Cosh(value1 *Value) *Value
- func (f *Function) CreateFloat32Constant(typ *Type, constValue float32) *Value
- func (f *Function) CreateFloat64Constant(typ *Type, constValue float64) *Value
- func (f *Function) CreateIntValue(value int) *Value
- func (f *Function) CreateLongConstant(typ *Type, constValue int64) *Value
- func (f *Function) CreateNintConstant(typ *Type, constValue int) *Value
- func (f *Function) CreatePtrValue(ptr unsafe.Pointer) *Value
- func (f *Function) CreateValue(typ *Type) *Value
- func (f *Function) Current() *Block
- func (f *Function) DefaultReturn() int
- func (f *Function) Div(value1, value2 *Value) *Value
- func (f *Function) Dump(name string, w io.Writer) error
- func (f *Function) DumpInstruction(insn *Instruction, w io.Writer) error
- func (f *Function) DumpValue(value *Value, prefix string, w io.Writer) error
- func (f *Function) Dup(value *Value) *Value
- func (f *Function) Entry() *Block
- func (f *Function) Eq(value1, value2 *Value) *Value
- func (f *Function) Exp(value1 *Value) *Value
- func (f *Function) Floor(value1 *Value) *Value
- func (f *Function) FreeMeta(typ int)
- func (f *Function) Ge(value1, value2 *Value) *Value
- func (f *Function) GoCall(fn interface{}, args []*Value) ([]*Value, error)
- func (f *Function) Gt(value1, value2 *Value) *Value
- func (f *Function) IncomingReg(value *Value, reg int) int
- func (f *Function) IsCompiled() bool
- func (f *Function) IsDeadCurrentBlock() bool
- func (f *Function) IsFinite(value1 *Value) *Value
- func (f *Function) IsInf(value1 *Value) *Value
- func (f *Function) IsNan(value1 *Value) *Value
- func (f *Function) IsRecompilable() bool
- func (f *Function) JumpTable(value *Value, labels Labels) bool
- func (f *Function) Label(label *Label) bool
- func (f *Function) LabelRight(label *Label) bool
- func (f *Function) LabelsEqual(label *Label, label2 *Label) bool
- func (f *Function) Le(value1, value2 *Value) *Value
- func (f *Function) Load(value *Value) *Value
- func (f *Function) LoadElem(baseAddr *Value, index *Value, elemType *Type) *Value
- func (f *Function) LoadElemAddress(baseAddr *Value, index *Value, elemType *Type) *Value
- func (f *Function) LoadRelative(value *Value, offset int, typ *Type) *Value
- func (f *Function) Log(value1 *Value) *Value
- func (f *Function) Log10(value1 *Value) *Value
- func (f *Function) Lt(value1, value2 *Value) *Value
- func (f *Function) MarkBreakpoint(data1, data2 int) int
- func (f *Function) MarkBreakpointVariable(data1, data2 *Value) int
- func (f *Function) MarkOffset(offset int) int
- func (f *Function) Max(value1, value2 *Value) *Value
- func (f *Function) Memcpy(dest, src, size *Value) int
- func (f *Function) Memmove(dest, src, size *Value) int
- func (f *Function) Memset(dest, src, size *Value) int
- func (f *Function) Meta(typ int) unsafe.Pointer
- func (f *Function) Min(value1, value2 *Value) *Value
- func (f *Function) MoveBlocksToEnd(fromLabel *Label, toLabel *Label) int
- func (f *Function) MoveBlocksToStart(fromLabel *Label, toLabel *Label) int
- func (f *Function) Mul(value1, value2 *Value) *Value
- func (f *Function) MulOvf(value1, value2 *Value) *Value
- func (f *Function) Ne(value1, value2 *Value) *Value
- func (f *Function) Neg(value1 *Value) *Value
- func (f *Function) NestedParent() *Function
- func (f *Function) NewBlock(label *Label) bool
- func (f *Function) NextBlock(next *Block) *Block
- func (f *Function) Nop() bool
- func (f *Function) Not(value1 *Value) *Value
- func (f *Function) OptimizationLevel() uint
- func (f *Function) Optimize() bool
- func (f *Function) Or(value1, value2 *Value) *Value
- func (f *Function) Param(param uint) *Value
- func (f *Function) Pow(value1, value2 *Value) *Value
- func (f *Function) PreviousBlock(previous *Block) *Block
- func (f *Function) Rem(value1, value2 *Value) *Value
- func (f *Function) RemIEEE(value1, value2 *Value) *Value
- func (f *Function) ReserveLabel() *Label
- func (f *Function) Return(value *Value) int
- func (f *Function) ReturnPtr(value *Value, typ *Type) int
- func (f *Function) Rint(value1 *Value) *Value
- func (f *Function) Round(value1 *Value) *Value
- func (f *Function) SetOptimizationLevel(level uint)
- func (f *Function) SetParentFrame(parentFrame *Value)
- func (f *Function) SetRecompilable()
- func (f *Function) SetupEntry(entryPoint unsafe.Pointer)
- func (f *Function) Shl(value1, value2 *Value) *Value
- func (f *Function) Shr(value1, value2 *Value) *Value
- func (f *Function) Sign(value1 *Value) *Value
- func (f *Function) Signature() *Type
- func (f *Function) Sin(value1 *Value) *Value
- func (f *Function) Sinh(value1 *Value) *Value
- func (f *Function) Sqrt(value1 *Value) *Value
- func (f *Function) Sshr(value1, value2 *Value) *Value
- func (f *Function) Store(dest, value *Value) bool
- func (f *Function) StoreElem(baseAddr, index, value *Value) bool
- func (f *Function) StoreRelative(dest *Value, offset int, value *Value) bool
- func (f *Function) StructPointer() *Value
- func (f *Function) Sub(value1, value2 *Value) *Value
- func (f *Function) SubOvf(value1, value2 *Value) *Value
- func (f *Function) Tan(value1 *Value) *Value
- func (f *Function) Tanh(value1 *Value) *Value
- func (f *Function) ToBool(value1 *Value) *Value
- func (f *Function) ToClosure() unsafe.Pointer
- func (f *Function) ToNotBool(value1 *Value) *Value
- func (f *Function) ToVtablePointer() unsafe.Pointer
- func (f *Function) Trunc(value1 *Value) *Value
- func (f *Function) Ushr(value1, value2 *Value) *Value
- func (f *Function) ValueRef(value *Value)
- func (f *Function) Xor(value1, value2 *Value) *Value
- type Instruction
- func (i *Instruction) Code() int
- func (i *Instruction) Dest() *Value
- func (i *Instruction) DestIsValue() bool
- func (i *Instruction) Function() *Function
- func (i *Instruction) Label() *Label
- func (i *Instruction) Name() string
- func (i *Instruction) Native() unsafe.Pointer
- func (i *Instruction) Signature() *Type
- func (i *Instruction) Value1() *Value
- func (i *Instruction) Value2() *Value
- type Label
- type Labels
- type Type
- func (t *Type) Alignment() uint
- func (t *Type) Copy() *Type
- func (t *Type) CreatePointer(incref int) *Type
- func (t *Type) Dump(w io.Writer) error
- func (t *Type) Field(index uint) *Type
- func (t *Type) FindName(name string) uint
- func (t *Type) Free()
- func (t *Type) HasTag(kind int) bool
- func (t *Type) IsPointer() bool
- func (t *Type) IsPrimitive() bool
- func (t *Type) IsSignature() bool
- func (t *Type) IsStruct() bool
- func (t *Type) IsTagged() bool
- func (t *Type) IsUnion() bool
- func (t *Type) Kind() int
- func (t *Type) Name(index uint) string
- func (t *Type) Normalize() *Type
- func (t *Type) NumFields() uint
- func (t *Type) NumParams() uint
- func (t *Type) Offset(index uint) uint
- func (t *Type) Param(index uint) *Type
- func (t *Type) PromoteInt() *Type
- func (t *Type) Ref() *Type
- func (t *Type) RemoveTags() *Type
- func (t *Type) Return() *Type
- func (t *Type) ReturnViaPointer() int
- func (t *Type) SetOffset(fieldIndex, offset uint)
- func (t *Type) SetSizeAndAlignment(size, alignment int)
- func (t *Type) SetTaggedType(underlying *Type, incref int)
- func (t *Type) Size() uint
- func (t *Type) TaggedData() unsafe.Pointer
- func (t *Type) TaggedKind() int
- func (t *Type) TaggedType() *Type
- type Types
- type Value
- func (v *Value) Block() *Block
- func (v *Value) Context() *Context
- func (v *Value) Float32() float32
- func (v *Value) Float64() float64
- func (v *Value) Function() *Function
- func (v *Value) Int() int
- func (v *Value) IsAddressable() bool
- func (v *Value) IsConstant() bool
- func (v *Value) IsLocal() bool
- func (v *Value) IsParameter() bool
- func (v *Value) IsTemporary() bool
- func (v *Value) IsTrue() bool
- func (v *Value) IsVolatile() bool
- func (v *Value) Long() int64
- func (v *Value) SetAddressable()
- func (v *Value) SetVolatile()
- func (v *Value) Type() *Type
- type Values
Constants ¶
This section is empty.
Variables ¶
View Source
var ( JIT_OPTLEVEL_NONE = C.JIT_OPTLEVEL_NONE JIT_OPTLEVEL_NORMAL = C.JIT_OPTLEVEL_NORMAL JIT_NO_OFFSET = C.JIT_NO_OFFSET )
View Source
var ( JIT_OPTION_CACHE_LIMIT = C.JIT_OPTION_CACHE_LIMIT JIT_OPTION_CACHE_PAGE_SIZE = C.JIT_OPTION_CACHE_PAGE_SIZE JIT_OPTION_PRE_COMPILE = C.JIT_OPTION_PRE_COMPILE JIT_OPTION_DONT_FOLD = C.JIT_OPTION_DONT_FOLD JIT_OPTION_POSITION_INDEPENDENT = C.JIT_OPTION_POSITION_INDEPENDENT JIT_OPTION_CACHE_MAX_PAGE_FACTOR = C.JIT_OPTION_CACHE_MAX_PAGE_FACTOR )
View Source
var ( JIT_TYPE_INVALID = C.JIT_TYPE_INVALID JIT_TYPE_VOID = C.JIT_TYPE_VOID JIT_TYPE_SBYTE = C.JIT_TYPE_SBYTE JIT_TYPE_UBYTE = C.JIT_TYPE_UBYTE JIT_TYPE_SHORT = C.JIT_TYPE_SHORT JIT_TYPE_USHORT = C.JIT_TYPE_USHORT JIT_TYPE_INT = C.JIT_TYPE_INT JIT_TYPE_UINT = C.JIT_TYPE_UINT JIT_TYPE_NINT = C.JIT_TYPE_NINT JIT_TYPE_NUINT = C.JIT_TYPE_NUINT JIT_TYPE_LONG = C.JIT_TYPE_LONG JIT_TYPE_ULONG = C.JIT_TYPE_ULONG JIT_TYPE_FLOAT32 = C.JIT_TYPE_FLOAT32 JIT_TYPE_FLOAT64 = C.JIT_TYPE_FLOAT64 JIT_TYPE_NFLOAT = C.JIT_TYPE_NFLOAT JIT_TYPE_MAX_PRIMITIVE = JIT_TYPE_NFLOAT JIT_TYPE_STRUCT = C.JIT_TYPE_STRUCT JIT_TYPE_UNION = C.JIT_TYPE_UNION JIT_TYPE_SIGNATURE = C.JIT_TYPE_SIGNATURE JIT_TYPE_PTR = C.JIT_TYPE_PTR JIT_TYPE_FIRST_TAGGED = C.JIT_TYPE_FIRST_TAGGED )
Type kinds that may be returned by Kind().
View Source
var ( JIT_TYPETAG_NAME = C.JIT_TYPETAG_NAME JIT_TYPETAG_STRUCT_NAME = C.JIT_TYPETAG_STRUCT_NAME JIT_TYPETAG_UNION_NAME = C.JIT_TYPETAG_UNION_NAME JIT_TYPETAG_ENUM_NAME = C.JIT_TYPETAG_ENUM_NAME JIT_TYPETAG_CONST = C.JIT_TYPETAG_CONST JIT_TYPETAG_VOLATILE = C.JIT_TYPETAG_VOLATILE JIT_TYPETAG_REFERENCE = C.JIT_TYPETAG_REFERENCE JIT_TYPETAG_OUTPUT = C.JIT_TYPETAG_OUTPUT JIT_TYPETAG_RESTRICT = C.JIT_TYPETAG_RESTRICT JIT_TYPETAG_SYS_BOOL = C.JIT_TYPETAG_SYS_BOOL JIT_TYPETAG_SYS_CHAR = C.JIT_TYPETAG_SYS_CHAR JIT_TYPETAG_SYS_SCHAR = C.JIT_TYPETAG_SYS_SCHAR JIT_TYPETAG_SYS_UCHAR = C.JIT_TYPETAG_SYS_UCHAR JIT_TYPETAG_SYS_SHORT = C.JIT_TYPETAG_SYS_SHORT JIT_TYPETAG_SYS_USHORT = C.JIT_TYPETAG_SYS_USHORT JIT_TYPETAG_SYS_INT = C.JIT_TYPETAG_SYS_INT JIT_TYPETAG_SYS_UINT = C.JIT_TYPETAG_SYS_UINT JIT_TYPETAG_SYS_LONG = C.JIT_TYPETAG_SYS_LONG JIT_TYPETAG_SYS_ULONG = C.JIT_TYPETAG_SYS_ULONG JIT_TYPETAG_SYS_LONGLONG = C.JIT_TYPETAG_SYS_LONGLONG JIT_TYPETAG_SYS_ULONGLONG = C.JIT_TYPETAG_SYS_ULONGLONG JIT_TYPETAG_SYS_FLOAT = C.JIT_TYPETAG_SYS_FLOAT JIT_TYPETAG_SYS_DOUBLE = C.JIT_TYPETAG_SYS_DOUBLE JIT_TYPETAG_SYS_LONGDOUBLE = C.JIT_TYPETAG_SYS_LONGDOUBLE )
Special tag types.
View Source
var ( TypeInt = &Type{C.jit_type_int} TypeVoidPtr = &Type{C.jit_type_void_ptr} TypeCharPtr = &Type{C.jit_type_create_pointer(C.jit_type_sys_char, 0)} TypeGoInt = &Type{C.jit_type_sys_longlong} TypeGoString = CreateStruct([]*Type{TypeCharPtr, TypeInt}, 0) TypeGoInterface = CreateStruct([]*Type{TypeVoidPtr, TypeVoidPtr}, 0) TypeVoid = &Type{C.jit_type_void} TypeFloat32 = &Type{C.jit_type_float32} TypeFloat64 = &Type{C.jit_type_float64} )
View Source
var (
UndefinedLabel = &Label{C.jit_label_undefined}
)
Functions ¶
func BestAlignment ¶
func BestAlignment() uint
func MaxOptimizationLevel ¶
func MaxOptimizationLevel() uint
Types ¶
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
func (*Block) EndsInDead ¶
func (*Block) IsReachable ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func CreateContext ¶
func CreateContext() *Context
func (*Context) BuildStart ¶
func (c *Context) BuildStart()
func (*Context) CreateFunction ¶
func (*Context) CreateNestedFunction ¶
type Function ¶
type Function struct {
// contains filtered or unexported fields
}
func (*Function) AddressOfLabel ¶
func (*Function) BlockFromLabel ¶
func (*Function) CallIndirect ¶
func (*Function) CallIndirectVtable ¶
func (*Function) CallNative ¶
func (*Function) CallNestedIndirect ¶
func (*Function) ClearRecompilable ¶
func (f *Function) ClearRecompilable()
func (*Function) CreateFloat32Constant ¶
func (*Function) CreateFloat64Constant ¶
func (*Function) CreateIntValue ¶
func (*Function) CreateLongConstant ¶
func (*Function) CreateNintConstant ¶
func (*Function) CreateValue ¶
func (*Function) DefaultReturn ¶
func (*Function) DumpInstruction ¶
func (f *Function) DumpInstruction(insn *Instruction, w io.Writer) error
func (*Function) IsCompiled ¶
func (*Function) IsDeadCurrentBlock ¶
func (*Function) IsRecompilable ¶
func (*Function) LabelRight ¶
func (*Function) LoadElemAddress ¶
func (*Function) LoadRelative ¶
func (*Function) MarkBreakpoint ¶
func (*Function) MarkBreakpointVariable ¶
func (*Function) MarkOffset ¶
func (*Function) MoveBlocksToEnd ¶
func (*Function) MoveBlocksToStart ¶
func (*Function) NestedParent ¶
func (*Function) OptimizationLevel ¶
func (*Function) PreviousBlock ¶
func (*Function) ReserveLabel ¶
func (*Function) SetOptimizationLevel ¶
func (*Function) SetParentFrame ¶
func (*Function) SetRecompilable ¶
func (f *Function) SetRecompilable()
func (*Function) SetupEntry ¶
func (*Function) StoreRelative ¶
func (*Function) StructPointer ¶
func (*Function) ToVtablePointer ¶
type Instruction ¶
type Instruction struct {
// contains filtered or unexported fields
}
func (*Instruction) Code ¶
func (i *Instruction) Code() int
func (*Instruction) Dest ¶
func (i *Instruction) Dest() *Value
func (*Instruction) DestIsValue ¶
func (i *Instruction) DestIsValue() bool
func (*Instruction) Function ¶
func (i *Instruction) Function() *Function
func (*Instruction) Label ¶
func (i *Instruction) Label() *Label
func (*Instruction) Name ¶
func (i *Instruction) Name() string
func (*Instruction) Native ¶
func (i *Instruction) Native() unsafe.Pointer
func (*Instruction) Signature ¶
func (i *Instruction) Signature() *Type
func (*Instruction) Value1 ¶
func (i *Instruction) Value1() *Value
func (*Instruction) Value2 ¶
func (i *Instruction) Value2() *Value
type Type ¶
type Type struct {
// contains filtered or unexported fields
}
func CreateSignature ¶
func CreateStruct ¶
func CreateUnion ¶
func ReflectTypeToType ¶
func (*Type) CreatePointer ¶
func (*Type) IsPrimitive ¶
func (*Type) IsSignature ¶
func (*Type) PromoteInt ¶
func (*Type) RemoveTags ¶
func (*Type) ReturnViaPointer ¶
func (*Type) SetSizeAndAlignment ¶
func (*Type) SetTaggedType ¶
func (*Type) TaggedData ¶
func (*Type) TaggedKind ¶
func (*Type) TaggedType ¶
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
func (*Value) IsAddressable ¶
func (*Value) IsConstant ¶
func (*Value) IsParameter ¶
func (*Value) IsTemporary ¶
func (*Value) IsVolatile ¶
func (*Value) SetAddressable ¶
func (v *Value) SetAddressable()
func (*Value) SetVolatile ¶
func (v *Value) SetVolatile()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.