Documentation
¶
Index ¶
- func CheckPositions(files []*syntax.File, phase string)
- func RewriteWrapper(pkg *types2.Package, info *types2.Info, files []*syntax.File) bool
- type Analyzer
- type DeepCopier
- func (c *DeepCopier) CopyBlockStmt(b *syntax.BlockStmt) *syntax.BlockStmt
- func (c *DeepCopier) CopyCaseClauses(list []*syntax.CaseClause) []*syntax.CaseClause
- func (c *DeepCopier) CopyCommClauses(list []*syntax.CommClause) []*syntax.CommClause
- func (c *DeepCopier) CopyConstDecl(d *syntax.ConstDecl) *syntax.ConstDecl
- func (c *DeepCopier) CopyDecl(d syntax.Decl) syntax.Decl
- func (c *DeepCopier) CopyExpr(e syntax.Expr) syntax.Expr
- func (c *DeepCopier) CopyField(f *syntax.Field) *syntax.Field
- func (c *DeepCopier) CopyFieldList(f []*syntax.Field) []*syntax.Field
- func (c *DeepCopier) CopyFuncDecl(d *syntax.FuncDecl) *syntax.FuncDecl
- func (c *DeepCopier) CopyName(id *syntax.Name, isDef bool) *syntax.Name
- func (c *DeepCopier) CopyNameExpr(id *syntax.Name) syntax.Expr
- func (c *DeepCopier) CopySimpleStmt(s syntax.SimpleStmt) syntax.SimpleStmt
- func (c *DeepCopier) CopyStmt(s syntax.Stmt) syntax.Stmt
- func (c *DeepCopier) CopyTypeDecl(d *syntax.TypeDecl) *syntax.TypeDecl
- func (c *DeepCopier) CopyVarDecl(d *syntax.VarDecl) *syntax.VarDecl
- func (c *DeepCopier) OnName(id *syntax.Name) *syntax.Name
- func (c *DeepCopier) OnNameExpr(id *syntax.Name) syntax.Expr
- func (c *DeepCopier) OnSelector(se *syntax.SelectorExpr) syntax.Expr
- type Rewriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPositions ¶
CheckPositions checks that all nodes in the files have known positions. This converts lack-of-Pos into an early fatal error instead of a later weird downstream error (e.g., in the linker, in debugging information).
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
Analyzer holds the state for SIMD dependency analysis
type DeepCopier ¶
type DeepCopier struct {
VecLen int
// contains filtered or unexported fields
}
DeepCopier clones syntax nodes and maintains types2.Info mappings.
func NewDeepCopier ¶
func (*DeepCopier) CopyBlockStmt ¶
func (c *DeepCopier) CopyBlockStmt(b *syntax.BlockStmt) *syntax.BlockStmt
func (*DeepCopier) CopyCaseClauses ¶
func (c *DeepCopier) CopyCaseClauses(list []*syntax.CaseClause) []*syntax.CaseClause
func (*DeepCopier) CopyCommClauses ¶
func (c *DeepCopier) CopyCommClauses(list []*syntax.CommClause) []*syntax.CommClause
func (*DeepCopier) CopyConstDecl ¶
func (c *DeepCopier) CopyConstDecl(d *syntax.ConstDecl) *syntax.ConstDecl
func (*DeepCopier) CopyFieldList ¶
func (c *DeepCopier) CopyFieldList(f []*syntax.Field) []*syntax.Field
func (*DeepCopier) CopyFuncDecl ¶
func (c *DeepCopier) CopyFuncDecl(d *syntax.FuncDecl) *syntax.FuncDecl
func (*DeepCopier) CopyNameExpr ¶
func (c *DeepCopier) CopyNameExpr(id *syntax.Name) syntax.Expr
func (*DeepCopier) CopySimpleStmt ¶
func (c *DeepCopier) CopySimpleStmt(s syntax.SimpleStmt) syntax.SimpleStmt
func (*DeepCopier) CopyTypeDecl ¶
func (c *DeepCopier) CopyTypeDecl(d *syntax.TypeDecl) *syntax.TypeDecl
func (*DeepCopier) CopyVarDecl ¶
func (c *DeepCopier) CopyVarDecl(d *syntax.VarDecl) *syntax.VarDecl
func (*DeepCopier) OnName ¶
func (c *DeepCopier) OnName(id *syntax.Name) *syntax.Name
OnName rewrites "dependent" and SIMD names to their architecture-specific version.
func (*DeepCopier) OnNameExpr ¶
func (c *DeepCopier) OnNameExpr(id *syntax.Name) syntax.Expr
OnNameExpr rewrites references to simd.<simd type> into <bridge package>.<size-dependent-type>.
func (*DeepCopier) OnSelector ¶
func (c *DeepCopier) OnSelector(se *syntax.SelectorExpr) syntax.Expr
OnSelector is looking for simd.Something, to be rewritten into appropriately. Note that this will not work properly within the simd package because there is no "simd." selection there.