Documentation ¶
Index ¶
- Constants
- Variables
- func E2T(typeExpr ast.Expr) *types.Type
- func EvalInt(expr ast.Expr) int
- func FieldList2Types(fieldList *ast.FieldList) []*types.Type
- func GetArrayLen(t *types.Type) int
- func GetElementTypeOfCollectionType(t *types.Type) *types.Type
- func GetMethodSymbol(method *ir.Method) string
- func GetPackageSymbol(pkgName string, subsymbol string) string
- func GetSizeOfType(t *types.Type) int
- func GetStructFieldOffset(field *ast.Field) int
- func GetTupleTypes(rhsMeta ir.MetaExpr) []*types.Type
- func GetTypeOfExpr(meta ir.MetaExpr) *types.Type
- func GetUnderlyingStructType(t *types.Type) *ast.StructType
- func GetUnderlyingType(t *types.Type) *types.Type
- func IsBlankIdentifierMeta(m ir.MetaExpr) bool
- func IsInterface(t *types.Type) bool
- func IsNil(meta ir.MetaExpr) bool
- func IsOkSyntax(rhs ir.MetaExpr) bool
- func Kind(t *types.Type) types.TypeKind
- func LinePosition(pos token.Pos) string
- func LookupForeignFunc(qi ir.QualifiedIdent) *ir.ForeignFunc
- func LookupForeignIdent(qi ir.QualifiedIdent) *ast.Ident
- func LookupStructField(structType *ast.StructType, selName string) *ast.Field
- func NewFuncValueFromSymbol(symbol string) *ir.FuncValue
- func NewNumberLiteral(x int) *ir.MetaBasicLit
- func NewQI(pkg string, ident string) ir.QualifiedIdent
- func Pos(node interface{}) token.Pos
- func Selector2QI(e *ast.SelectorExpr) ir.QualifiedIdent
- func SerializeType(t *types.Type) string
- func SetVariable(obj *ast.Object, vr *ir.Variable)
- func Walk(pkg *ir.PkgContainer) *ir.AnalyzedPackage
- func WalkIdent(e *ast.Ident, ctx *ir.EvalContext) *ir.MetaIdent
- type AstArg
Constants ¶
View Source
const SizeOfInt int = 8
View Source
const SizeOfInterface int = 16
View Source
const SizeOfPtr int = 8
View Source
const SizeOfSlice int = 24
View Source
const SizeOfString int = 16
View Source
const SizeOfUint16 int = 2
View Source
const SizeOfUint8 int = 1
View Source
const ThrowFormat string = "%T"
Variables ¶
View Source
var CurrentPkg *ir.PkgContainer
View Source
var ExportedQualifiedIdents = make(map[string]*ast.Ident)
View Source
var Fset *token.FileSet
View Source
var GeneralSliceType *types.Type = &types.Type{}
https://golang.org/ref/spec#Method_sets @TODO map key should be a QI ?
Functions ¶
func GetArrayLen ¶
func GetMethodSymbol ¶
func GetPackageSymbol ¶
func GetSizeOfType ¶
func GetStructFieldOffset ¶
func GetTypeOfExpr ¶
Types of an expr in Single value context
func GetUnderlyingStructType ¶
func GetUnderlyingStructType(t *types.Type) *ast.StructType
func IsBlankIdentifierMeta ¶
func IsInterface ¶
func IsOkSyntax ¶
func LinePosition ¶
func LookupForeignFunc ¶
func LookupForeignFunc(qi ir.QualifiedIdent) *ir.ForeignFunc
func LookupForeignIdent ¶
func LookupForeignIdent(qi ir.QualifiedIdent) *ast.Ident
func LookupStructField ¶
func LookupStructField(structType *ast.StructType, selName string) *ast.Field
func NewFuncValueFromSymbol ¶
func NewNumberLiteral ¶
func NewNumberLiteral(x int) *ir.MetaBasicLit
func Selector2QI ¶
func Selector2QI(e *ast.SelectorExpr) ir.QualifiedIdent
func SerializeType ¶
func Walk ¶
func Walk(pkg *ir.PkgContainer) *ir.AnalyzedPackage
Purpose of walk: - collect string literals - collect method declarations - collect global variables - collect local variables and set offset - determine struct size and field offset - determine Types of variable declarations - attach type to every expression - transmit ok syntax context - (hope) attach type to untyped constants - (hope) transmit the need of interface conversion
Types ¶
Click to show internal directories.
Click to hide internal directories.