Documentation ¶
Index ¶
- func Upath(s string) (ret string)
- type CDD
- func (cdd *CDD) AllCDDS() (cdds []*CDD)
- func (cdd *CDD) BlockStmt(w *bytes.Buffer, bs *ast.BlockStmt, resultT string, tup *types.Tuple) (end bool)
- func (cdd *CDD) CallExpr(w *bytes.Buffer, e *ast.CallExpr, permitaa bool)
- func (cdd *CDD) DetermineInline()
- func (cdd *CDD) Expr(w *bytes.Buffer, expr ast.Expr, nilT types.Type, permitaa bool)
- func (cdd *CDD) ExprStr(expr ast.Expr, nilT types.Type, permitaa bool) string
- func (cdd *CDD) GoStmt(w *bytes.Buffer, s *ast.GoStmt)
- func (cdd *CDD) Name(w *bytes.Buffer, obj types.Object, direct bool)
- func (cdd *CDD) NameStr(o types.Object, direct bool) string
- func (cdd *CDD) Nil(w *bytes.Buffer, t types.Type)
- func (cdd *CDD) ReturnStmt(w *bytes.Buffer, s *ast.ReturnStmt, resultT string, tup *types.Tuple) (end bool)
- func (cdd *CDD) SelectorExpr(w *bytes.Buffer, e *ast.SelectorExpr, permitaa bool) (fun, recvt types.Type, recvs string)
- func (cdd *CDD) SelectorExprStr(e *ast.SelectorExpr, permitaa bool) (s string, fun, recvt types.Type, recvs string)
- func (cdd *CDD) SliceExpr(w *bytes.Buffer, e *ast.SliceExpr)
- func (cdd *CDD) Stmt(w *bytes.Buffer, stmt ast.Stmt, label, resultT string, tup *types.Tuple) (end bool)
- func (cdd *CDD) Type(w *bytes.Buffer, typ types.Type) (dim []string)
- func (cdd *CDD) TypeStr(typ types.Type) (string, []string)
- func (cdd *CDD) Value(w *bytes.Buffer, ev constant.Value, t types.Type)
- func (cdd *CDD) WriteDecl(wh, wc io.Writer) error
- func (cdd *CDD) WriteDef(wh, wc io.Writer) error
- type DeclType
- type GTC
- func (cc *GTC) Decl(decl ast.Decl, il int) []*CDD
- func (gtc *GTC) File(f *ast.File) (cdds []*CDD)
- func (gtc *GTC) FuncDecl(d *ast.FuncDecl, il int) (cdds []*CDD)
- func (gtc *GTC) GenDecl(d *ast.GenDecl, il int) (cdds []*CDD)
- func (cc *GTC) SetBoundsCheck(bc bool)
- func (cc *GTC) SetFieldNames(fn bool)
- func (cc *GTC) SetFullTypeInfo(fti bool)
- func (cc *GTC) SetNoinlineThres(thres int)
- func (cc *GTC) SetTypeNames(tn bool)
- func (gtc *GTC) Translate(wh, wc io.Writer, files []*ast.File) error
- type StdSizes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CDD ¶
type CDD struct { Origin types.Object // object for this declaration DeclUses map[types.Object]bool DefUses map[types.Object]bool // Function body, variable initialisation. Complexity int Typ DeclType Export bool Weak bool NoAlloc bool Inline bool // set by DetermineInline() Decl []byte Def []byte Init []byte // contains filtered or unexported fields }
CDD stores Go declaration translated to C declaration and definition.
func (*CDD) DetermineInline ¶
func (cdd *CDD) DetermineInline()
func (*CDD) ReturnStmt ¶
func (*CDD) SelectorExpr ¶
func (*CDD) SelectorExprStr ¶
type GTC ¶
type GTC struct {
// contains filtered or unexported fields
}
GTC stores information from type checker need for translation.
func (*GTC) SetBoundsCheck ¶
func (*GTC) SetFieldNames ¶
func (*GTC) SetFullTypeInfo ¶
func (*GTC) SetNoinlineThres ¶
func (*GTC) SetTypeNames ¶
Click to show internal directories.
Click to hide internal directories.