Versions in this module Expand all Collapse all v1 v1.0.0 Jan 10, 2019 Changes in this version + const AssignSymbol + const BlockSymbol + const CallSymbol + const ChanSymbol + const ErrorSymbol + const ExitSymbol + const FieldSymbol + const FuncEnterSymbol + const FuncExitSymbol + const IfSymbol + const JumpSymbol + const LoopSymbol + const MoreSymbol + const NewSymbol + const ParamSymbol + const PhiSymbol + const RecvSymbol + const ReturnSymbol + const SelectSymbol + const SendSymbol + const SkipSymbol + const SpawnSymbol + const SplitSymbol + const SubSymbol + const ValSymbol + var ErrEmptyStack = errors.New("stack: empty") + var ErrIfaceIncomplete = errors.New("interface not fully implemented") + var ErrIncompatType = errors.New("cannot convert incompatible type") + var ErrInvalidIfSucc = errors.New("internal error: wrong number of Succ for If (expects 2)") + var ErrInvalidJumpSucc = errors.New("internal error: wrong number of Succ for Jump (expects 1)") + var ErrInvalidVarRead = errors.New("internal error: read from uninitialised variable") + var ErrInvalidVarWrite = errors.New("internal error: write to uninitialised variable") + var ErrMakeChanNonChan = errors.New("type error: MakeChan creates non-channel type channel") + var ErrMethodNotFound = errors.New("interface method not found") + var ErrNoMainPkg = errors.New("no main package found") + var ErrNonConstChanBuf = errors.New("MakeChan creates channel with non-const buffer size") + var ErrPhiUnknownEdge = errors.New("phi node has edge from unknown block") + var ErrRuntimeLen = errors.New("length can only be determined at runtime") + var ErrUnimplemented = errors.New("unimplemented") + var ErrUnitialisedFunc = errors.New("operation on uninitialised function (did you call prepareVisit?)") + var ErrUnknownValue = errors.New("internal error: unknown SSA value") + var ErrWrongArgNum = errors.New("wrong number of arguments") + type Block struct + Function *Function + Index int + MigoDef *migo.Function + Pred int + func NewBlock(parent *Function, block *ssa.BasicBlock, curr int) *Block + type Captures []Instance + type CommaOk struct + Instr ssa.Instruction + OkCond Instance + Result Instance + type Const struct + func (c *Const) Instance() (int, int) + func (c *Const) String() string + type Context struct + B *Block + F *Function + L *Loop + type Elems map[ssa.Value]Instance + type External struct + func (i *External) Instance() (int, int) + func (i *External) String() string + type Fields []Instance + type Function struct + Caller *Function + ChildBlocks map[int]*Block + Fn *ssa.Function + FuncDef *migo.Function + Level int + Prog *Program + Visited map[*ssa.BasicBlock]int + func NewFunction(caller *Function) *Function + func NewMainFunction(prog *Program, mainFn *ssa.Function) *Function + func (caller *Function) Call(call *ssa.Call, infer *TypeInfer, b *Block, l *Loop) + func (caller *Function) Go(instr *ssa.Go, infer *TypeInfer) + func (caller *Function) HasBody() bool + func (caller *Function) InstanceID() int + func (caller *Function) IsRecursiveCall() bool + func (caller *Function) String() string + func (ctx *Function) Sprintf(format string, a ...interface{}) string + type Instance interface + Instance func() (int, int) + String func() string + type Loop struct + Bound LoopBound + CondVar ssa.Value + End int64 + Index int64 + IndexVar ssa.Value + LoopBlock int + Parent *Function + Start int64 + State LoopState + Step int64 + func (l *Loop) HasNext() bool + func (l *Loop) Next() + func (l *Loop) SetCond(cond ssa.Value, max int64) + func (l *Loop) SetInit(index ssa.Value, init int64) + func (l *Loop) SetStep(step int64) + func (l *Loop) String() string + type LoopBound int + const Dynamic + const Static + const Unknown + func (i LoopBound) String() string + type LoopStack struct + func NewLoopStack() *LoopStack + func (s *LoopStack) IsEmpty() bool + func (s *LoopStack) Pop() (*Loop, error) + func (s *LoopStack) Push(l *Loop) + type LoopState int + const Body + const Enter + const Exit + const NonLoop + func (i LoopState) String() string + type Placeholder struct + func (i *Placeholder) Instance() (int, int) + func (i *Placeholder) String() string + type Program struct + FuncInstance map[*ssa.Function]int + Infer *TypeInfer + InitPkgs map[*ssa.Package]bool + MigoProg *migo.Program + func NewProgram(infer *TypeInfer) *Program + type Select struct + Index Instance + Instr *ssa.Select + MigoStmt *migo.SelectStatement + type Storage struct + func NewStorage() *Storage + type Tuples []Instance + type TypeInfer struct + Done chan struct{} + Env *Program + Error chan error + GQueue []*Function + Logger *log.Logger + SSA *ssabuilder.SSAInfo + Time time.Duration + func New(ssainfo *ssabuilder.SSAInfo, inferlog io.Writer) (*TypeInfer, error) + func (infer *TypeInfer) Run() + func (infer *TypeInfer) RunQueue() + type Value struct + func (i *Value) Instance() (int, int) + func (i *Value) String() string