Documentation ¶
Index ¶
- Constants
- type Attribute
- type Builder
- type Compiler
- type CompilerOptions
- type ExprTypeInfo
- type ExprTypeMap
- type FunctionCache
- func (compiler FunctionCache) Compile(fset *token.FileSet, files []*ast.File, importpath string) (m *Module, err error)
- func (compiler FunctionCache) Dispose()
- func (c *FunctionCache) NamedFunction(name string, signature string) llvm.Value
- func (c FunctionCache) NewConstValue(v exact.Value, typ types.Type) *LLVMValue
- func (c FunctionCache) NewValue(v llvm.Value, t types.Type) *LLVMValue
- func (c FunctionCache) Resolve(ident *ast.Ident) Value
- func (c FunctionCache) VisitAppend(expr *ast.CallExpr) Value
- func (c FunctionCache) VisitAssignStmt(stmt *ast.AssignStmt)
- func (c FunctionCache) VisitBinaryExpr(x *ast.BinaryExpr) Value
- func (c FunctionCache) VisitBlockStmt(stmt *ast.BlockStmt, createNewBlock bool)
- func (c FunctionCache) VisitBranchStmt(stmt *ast.BranchStmt)
- func (c FunctionCache) VisitCallExpr(expr *ast.CallExpr) Value
- func (c FunctionCache) VisitCap(expr *ast.CallExpr) Value
- func (c FunctionCache) VisitCompositeLit(lit *ast.CompositeLit) (v *LLVMValue)
- func (c FunctionCache) VisitCopy(expr *ast.CallExpr) Value
- func (c FunctionCache) VisitDecl(decl ast.Decl) Value
- func (c FunctionCache) VisitDeferStmt(stmt *ast.DeferStmt)
- func (c FunctionCache) VisitExpr(expr ast.Expr) Value
- func (c FunctionCache) VisitForStmt(stmt *ast.ForStmt)
- func (c FunctionCache) VisitFuncDecl(f *ast.FuncDecl) Value
- func (c FunctionCache) VisitFuncLit(lit *ast.FuncLit) Value
- func (c FunctionCache) VisitGenDecl(decl *ast.GenDecl)
- func (c FunctionCache) VisitGoStmt(stmt *ast.GoStmt)
- func (c FunctionCache) VisitIfStmt(stmt *ast.IfStmt)
- func (c FunctionCache) VisitIncDecStmt(stmt *ast.IncDecStmt)
- func (c FunctionCache) VisitIndexExpr(expr *ast.IndexExpr) Value
- func (c FunctionCache) VisitLabeledStmt(stmt *ast.LabeledStmt)
- func (c FunctionCache) VisitLen(expr *ast.CallExpr) Value
- func (c FunctionCache) VisitMake(expr *ast.CallExpr) Value
- func (c FunctionCache) VisitNew(expr *ast.CallExpr) Value
- func (c FunctionCache) VisitRangeStmt(stmt *ast.RangeStmt)
- func (c FunctionCache) VisitReturnStmt(stmt *ast.ReturnStmt)
- func (c FunctionCache) VisitSelectStmt(stmt *ast.SelectStmt)
- func (c FunctionCache) VisitSelectorExpr(expr *ast.SelectorExpr) Value
- func (c FunctionCache) VisitSendStmt(stmt *ast.SendStmt)
- func (c FunctionCache) VisitSliceExpr(expr *ast.SliceExpr) Value
- func (c FunctionCache) VisitStarExpr(expr *ast.StarExpr) Value
- func (c FunctionCache) VisitStmt(stmt ast.Stmt)
- func (c FunctionCache) VisitSwitchStmt(stmt *ast.SwitchStmt)
- func (c FunctionCache) VisitTypeAssertExpr(expr *ast.TypeAssertExpr) Value
- func (c FunctionCache) VisitTypeSwitchStmt(stmt *ast.TypeSwitchStmt)
- func (c FunctionCache) VisitUnaryExpr(expr *ast.UnaryExpr) Value
- func (c FunctionCache) VisitValueSpec(valspec *ast.ValueSpec)
- type LLVMTypeMap
- type LLVMValue
- type LabelData
- type Module
- type ObjectData
- type Resolver
- type TypeMap
- type TypeStringer
- type Value
Constants ¶
View Source
const ( LLGOAuthor = "Andrew Wilkins <[email protected]>" LLGOProducer = "llgo " + LLGOVersion + " (" + LLGOAuthor + ")" )
llgo constants.
View Source
const ( LLGOVersion = "0.1" LLGORuntimeVersion = 0 )
View Source
const AttributeCommentPrefix = "#llgo "
View Source
const PNaClTriple = "armv7-none-linux-gnueabi"
PNaClTriple is the LLVM target triple that should be used to compile modules to be compatible with PNaCl (Portable Native Client).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute interface {
Apply(Value)
}
Attribute represents an attribute associated with a global variable or function.
type Builder ¶
func (*Builder) CreateStore ¶
type Compiler ¶
type Compiler interface { Compile(fset *token.FileSet, files []*ast.File, importpath string) (*Module, error) Dispose() }
TODO get rid of this, change compiler to Compiler.
func NewCompiler ¶
func NewCompiler(opts CompilerOptions) (Compiler, error)
type CompilerOptions ¶
type ExprTypeInfo ¶
type ExprTypeMap ¶
type ExprTypeMap map[ast.Expr]ExprTypeInfo
type FunctionCache ¶
type FunctionCache struct {
// contains filtered or unexported fields
}
func NewFunctionCache ¶
func NewFunctionCache(c *compiler) *FunctionCache
func (*FunctionCache) NamedFunction ¶
func (c *FunctionCache) NamedFunction(name string, signature string) llvm.Value
func (FunctionCache) NewConstValue ¶
func (FunctionCache) VisitAppend ¶
func (FunctionCache) VisitAssignStmt ¶
func (c FunctionCache) VisitAssignStmt(stmt *ast.AssignStmt)
func (FunctionCache) VisitBinaryExpr ¶
func (c FunctionCache) VisitBinaryExpr(x *ast.BinaryExpr) Value
func (FunctionCache) VisitBlockStmt ¶
func (FunctionCache) VisitBranchStmt ¶
func (c FunctionCache) VisitBranchStmt(stmt *ast.BranchStmt)
func (FunctionCache) VisitCallExpr ¶
func (FunctionCache) VisitCompositeLit ¶
func (c FunctionCache) VisitCompositeLit(lit *ast.CompositeLit) (v *LLVMValue)
func (FunctionCache) VisitDeferStmt ¶
func (FunctionCache) VisitForStmt ¶
func (FunctionCache) VisitFuncDecl ¶
func (FunctionCache) VisitFuncLit ¶
func (FunctionCache) VisitGenDecl ¶
func (FunctionCache) VisitGoStmt ¶
func (FunctionCache) VisitIfStmt ¶
func (FunctionCache) VisitIncDecStmt ¶
func (c FunctionCache) VisitIncDecStmt(stmt *ast.IncDecStmt)
func (FunctionCache) VisitIndexExpr ¶
func (FunctionCache) VisitLabeledStmt ¶
func (c FunctionCache) VisitLabeledStmt(stmt *ast.LabeledStmt)
func (FunctionCache) VisitRangeStmt ¶
func (FunctionCache) VisitReturnStmt ¶
func (c FunctionCache) VisitReturnStmt(stmt *ast.ReturnStmt)
func (FunctionCache) VisitSelectStmt ¶
func (c FunctionCache) VisitSelectStmt(stmt *ast.SelectStmt)
func (FunctionCache) VisitSelectorExpr ¶
func (c FunctionCache) VisitSelectorExpr(expr *ast.SelectorExpr) Value
func (FunctionCache) VisitSendStmt ¶
func (FunctionCache) VisitSliceExpr ¶
func (FunctionCache) VisitStarExpr ¶
func (FunctionCache) VisitSwitchStmt ¶
func (c FunctionCache) VisitSwitchStmt(stmt *ast.SwitchStmt)
func (FunctionCache) VisitTypeAssertExpr ¶
func (c FunctionCache) VisitTypeAssertExpr(expr *ast.TypeAssertExpr) Value
func (FunctionCache) VisitTypeSwitchStmt ¶
func (c FunctionCache) VisitTypeSwitchStmt(stmt *ast.TypeSwitchStmt)
func (FunctionCache) VisitUnaryExpr ¶
func (FunctionCache) VisitValueSpec ¶
type LLVMTypeMap ¶
type LLVMTypeMap struct { TypeStringer // contains filtered or unexported fields }
func NewLLVMTypeMap ¶
func NewLLVMTypeMap(target llvm.TargetData) *LLVMTypeMap
type LLVMValue ¶
type LLVMValue struct {
// contains filtered or unexported fields
}
LLVMValue represents a dynamic value produced as the result of an expression.
type LabelData ¶
type LabelData struct {
Goto, Break, Continue llvm.BasicBlock
}
type ObjectData ¶
ObjectData stores information for a types.Object
type TypeMap ¶
type TypeMap struct { *LLVMTypeMap // contains filtered or unexported fields }
func NewTypeMap ¶
func NewTypeMap(llvmtm *LLVMTypeMap, module llvm.Module, pkgpath string, exprTypes ExprTypeMap, c *FunctionCache, r Resolver) *TypeMap
type TypeStringer ¶
type TypeStringer struct {
// contains filtered or unexported fields
}
func (*TypeStringer) TypeString ¶
func (ts *TypeStringer) TypeString(typ types.Type) string
typeString returns a string representation for typ. below code based on go/types' typeString and friends.
type Value ¶
type Value interface { // BinaryOp applies the specified binary operator to this value and the // specified right-hand operand, and returns a new Value. BinaryOp(op token.Token, rhs Value) Value // UnaryOp applies the specified unary operator and returns a new Value. UnaryOp(op token.Token) Value // Convert returns a new Value which has been converted to the specified // type. Convert(typ types.Type) Value // LLVMValue returns an llvm.Value for this value. LLVMValue() llvm.Value // Type returns the Type of the value. Type() types.Type }
Value is an interface for representing values returned by Go expressions.
Source Files ¶
- attribute.go
- builder.go
- channels.go
- check.go
- compiler.go
- debug.go
- decl.go
- defer.go
- errors.go
- expr.go
- functions.go
- goroutine.go
- interfaces.go
- intrinsics.go
- labels.go
- len.go
- literals.go
- make.go
- maps.go
- new.go
- package.go
- pnacl.go
- predicates.go
- println.go
- runtime.go
- slice.go
- stmt.go
- strings.go
- typemap.go
- types.go
- value.go
- version.go
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
llgo-go
Go is a tool for managing Go source code.
|
Go is a tool for managing Go source code. |
pkg
|
|
runtime
Package runtime contains operations that interact with Go's runtime system, such as functions to control goroutines.
|
Package runtime contains operations that interact with Go's runtime system, such as functions to control goroutines. |
Click to show internal directories.
Click to hide internal directories.