expr

package
Version: v0.0.0-...-3f1fa26 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIR_LinuxClose

func NewIR_LinuxClose(fid uint64) IRExpression

func NewIR_LinuxOpen

func NewIR_LinuxOpen(filename string, flags, mode int) IRExpression

func NewIR_LinuxWrite

func NewIR_LinuxWrite(fid IRExpression, b []uint8, size int) IRExpression

Types

type IR_Add

type IR_Add struct {
	*BaseIRExpression
	Op1 IRExpression
	Op2 IRExpression
}

func NewIR_Add

func NewIR_Add(op1, op2 IRExpression) *IR_Add

func (*IR_Add) ReturnType

func (i *IR_Add) ReturnType(ctx *IR_Context) Type

func (*IR_Add) SSA_Transform

func (b *IR_Add) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Add) String

func (i *IR_Add) String() string

type IR_And

type IR_And struct {
	*BaseIRExpression
	Op1 IRExpression
	Op2 IRExpression
}

func NewIR_And

func NewIR_And(op1, op2 IRExpression) *IR_And

func (*IR_And) ReturnType

func (i *IR_And) ReturnType(ctx *IR_Context) Type

func (*IR_And) SSA_Transform

func (b *IR_And) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_And) String

func (i *IR_And) String() string

type IR_ArrayIndex

type IR_ArrayIndex struct {
	*BaseIRExpression
	Array IRExpression
	Index IRExpression
}

func NewIR_ArrayIndex

func NewIR_ArrayIndex(array, index IRExpression) *IR_ArrayIndex

func (*IR_ArrayIndex) ReturnType

func (i *IR_ArrayIndex) ReturnType(ctx *IR_Context) Type

func (*IR_ArrayIndex) SSA_Transform

func (b *IR_ArrayIndex) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_ArrayIndex) String

func (i *IR_ArrayIndex) String() string

type IR_Bool

type IR_Bool struct {
	*BaseIRExpression
	Value bool
}

func NewIR_Bool

func NewIR_Bool(v bool) *IR_Bool

func (*IR_Bool) ReturnType

func (i *IR_Bool) ReturnType(ctx *IR_Context) Type

func (*IR_Bool) SSA_Transform

func (b *IR_Bool) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Bool) String

func (i *IR_Bool) String() string

type IR_ByteArray

type IR_ByteArray struct {
	*BaseIRExpression
	Value []uint8

	// Set during EncodeDataSection
	Address *SegmentPointer
}

func NewIR_ByteArray

func NewIR_ByteArray(value []uint8) *IR_ByteArray

func (*IR_ByteArray) ReturnType

func (i *IR_ByteArray) ReturnType(ctx *IR_Context) Type

func (*IR_ByteArray) SSA_Transform

func (b *IR_ByteArray) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_ByteArray) String

func (i *IR_ByteArray) String() string

type IR_Call

type IR_Call struct {
	*BaseIRExpression
	Function string
	Args     []IRExpression
}

func NewIR_Call

func NewIR_Call(function string, args []IRExpression) *IR_Call

func (*IR_Call) ReturnType

func (i *IR_Call) ReturnType(ctx *IR_Context) Type

func (*IR_Call) SSA_Transform

func (b *IR_Call) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Call) String

func (i *IR_Call) String() string

type IR_Cast

type IR_Cast struct {
	*BaseIRExpression
	Value      IRExpression
	CastToType Type
}

func NewIR_Cast

func NewIR_Cast(value IRExpression, typ Type) *IR_Cast

func (*IR_Cast) ReturnType

func (i *IR_Cast) ReturnType(ctx *IR_Context) Type

func (*IR_Cast) SSA_Transform

func (b *IR_Cast) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Cast) String

func (i *IR_Cast) String() string

type IR_Div

type IR_Div struct {
	*BaseIRExpression
	Op1 IRExpression
	Op2 IRExpression
}

func NewIR_Div

func NewIR_Div(op1, op2 IRExpression) *IR_Div

func (*IR_Div) ReturnType

func (i *IR_Div) ReturnType(ctx *IR_Context) Type

func (*IR_Div) SSA_Transform

func (b *IR_Div) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Div) String

func (i *IR_Div) String() string

type IR_Equals

type IR_Equals struct {
	*BaseIRExpression
	Op1 IRExpression
	Op2 IRExpression
}

func NewIR_Equals

func NewIR_Equals(op1, op2 IRExpression) *IR_Equals

func (*IR_Equals) AddToDataSection

func (b *IR_Equals) AddToDataSection(ctx *IR_Context) error

func (*IR_Equals) ReturnType

func (i *IR_Equals) ReturnType(ctx *IR_Context) Type

func (*IR_Equals) SSA_Transform

func (b *IR_Equals) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Equals) String

func (i *IR_Equals) String() string

type IR_Float64

type IR_Float64 struct {
	*BaseIRExpression
	Value float64
}

func NewIR_Float64

func NewIR_Float64(v float64) *IR_Float64

func (*IR_Float64) ReturnType

func (i *IR_Float64) ReturnType(ctx *IR_Context) Type

func (*IR_Float64) SSA_Transform

func (b *IR_Float64) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Float64) String

func (i *IR_Float64) String() string

type IR_Function

type IR_Function struct {
	*BaseIRExpression
	Signature *TFunction
	Body      IR
	Address   *SegmentPointer
}

func NewIR_Function

func NewIR_Function(signature *TFunction, body IR) *IR_Function

func (*IR_Function) ReturnType

func (i *IR_Function) ReturnType(ctx *IR_Context) Type

func (*IR_Function) SSA_Transform

func (b *IR_Function) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Function) String

func (i *IR_Function) String() string

type IR_GT

type IR_GT struct {
	*BaseIRExpression
	Op1 IRExpression
	Op2 IRExpression
}

func NewIR_GT

func NewIR_GT(op1, op2 IRExpression) *IR_GT

func (*IR_GT) ReturnType

func (i *IR_GT) ReturnType(ctx *IR_Context) Type

func (*IR_GT) SSA_Transform

func (b *IR_GT) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_GT) String

func (i *IR_GT) String() string

type IR_GTE

type IR_GTE struct {
	*BaseIRExpression
	Op1 IRExpression
	Op2 IRExpression
}

func NewIR_GTE

func NewIR_GTE(op1, op2 IRExpression) *IR_GTE

func (*IR_GTE) ReturnType

func (i *IR_GTE) ReturnType(ctx *IR_Context) Type

func (*IR_GTE) SSA_Transform

func (b *IR_GTE) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_GTE) String

func (i *IR_GTE) String() string

type IR_Int16

type IR_Int16 struct {
	*BaseIRExpression
	Value int16
}

func NewIR_Int16

func NewIR_Int16(v int16) *IR_Int16

func (*IR_Int16) ReturnType

func (i *IR_Int16) ReturnType(ctx *IR_Context) Type

func (*IR_Int16) SSA_Transform

func (b *IR_Int16) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Int16) String

func (i *IR_Int16) String() string

type IR_Int32

type IR_Int32 struct {
	*BaseIRExpression
	Value int32
}

func NewIR_Int32

func NewIR_Int32(v int32) *IR_Int32

func (*IR_Int32) ReturnType

func (i *IR_Int32) ReturnType(ctx *IR_Context) Type

func (*IR_Int32) SSA_Transform

func (b *IR_Int32) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Int32) String

func (i *IR_Int32) String() string

type IR_Int64

type IR_Int64 struct {
	*BaseIRExpression
	Value int64
}

func NewIR_Int64

func NewIR_Int64(v int64) *IR_Int64

func (*IR_Int64) ReturnType

func (i *IR_Int64) ReturnType(ctx *IR_Context) Type

func (*IR_Int64) SSA_Transform

func (b *IR_Int64) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Int64) String

func (i *IR_Int64) String() string

type IR_Int8

type IR_Int8 struct {
	*BaseIRExpression
	Value int8
}

func NewIR_Int8

func NewIR_Int8(v int8) *IR_Int8

func (*IR_Int8) ReturnType

func (i *IR_Int8) ReturnType(ctx *IR_Context) Type

func (*IR_Int8) SSA_Transform

func (b *IR_Int8) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Int8) String

func (i *IR_Int8) String() string

type IR_LT

type IR_LT struct {
	*BaseIRExpression
	Op1 IRExpression
	Op2 IRExpression
}

func NewIR_LT

func NewIR_LT(op1, op2 IRExpression) *IR_LT

func (*IR_LT) ReturnType

func (i *IR_LT) ReturnType(ctx *IR_Context) Type

func (*IR_LT) SSA_Transform

func (b *IR_LT) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_LT) String

func (i *IR_LT) String() string

type IR_LTE

type IR_LTE struct {
	*BaseIRExpression
	Op1 IRExpression
	Op2 IRExpression
}

func NewIR_LTE

func NewIR_LTE(op1, op2 IRExpression) *IR_LTE

func (*IR_LTE) ReturnType

func (i *IR_LTE) ReturnType(ctx *IR_Context) Type

func (*IR_LTE) SSA_Transform

func (b *IR_LTE) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_LTE) String

func (i *IR_LTE) String() string

type IR_Mul

type IR_Mul struct {
	*BaseIRExpression
	Op1 IRExpression
	Op2 IRExpression
}

func NewIR_Mul

func NewIR_Mul(op1, op2 IRExpression) *IR_Mul

func (*IR_Mul) ReturnType

func (i *IR_Mul) ReturnType(ctx *IR_Context) Type

func (*IR_Mul) SSA_Transform

func (b *IR_Mul) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Mul) String

func (i *IR_Mul) String() string

type IR_Not

type IR_Not struct {
	*BaseIRExpression
	Op1 IRExpression
}

func NewIR_Not

func NewIR_Not(op1 IRExpression) *IR_Not

func (*IR_Not) ReturnType

func (i *IR_Not) ReturnType(ctx *IR_Context) Type

func (*IR_Not) SSA_Transform

func (b *IR_Not) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Not) String

func (i *IR_Not) String() string

type IR_Or

type IR_Or struct {
	*BaseIRExpression
	Op1 IRExpression
	Op2 IRExpression
}

func NewIR_Or

func NewIR_Or(op1, op2 IRExpression) *IR_Or

func (*IR_Or) ReturnType

func (i *IR_Or) ReturnType(ctx *IR_Context) Type

func (*IR_Or) SSA_Transform

func (b *IR_Or) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Or) String

func (i *IR_Or) String() string

type IR_StaticArray

type IR_StaticArray struct {
	*BaseIRExpression
	ElemType Type
	Value    []IRExpression // only literals are supported
	// Set during EncodeDataSection
	Address *SegmentPointer
}

func NewIR_StaticArray

func NewIR_StaticArray(elemType Type, value []IRExpression) *IR_StaticArray

func (*IR_StaticArray) ReturnType

func (i *IR_StaticArray) ReturnType(ctx *IR_Context) Type

func (*IR_StaticArray) SSA_Transform

func (b *IR_StaticArray) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_StaticArray) String

func (i *IR_StaticArray) String() string

type IR_Struct

type IR_Struct struct {
	*BaseIRExpression
	StructType *TStruct
	Values     []IRExpression // only literals are supported
	// Set during EncodeDataSection
	Address *SegmentPointer
}

func NewIR_Struct

func NewIR_Struct(ty *TStruct, values []IRExpression) *IR_Struct

func (*IR_Struct) ReturnType

func (i *IR_Struct) ReturnType(ctx *IR_Context) Type

func (*IR_Struct) SSA_Transform

func (b *IR_Struct) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Struct) String

func (i *IR_Struct) String() string

type IR_StructField

type IR_StructField struct {
	*BaseIRExpression
	Struct IRExpression
	Field  string
}

func NewIR_StructField

func NewIR_StructField(structExpr IRExpression, field string) *IR_StructField

func (*IR_StructField) AddToDataSection

func (b *IR_StructField) AddToDataSection(ctx *IR_Context) error

func (*IR_StructField) ReturnType

func (i *IR_StructField) ReturnType(ctx *IR_Context) Type

func (*IR_StructField) SSA_Transform

func (b *IR_StructField) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_StructField) String

func (i *IR_StructField) String() string

type IR_Sub

type IR_Sub struct {
	*BaseIRExpression
	Op1 IRExpression
	Op2 IRExpression
}

func NewIR_Sub

func NewIR_Sub(op1, op2 IRExpression) *IR_Sub

func (*IR_Sub) ReturnType

func (i *IR_Sub) ReturnType(ctx *IR_Context) Type

func (*IR_Sub) SSA_Transform

func (b *IR_Sub) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Sub) String

func (i *IR_Sub) String() string

type IR_Syscall

type IR_Syscall struct {
	*BaseIRExpression
	Syscall IRExpression
	Args    []IRExpression
}

func NewIR_Syscall

func NewIR_Syscall(syscall IRExpression, args []IRExpression) *IR_Syscall

func (*IR_Syscall) AddToDataSection

func (b *IR_Syscall) AddToDataSection(ctx *IR_Context) error

func (*IR_Syscall) ReturnType

func (i *IR_Syscall) ReturnType(ctx *IR_Context) Type

func (*IR_Syscall) SSA_Transform

func (b *IR_Syscall) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Syscall) String

func (i *IR_Syscall) String() string

type IR_Syscall_Linux

type IR_Syscall_Linux uint
const (
	IR_Syscall_Linux_Read  IR_Syscall_Linux = 0
	IR_Syscall_Linux_Write IR_Syscall_Linux = 1
	IR_Syscall_Linux_Open  IR_Syscall_Linux = 2
	IR_Syscall_Linux_Close IR_Syscall_Linux = 3
)

type IR_Uint16

type IR_Uint16 struct {
	*BaseIRExpression
	Value uint16
}

func NewIR_Uint16

func NewIR_Uint16(v uint16) *IR_Uint16

func (*IR_Uint16) ReturnType

func (i *IR_Uint16) ReturnType(ctx *IR_Context) Type

func (*IR_Uint16) SSA_Transform

func (b *IR_Uint16) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Uint16) String

func (i *IR_Uint16) String() string

type IR_Uint32

type IR_Uint32 struct {
	*BaseIRExpression
	Value uint32
}

func NewIR_Uint32

func NewIR_Uint32(v uint32) *IR_Uint32

func (*IR_Uint32) ReturnType

func (i *IR_Uint32) ReturnType(ctx *IR_Context) Type

func (*IR_Uint32) SSA_Transform

func (b *IR_Uint32) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Uint32) String

func (i *IR_Uint32) String() string

type IR_Uint64

type IR_Uint64 struct {
	*BaseIRExpression
	Value uint64
}

func NewIR_Uint64

func NewIR_Uint64(v uint64) *IR_Uint64

func (*IR_Uint64) ReturnType

func (i *IR_Uint64) ReturnType(ctx *IR_Context) Type

func (*IR_Uint64) SSA_Transform

func (b *IR_Uint64) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Uint64) String

func (i *IR_Uint64) String() string

type IR_Uint8

type IR_Uint8 struct {
	*BaseIRExpression
	Value uint8
}

func NewIR_Uint8

func NewIR_Uint8(v uint8) *IR_Uint8

func (*IR_Uint8) ReturnType

func (i *IR_Uint8) ReturnType(ctx *IR_Context) Type

func (*IR_Uint8) SSA_Transform

func (b *IR_Uint8) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Uint8) String

func (i *IR_Uint8) String() string

type IR_Variable

type IR_Variable struct {
	*BaseIRExpression
	Value string
}

func NewIR_Variable

func NewIR_Variable(v string) *IR_Variable

func (*IR_Variable) ReturnType

func (i *IR_Variable) ReturnType(ctx *IR_Context) Type

func (*IR_Variable) SSA_Transform

func (b *IR_Variable) SSA_Transform(ctx *SSA_Context) (SSA_Rewrites, IRExpression)

func (*IR_Variable) String

func (i *IR_Variable) String() string

Jump to

Keyboard shortcuts

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