ssa4analyze

package
v1.3.3-rc7 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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 ArgumentTypeError(index int, valueType, wantType, funName string) string

func BlockUnreachable

func BlockUnreachable() string

func ConditionIsConst added in v1.2.9

func ConditionIsConst(control string) string

func ErrorUnhandled

func ErrorUnhandled() string

func ErrorUnhandledWithType

func ErrorUnhandledWithType(typ string) string

func FreeValueUndefine added in v1.3.3

func FreeValueUndefine(name string) string

func InvalidField

func InvalidField(typ, key string) string

func NotEnoughArgument

func NotEnoughArgument(funName string, have, want string) string

func RunAnalyzer added in v1.3.0

func RunAnalyzer(prog *ssa.Program, opts ...Option)

Types

type Analyzer

type Analyzer interface {
	Run(*ssa.Program)
}

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

type AnalyzerGroup struct {
	Ir *ssa.Program
	// contains filtered or unexported fields
}

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 Edge

type Edge map[*ssa.BasicBlock]map[*ssa.BasicBlock]ssa.Value

map to -> from -> condition

type Option

type Option func(*config)

type TypeCheck

type TypeCheck struct {
}

func (*TypeCheck) CheckOnInstruction

func (t *TypeCheck) CheckOnInstruction(inst ssa.Instruction)

func (*TypeCheck) Run

func (t *TypeCheck) Run(prog *ssa.Program)

Analyze(config, *ssa.Program)

func (*TypeCheck) TypeCheckCall

func (t *TypeCheck) TypeCheckCall(c *ssa.Call)

func (*TypeCheck) TypeCheckUndefine

func (t *TypeCheck) TypeCheckUndefine(inst *ssa.Undefined)

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)

Jump to

Keyboard shortcuts

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