Documentation ¶
Index ¶
- func Apply(s Switcher, _inst ssa.Instruction)
- type BaseSwitcher
- func (s *BaseSwitcher) CaseAlloc(inst *ssa.Alloc)
- func (s *BaseSwitcher) CaseBinOp(inst *ssa.BinOp)
- func (s *BaseSwitcher) CaseCall(inst *ssa.Call)
- func (s *BaseSwitcher) CaseChangeInterface(inst *ssa.ChangeInterface)
- func (s *BaseSwitcher) CaseChangeType(inst *ssa.ChangeType)
- func (s *BaseSwitcher) CaseConvert(inst *ssa.Convert)
- func (s *BaseSwitcher) CaseDebugRef(inst *ssa.DebugRef)
- func (s *BaseSwitcher) CaseDefer(inst *ssa.Defer)
- func (s *BaseSwitcher) CaseExtract(inst *ssa.Extract)
- func (s *BaseSwitcher) CaseField(inst *ssa.Field)
- func (s *BaseSwitcher) CaseFieldAddr(inst *ssa.FieldAddr)
- func (s *BaseSwitcher) CaseGo(inst *ssa.Go)
- func (s *BaseSwitcher) CaseIf(inst *ssa.If)
- func (s *BaseSwitcher) CaseIndex(inst *ssa.Index)
- func (s *BaseSwitcher) CaseIndexAddr(inst *ssa.IndexAddr)
- func (s *BaseSwitcher) CaseJump(inst *ssa.Jump)
- func (s *BaseSwitcher) CaseLookup(inst *ssa.Lookup)
- func (s *BaseSwitcher) CaseMakeChan(inst *ssa.MakeChan)
- func (s *BaseSwitcher) CaseMakeClosure(inst *ssa.MakeClosure)
- func (s *BaseSwitcher) CaseMakeInterface(inst *ssa.MakeInterface)
- func (s *BaseSwitcher) CaseMakeMap(inst *ssa.MakeMap)
- func (s *BaseSwitcher) CaseMakeSlice(inst *ssa.MakeSlice)
- func (s *BaseSwitcher) CaseMapUpdate(inst *ssa.MapUpdate)
- func (s *BaseSwitcher) CaseNext(inst *ssa.Next)
- func (s *BaseSwitcher) CasePanic(inst *ssa.Panic)
- func (s *BaseSwitcher) CasePhi(inst *ssa.Phi)
- func (s *BaseSwitcher) CaseRange(inst *ssa.Range)
- func (s *BaseSwitcher) CaseReturn(inst *ssa.Return)
- func (s *BaseSwitcher) CaseRunDefers(inst *ssa.RunDefers)
- func (s *BaseSwitcher) CaseSelect(inst *ssa.Select)
- func (s *BaseSwitcher) CaseSend(inst *ssa.Send)
- func (s *BaseSwitcher) CaseSlice(inst *ssa.Slice)
- func (s *BaseSwitcher) CaseSliceToArrayPointer(inst *ssa.SliceToArrayPointer)
- func (s *BaseSwitcher) CaseStore(inst *ssa.Store)
- func (s *BaseSwitcher) CaseTypeAssert(inst *ssa.TypeAssert)
- func (s *BaseSwitcher) CaseUnOp(inst *ssa.UnOp)
- type Switcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(s Switcher, _inst ssa.Instruction)
Apply call specific method based on type of the instruction
Types ¶
type BaseSwitcher ¶
type BaseSwitcher struct { }
BaseSwitcher represents a base switcher implemention
func (*BaseSwitcher) CaseAlloc ¶
func (s *BaseSwitcher) CaseAlloc(inst *ssa.Alloc)
CaseAlloc accepts an Alloc instruction
func (*BaseSwitcher) CaseBinOp ¶
func (s *BaseSwitcher) CaseBinOp(inst *ssa.BinOp)
CaseBinOp accepts a BinOp instruction
func (*BaseSwitcher) CaseCall ¶
func (s *BaseSwitcher) CaseCall(inst *ssa.Call)
CaseCall accepts a Call instruction
func (*BaseSwitcher) CaseChangeInterface ¶
func (s *BaseSwitcher) CaseChangeInterface(inst *ssa.ChangeInterface)
CaseChangeInterface accepts a ChangeInterface instruction
func (*BaseSwitcher) CaseChangeType ¶
func (s *BaseSwitcher) CaseChangeType(inst *ssa.ChangeType)
CaseChangeType accepts a ChangeType instruction
func (*BaseSwitcher) CaseConvert ¶
func (s *BaseSwitcher) CaseConvert(inst *ssa.Convert)
CaseConvert accepts a Convert instruction
func (*BaseSwitcher) CaseDebugRef ¶
func (s *BaseSwitcher) CaseDebugRef(inst *ssa.DebugRef)
CaseDebugRef accepts a DebugRef instruction
func (*BaseSwitcher) CaseDefer ¶
func (s *BaseSwitcher) CaseDefer(inst *ssa.Defer)
CaseDefer accepts a Defer instruction
func (*BaseSwitcher) CaseExtract ¶
func (s *BaseSwitcher) CaseExtract(inst *ssa.Extract)
CaseExtract accepts an Extract instruction
func (*BaseSwitcher) CaseField ¶
func (s *BaseSwitcher) CaseField(inst *ssa.Field)
CaseField accepts a Field instruction
func (*BaseSwitcher) CaseFieldAddr ¶
func (s *BaseSwitcher) CaseFieldAddr(inst *ssa.FieldAddr)
CaseFieldAddr accepts a FieldAddr instruction
func (*BaseSwitcher) CaseGo ¶
func (s *BaseSwitcher) CaseGo(inst *ssa.Go)
CaseGo accepts a Go instruction
func (*BaseSwitcher) CaseIf ¶
func (s *BaseSwitcher) CaseIf(inst *ssa.If)
CaseIf accepts an If instruction
func (*BaseSwitcher) CaseIndex ¶
func (s *BaseSwitcher) CaseIndex(inst *ssa.Index)
CaseIndex accepts an Index instruction
func (*BaseSwitcher) CaseIndexAddr ¶
func (s *BaseSwitcher) CaseIndexAddr(inst *ssa.IndexAddr)
CaseIndexAddr accepts an IndexAddr instruction
func (*BaseSwitcher) CaseJump ¶
func (s *BaseSwitcher) CaseJump(inst *ssa.Jump)
CaseJump accepts a Jump instruction
func (*BaseSwitcher) CaseLookup ¶
func (s *BaseSwitcher) CaseLookup(inst *ssa.Lookup)
CaseLookup accepts a Lookup instruction
func (*BaseSwitcher) CaseMakeChan ¶
func (s *BaseSwitcher) CaseMakeChan(inst *ssa.MakeChan)
CaseMakeChan accepts a MakeMakeChan instruction
func (*BaseSwitcher) CaseMakeClosure ¶
func (s *BaseSwitcher) CaseMakeClosure(inst *ssa.MakeClosure)
CaseMakeClosure accepts a MakeMakeClosure instruction
func (*BaseSwitcher) CaseMakeInterface ¶
func (s *BaseSwitcher) CaseMakeInterface(inst *ssa.MakeInterface)
CaseMakeInterface accepts a MakeInterface instruction
func (*BaseSwitcher) CaseMakeMap ¶
func (s *BaseSwitcher) CaseMakeMap(inst *ssa.MakeMap)
CaseMakeMap accepts a MakeMakeMap instruction
func (*BaseSwitcher) CaseMakeSlice ¶
func (s *BaseSwitcher) CaseMakeSlice(inst *ssa.MakeSlice)
CaseMakeSlice accepts a MakeSlice instruction
func (*BaseSwitcher) CaseMapUpdate ¶
func (s *BaseSwitcher) CaseMapUpdate(inst *ssa.MapUpdate)
CaseMapUpdate accepts a MapUpdate instruction
func (*BaseSwitcher) CaseNext ¶
func (s *BaseSwitcher) CaseNext(inst *ssa.Next)
CaseNext accepts a Next instruction
func (*BaseSwitcher) CasePanic ¶
func (s *BaseSwitcher) CasePanic(inst *ssa.Panic)
CasePanic accepts a Panic instruction
func (*BaseSwitcher) CasePhi ¶
func (s *BaseSwitcher) CasePhi(inst *ssa.Phi)
CasePhi accepts a Phi instruction
func (*BaseSwitcher) CaseRange ¶
func (s *BaseSwitcher) CaseRange(inst *ssa.Range)
CaseRange accepts a Range instruction
func (*BaseSwitcher) CaseReturn ¶
func (s *BaseSwitcher) CaseReturn(inst *ssa.Return)
CaseReturn accepts a Return instruction
func (*BaseSwitcher) CaseRunDefers ¶
func (s *BaseSwitcher) CaseRunDefers(inst *ssa.RunDefers)
CaseRunDefers accepts a RunDefers instruction
func (*BaseSwitcher) CaseSelect ¶
func (s *BaseSwitcher) CaseSelect(inst *ssa.Select)
CaseSelect accepts a Select instruction
func (*BaseSwitcher) CaseSend ¶
func (s *BaseSwitcher) CaseSend(inst *ssa.Send)
CaseSend accepts a Send instruction
func (*BaseSwitcher) CaseSlice ¶
func (s *BaseSwitcher) CaseSlice(inst *ssa.Slice)
CaseSlice accepts a Slice instruction
func (*BaseSwitcher) CaseSliceToArrayPointer ¶
func (s *BaseSwitcher) CaseSliceToArrayPointer(inst *ssa.SliceToArrayPointer)
CaseSliceToArrayPointer accepts a SliceToArrayPointer instruction
func (*BaseSwitcher) CaseStore ¶
func (s *BaseSwitcher) CaseStore(inst *ssa.Store)
CaseStore accepts a Store instruction
func (*BaseSwitcher) CaseTypeAssert ¶
func (s *BaseSwitcher) CaseTypeAssert(inst *ssa.TypeAssert)
CaseTypeAssert accepts a TypeAssert instruction
func (*BaseSwitcher) CaseUnOp ¶
func (s *BaseSwitcher) CaseUnOp(inst *ssa.UnOp)
CaseUnOp accepts a UnOp instruction
type Switcher ¶
type Switcher interface { CaseAlloc(inst *ssa.Alloc) CasePhi(inst *ssa.Phi) CaseCall(inst *ssa.Call) CaseBinOp(inst *ssa.BinOp) CaseUnOp(inst *ssa.UnOp) CaseChangeType(inst *ssa.ChangeType) CaseConvert(inst *ssa.Convert) CaseChangeInterface(inst *ssa.ChangeInterface) CaseSliceToArrayPointer(inst *ssa.SliceToArrayPointer) CaseMakeInterface(inst *ssa.MakeInterface) CaseMakeClosure(inst *ssa.MakeClosure) CaseMakeMap(inst *ssa.MakeMap) CaseMakeChan(inst *ssa.MakeChan) CaseMakeSlice(inst *ssa.MakeSlice) CaseSlice(inst *ssa.Slice) CaseFieldAddr(inst *ssa.FieldAddr) CaseField(inst *ssa.Field) CaseIndexAddr(inst *ssa.IndexAddr) CaseIndex(inst *ssa.Index) CaseLookup(inst *ssa.Lookup) CaseSelect(inst *ssa.Select) CaseRange(inst *ssa.Range) CaseNext(inst *ssa.Next) CaseTypeAssert(inst *ssa.TypeAssert) CaseExtract(inst *ssa.Extract) CaseJump(inst *ssa.Jump) CaseIf(inst *ssa.If) CaseReturn(inst *ssa.Return) CaseRunDefers(inst *ssa.RunDefers) CasePanic(inst *ssa.Panic) CaseGo(inst *ssa.Go) CaseDefer(inst *ssa.Defer) CaseSend(inst *ssa.Send) CaseStore(inst *ssa.Store) CaseMapUpdate(inst *ssa.MapUpdate) CaseDebugRef(inst *ssa.DebugRef) }
Switcher represents a ssa instruction switcher