Documentation ¶
Index ¶
- Constants
- func ArgumentTypeError(index int, valueType, wantType, funName string) string
- func BlockUnreachable() string
- func ConditionIsConst(control string) string
- func ErrorUnhandled() string
- func ErrorUnhandledWithType(typ string) string
- func FreeValueUndefine(name string) string
- func InvalidField(typ, key string) string
- func NotEnoughArgument(funName string, have, want string) string
- func RunAnalyzer(prog *ssa.Program, opts ...Option)
- type Analyzer
- type AnalyzerBuilder
- type AnalyzerGroup
- type BlockCondition
- type Edge
- type Option
- type TypeCheck
- type TypeInference
Constants ¶
View Source
const BCTag ssa.ErrorTag = "BlockCondition"
View Source
const TITAG = "TypeInference"
View Source
const TypeCheckTAG ssa.ErrorTag = "TypeCheck"
Variables ¶
This section is empty.
Functions ¶
func ArgumentTypeError ¶ added in v1.2.9
func BlockUnreachable ¶
func BlockUnreachable() string
func ConditionIsConst ¶ added in v1.2.9
func ErrorUnhandled ¶
func ErrorUnhandled() string
func ErrorUnhandledWithType ¶
func FreeValueUndefine ¶ added in v1.3.3
func InvalidField ¶
func NotEnoughArgument ¶
func RunAnalyzer ¶ added in v1.3.0
Types ¶
type Analyzer ¶
program pass
func NewBlockCondition ¶
func NewBlockCondition(config) Analyzer
func NewTypeCheck ¶
func NewTypeCheck(config) Analyzer
func NewTypeInference ¶
func NewTypeInference(config) Analyzer
type AnalyzerBuilder ¶
type AnalyzerBuilder func(config) Analyzer
type AnalyzerGroup ¶
analyzer group
func NewAnalyzerGroup ¶
func NewAnalyzerGroup(prog *ssa.Program, opts ...Option) *AnalyzerGroup
func (*AnalyzerGroup) GetError ¶
func (ag *AnalyzerGroup) GetError() ssa.SSAErrors
func (*AnalyzerGroup) Run ¶
func (ag *AnalyzerGroup) Run()
type BlockCondition ¶
type BlockCondition struct { Finish map[*ssa.BasicBlock]struct{} // contains filtered or unexported fields }
block condition
func (*BlockCondition) Run ¶
func (s *BlockCondition) Run(prog *ssa.Program)
func (*BlockCondition) RunOnFunction ¶
func (s *BlockCondition) RunOnFunction(fun *ssa.Function)
type TypeCheck ¶
type TypeCheck struct { }
func (*TypeCheck) CheckOnInstruction ¶
func (t *TypeCheck) CheckOnInstruction(inst ssa.Instruction)
func (*TypeCheck) TypeCheckCall ¶
func (*TypeCheck) TypeCheckUndefine ¶
type TypeInference ¶
type TypeInference struct { Finish map[ssa.Value]struct{} DeleteInst []ssa.Instruction }
func (*TypeInference) InferenceOnInstruction ¶
func (t *TypeInference) InferenceOnInstruction(inst ssa.Instruction)
func (*TypeInference) Run ¶
func (t *TypeInference) Run(prog *ssa.Program)
func (*TypeInference) RunOnFunction ¶
func (t *TypeInference) RunOnFunction(fun *ssa.Function)
func (*TypeInference) TypeInferenceBinOp ¶
func (t *TypeInference) TypeInferenceBinOp(bin *ssa.BinOp)
func (*TypeInference) TypeInferencePhi ¶
func (t *TypeInference) TypeInferencePhi(phi *ssa.Phi)
Click to show internal directories.
Click to hide internal directories.