Documentation ¶
Index ¶
- Constants
- func OpInternBinary(op string, isSigned bool) int
- func OpInternUnary(op string) int
- func VisitExpr(v IIRVisitor, expr core.IExpr) interface{}
- func VisitStmt(v IIRVisitor, stmt core.IStmt) interface{}
- type Addr
- func (self *Addr) AsExpr() core.IExpr
- func (self *Addr) GetAddress() core.IOperand
- func (self Addr) GetAddressNode(t int) core.IExpr
- func (self *Addr) GetAsmValue() core.IImmediateValue
- func (self Addr) GetEntity() core.IEntity
- func (self Addr) GetEntityForce() core.IEntity
- func (self *Addr) GetMemref() core.IMemoryReference
- func (self Addr) GetTypeId() int
- func (self Addr) IsAddr() bool
- func (self Addr) IsConstant() bool
- func (self Addr) IsVar() bool
- func (self Addr) String() string
- type Assign
- type Bin
- func (self *Bin) AsExpr() core.IExpr
- func (self *Bin) GetAddress() core.IOperand
- func (self Bin) GetAddressNode(t int) core.IExpr
- func (self *Bin) GetAsmValue() core.IImmediateValue
- func (self Bin) GetEntityForce() core.IEntity
- func (self Bin) GetLeft() core.IExpr
- func (self *Bin) GetMemref() core.IMemoryReference
- func (self Bin) GetOp() int
- func (self Bin) GetRight() core.IExpr
- func (self Bin) GetTypeId() int
- func (self Bin) IsAddr() bool
- func (self Bin) IsConstant() bool
- func (self Bin) IsVar() bool
- func (self Bin) String() string
- type CJump
- type Call
- func (self *Call) AsExpr() core.IExpr
- func (self *Call) GetAddress() core.IOperand
- func (self Call) GetAddressNode(t int) core.IExpr
- func (self Call) GetArgs() []core.IExpr
- func (self *Call) GetAsmValue() core.IImmediateValue
- func (self Call) GetEntityForce() core.IEntity
- func (self Call) GetExpr() core.IExpr
- func (self Call) GetFunction() core.IFunction
- func (self *Call) GetMemref() core.IMemoryReference
- func (self Call) GetTypeId() int
- func (self Call) IsAddr() bool
- func (self Call) IsConstant() bool
- func (self Call) IsStaticCall() bool
- func (self Call) IsVar() bool
- func (self Call) NumArgs() int
- func (self Call) String() string
- type Case
- type ExprStmt
- type IIRVisitor
- type IR
- func (self *IR) AllFunctions() []xtc_core.IFunction
- func (self *IR) AllGlobalVariables() []xtc_core.IVariable
- func (self *IR) GetConstantTable() *xtc_entity.ConstantTable
- func (self *IR) GetDefinedCommonSymbols() []*xtc_entity.DefinedVariable
- func (self *IR) GetDefinedFunctions() []*xtc_entity.DefinedFunction
- func (self *IR) GetDefinedGlobalVariables() []*xtc_entity.DefinedVariable
- func (self *IR) GetDefinedVariables() []*xtc_entity.DefinedVariable
- func (self *IR) GetFileName() string
- func (self *IR) GetLocation() xtc_core.Location
- func (self *IR) GetScope() *xtc_entity.ToplevelScope
- func (self *IR) IsCommonSymbolDefined() bool
- func (self *IR) IsFunctionDefined() bool
- func (self *IR) IsGlobalVariableDefined() bool
- func (self *IR) IsStringLiteralDefined() bool
- type Int
- func (self *Int) AsExpr() core.IExpr
- func (self *Int) GetAddress() core.IOperand
- func (self Int) GetAddressNode(t int) core.IExpr
- func (self *Int) GetAsmValue() core.IImmediateValue
- func (self Int) GetEntityForce() core.IEntity
- func (self *Int) GetMemref() core.IMemoryReference
- func (self Int) GetTypeId() int
- func (self Int) GetValue() int64
- func (self Int) IsAddr() bool
- func (self Int) IsConstant() bool
- func (self Int) IsVar() bool
- func (self Int) String() string
- type Jump
- type LabelStmt
- type Mem
- func (self *Mem) AsExpr() core.IExpr
- func (self *Mem) GetAddress() core.IOperand
- func (self Mem) GetAddressNode(t int) core.IExpr
- func (self *Mem) GetAsmValue() core.IImmediateValue
- func (self Mem) GetEntityForce() core.IEntity
- func (self Mem) GetExpr() core.IExpr
- func (self *Mem) GetMemref() core.IMemoryReference
- func (self Mem) GetTypeId() int
- func (self Mem) IsAddr() bool
- func (self Mem) IsConstant() bool
- func (self Mem) IsVar() bool
- func (self Mem) String() string
- type Return
- type Str
- func (self *Str) AsExpr() core.IExpr
- func (self *Str) GetAddress() core.IOperand
- func (self Str) GetAddressNode(t int) core.IExpr
- func (self *Str) GetAsmValue() core.IImmediateValue
- func (self Str) GetEntityForce() core.IEntity
- func (self *Str) GetMemref() core.IMemoryReference
- func (self Str) GetSymbol() core.ISymbol
- func (self Str) GetTypeId() int
- func (self Str) IsAddr() bool
- func (self Str) IsConstant() bool
- func (self Str) IsVar() bool
- func (self Str) String() string
- type Switch
- type Uni
- func (self *Uni) AsExpr() core.IExpr
- func (self *Uni) GetAddress() core.IOperand
- func (self Uni) GetAddressNode(t int) core.IExpr
- func (self *Uni) GetAsmValue() core.IImmediateValue
- func (self Uni) GetEntityForce() core.IEntity
- func (self Uni) GetExpr() core.IExpr
- func (self *Uni) GetMemref() core.IMemoryReference
- func (self Uni) GetOp() int
- func (self Uni) GetTypeId() int
- func (self Uni) IsAddr() bool
- func (self Uni) IsConstant() bool
- func (self Uni) IsVar() bool
- func (self Uni) String() string
- type Var
- func (self *Var) AsExpr() core.IExpr
- func (self *Var) GetAddress() core.IOperand
- func (self Var) GetAddressNode(t int) core.IExpr
- func (self *Var) GetAsmValue() core.IImmediateValue
- func (self Var) GetEntityForce() core.IEntity
- func (self *Var) GetMemref() core.IMemoryReference
- func (self Var) GetTypeId() int
- func (self Var) IsAddr() bool
- func (self Var) IsConstant() bool
- func (self Var) IsVar() bool
- func (self Var) String() string
Constants ¶
View Source
const ( OP_ADD = iota OP_SUB OP_MUL OP_S_DIV OP_U_DIV OP_S_MOD OP_U_MOD OP_BIT_AND OP_BIT_OR OP_BIT_XOR OP_BIT_LSHIFT OP_BIT_RSHIFT OP_ARITH_RSHIFT OP_EQ OP_NEQ OP_S_GT OP_S_GTEQ OP_S_LT OP_S_LTEQ OP_U_GT OP_U_GTEQ OP_U_LT OP_U_LTEQ OP_UMINUS OP_BIT_NOT OP_NOT OP_S_CAST OP_U_CAST )
Variables ¶
This section is empty.
Functions ¶
func OpInternBinary ¶
func OpInternUnary ¶
func VisitExpr ¶
func VisitExpr(v IIRVisitor, expr core.IExpr) interface{}
func VisitStmt ¶
func VisitStmt(v IIRVisitor, stmt core.IStmt) interface{}
Types ¶
type Addr ¶
func (*Addr) GetAddress ¶
func (*Addr) GetAsmValue ¶
func (self *Addr) GetAsmValue() core.IImmediateValue
func (Addr) GetEntityForce ¶
func (*Addr) GetMemref ¶
func (self *Addr) GetMemref() core.IMemoryReference
func (Addr) IsConstant ¶
type Assign ¶
func (Assign) GetLocation ¶
type Bin ¶
func (*Bin) GetAddress ¶
func (*Bin) GetAsmValue ¶
func (self *Bin) GetAsmValue() core.IImmediateValue
func (Bin) GetEntityForce ¶
func (*Bin) GetMemref ¶
func (self *Bin) GetMemref() core.IMemoryReference
func (Bin) IsConstant ¶
type CJump ¶
type CJump struct { ClassName string Location core.Location Cond core.IExpr ThenLabel *asm.Label ElseLabel *asm.Label }
func (CJump) GetElseLabel ¶
func (CJump) GetLocation ¶
func (CJump) GetThenLabel ¶
type Call ¶
func (*Call) GetAddress ¶
func (*Call) GetAsmValue ¶
func (self *Call) GetAsmValue() core.IImmediateValue
func (Call) GetEntityForce ¶
func (Call) GetFunction ¶
func (*Call) GetMemref ¶
func (self *Call) GetMemref() core.IMemoryReference
func (Call) IsConstant ¶
func (Call) IsStaticCall ¶
type ExprStmt ¶
func (ExprStmt) GetLocation ¶
type IIRVisitor ¶
type IR ¶
type IR struct { ClassName string Location xtc_core.Location Defvars []*xtc_entity.DefinedVariable Defuns []*xtc_entity.DefinedFunction Funcdecls []*xtc_entity.UndefinedFunction // contains filtered or unexported fields }
func NewIR ¶
func NewIR(loc xtc_core.Location, defvars []*xtc_entity.DefinedVariable, defuns []*xtc_entity.DefinedFunction, funcdecls []*xtc_entity.UndefinedFunction, scope *xtc_entity.ToplevelScope, constantTable *xtc_entity.ConstantTable) *IR
func (*IR) AllFunctions ¶
func (*IR) AllGlobalVariables ¶
func (*IR) GetConstantTable ¶
func (self *IR) GetConstantTable() *xtc_entity.ConstantTable
func (*IR) GetDefinedCommonSymbols ¶
func (self *IR) GetDefinedCommonSymbols() []*xtc_entity.DefinedVariable
func (*IR) GetDefinedFunctions ¶
func (self *IR) GetDefinedFunctions() []*xtc_entity.DefinedFunction
func (*IR) GetDefinedGlobalVariables ¶
func (self *IR) GetDefinedGlobalVariables() []*xtc_entity.DefinedVariable
func (*IR) GetDefinedVariables ¶
func (self *IR) GetDefinedVariables() []*xtc_entity.DefinedVariable
func (*IR) GetFileName ¶
func (*IR) GetLocation ¶
func (*IR) GetScope ¶
func (self *IR) GetScope() *xtc_entity.ToplevelScope
func (*IR) IsCommonSymbolDefined ¶
func (*IR) IsFunctionDefined ¶
func (*IR) IsGlobalVariableDefined ¶
func (*IR) IsStringLiteralDefined ¶
type Int ¶
func (*Int) GetAddress ¶
func (*Int) GetAsmValue ¶
func (self *Int) GetAsmValue() core.IImmediateValue
func (Int) GetEntityForce ¶
func (*Int) GetMemref ¶
func (self *Int) GetMemref() core.IMemoryReference
func (Int) IsConstant ¶
type Jump ¶
func (Jump) GetLocation ¶
type LabelStmt ¶
func (LabelStmt) GetLocation ¶
type Mem ¶
func (*Mem) GetAddress ¶
func (*Mem) GetAsmValue ¶
func (self *Mem) GetAsmValue() core.IImmediateValue
func (Mem) GetEntityForce ¶
func (*Mem) GetMemref ¶
func (self *Mem) GetMemref() core.IMemoryReference
func (Mem) IsConstant ¶
type Return ¶
func (Return) GetLocation ¶
type Str ¶
type Str struct { ClassName string TypeId int Entry *entity.ConstantEntry }
func (*Str) GetAddress ¶
func (*Str) GetAsmValue ¶
func (self *Str) GetAsmValue() core.IImmediateValue
func (Str) GetEntityForce ¶
func (*Str) GetMemref ¶
func (self *Str) GetMemref() core.IMemoryReference
func (Str) IsConstant ¶
type Switch ¶
type Switch struct { ClassName string Location core.Location Cond core.IExpr Cases []*Case DefaultLabel *asm.Label EndLabel *asm.Label }
func (Switch) GetDefaultLabel ¶
func (Switch) GetEndLabel ¶
func (Switch) GetLocation ¶
type Uni ¶
func (*Uni) GetAddress ¶
func (*Uni) GetAsmValue ¶
func (self *Uni) GetAsmValue() core.IImmediateValue
func (Uni) GetEntityForce ¶
func (*Uni) GetMemref ¶
func (self *Uni) GetMemref() core.IMemoryReference
func (Uni) IsConstant ¶
type Var ¶
func (*Var) GetAddress ¶
func (*Var) GetAsmValue ¶
func (self *Var) GetAsmValue() core.IImmediateValue
func (Var) GetEntityForce ¶
func (*Var) GetMemref ¶
func (self *Var) GetMemref() core.IMemoryReference
func (Var) IsConstant ¶
Click to show internal directories.
Click to hide internal directories.