Documentation
¶
Index ¶
- Constants
- func BuildExpressions(prog *Program) error
- func CreateLabels(prog *Program)
- func ExecuteAbstractly(initial EvmState) error
- func PerformReachesAnalysis(prog *Program)
- func PerformReachingAnalysis(prog *Program) error
- type BasicBlock
- type DupExpression
- type EvmState
- type Expression
- type Instruction
- type InstructionExpression
- type InstructionPointer
- type InstructionPointerSet
- type JumpLabel
- type OpCode
- type PopExpression
- type Program
- type ReachesDefinition
- type ReachingDefinition
- type SwapExpression
- type TypeMap
Constants ¶
View Source
const ( // 0xf0 range - closures CREATE OpCode = 0xf0 + iota CALL CALLCODE RETURN DELEGATECALL INVALID = 0xfe REVERT = 0xfd SELFDESTRUCT = 0xff )
Variables ¶
This section is empty.
Functions ¶
func BuildExpressions ¶
func CreateLabels ¶
func CreateLabels(prog *Program)
func ExecuteAbstractly ¶
func PerformReachesAnalysis ¶
func PerformReachesAnalysis(prog *Program)
func PerformReachingAnalysis ¶
Types ¶
type BasicBlock ¶
type BasicBlock struct { Instructions []Instruction Offset int Next *BasicBlock Annotations *TypeMap }
func (*BasicBlock) OffsetOf ¶
func (bb *BasicBlock) OffsetOf(inst *Instruction) int
type DupExpression ¶
type DupExpression struct {
// contains filtered or unexported fields
}
func (*DupExpression) Eval ¶
func (self *DupExpression) Eval() *big.Int
func (*DupExpression) String ¶
func (self *DupExpression) String() string
type Expression ¶
type Instruction ¶
func (*Instruction) String ¶
func (self *Instruction) String() string
type InstructionExpression ¶
type InstructionExpression struct { Inst *Instruction Arguments []Expression }
func (*InstructionExpression) Eval ¶
func (self *InstructionExpression) Eval() *big.Int
func (*InstructionExpression) String ¶
func (self *InstructionExpression) String() string
type InstructionPointer ¶
type InstructionPointer struct { OriginBlock *BasicBlock OriginIndex int }
func (InstructionPointer) Get ¶
func (self InstructionPointer) Get() *Instruction
func (InstructionPointer) GetAddress ¶
func (self InstructionPointer) GetAddress() int
func (InstructionPointer) String ¶
func (self InstructionPointer) String() string
type InstructionPointerSet ¶
type InstructionPointerSet map[InstructionPointer]bool
func (InstructionPointerSet) First ¶
func (self InstructionPointerSet) First() *InstructionPointer
func (InstructionPointerSet) String ¶
func (self InstructionPointerSet) String() string
type OpCode ¶
type OpCode byte
const ( // 0x60 range PUSH1 OpCode = 0x60 + iota PUSH2 PUSH3 PUSH4 PUSH5 PUSH6 PUSH7 PUSH8 PUSH9 PUSH10 PUSH11 PUSH12 PUSH13 PUSH14 PUSH15 PUSH16 PUSH17 PUSH18 PUSH19 PUSH20 PUSH21 PUSH22 PUSH23 PUSH24 PUSH25 PUSH26 PUSH27 PUSH28 PUSH29 PUSH30 PUSH31 PUSH32 DUP1 DUP2 DUP3 DUP4 DUP5 DUP6 DUP7 DUP8 DUP9 DUP10 DUP11 DUP12 DUP13 DUP14 DUP15 DUP16 SWAP1 SWAP2 SWAP3 SWAP4 SWAP5 SWAP6 SWAP7 SWAP8 SWAP9 SWAP10 SWAP11 SWAP12 SWAP13 SWAP14 SWAP15 SWAP16 )
func StringToOp ¶
func (OpCode) HasSideEffects ¶
func (OpCode) OperandSize ¶
func (OpCode) StackReads ¶
func (OpCode) StackWrites ¶
type PopExpression ¶
type PopExpression struct {
Inst *InstructionPointer
}
func (*PopExpression) Eval ¶
func (self *PopExpression) Eval() *big.Int
func (*PopExpression) String ¶
func (self *PopExpression) String() string
type Program ¶
type Program struct { Blocks []*BasicBlock JumpDestinations map[int]*BasicBlock }
func NewProgram ¶
type ReachesDefinition ¶
type ReachesDefinition []InstructionPointer
func (ReachesDefinition) String ¶
func (self ReachesDefinition) String() string
type ReachingDefinition ¶
type ReachingDefinition []InstructionPointerSet
type SwapExpression ¶
type SwapExpression struct {
// contains filtered or unexported fields
}
func (*SwapExpression) Eval ¶
func (self *SwapExpression) Eval() *big.Int
func (*SwapExpression) String ¶
func (self *SwapExpression) String() string
type TypeMap ¶
type TypeMap struct {
// contains filtered or unexported fields
}
func NewTypeMap ¶
func NewTypeMap() *TypeMap
Source Files
¶
Click to show internal directories.
Click to hide internal directories.