Documentation
¶
Index ¶
- Variables
- type Array
- type BoolType
- func (b *BoolType) AddMethod(name string, method *Method)
- func (b *BoolType) GetMethod(name string) (*Method, bool)
- func (BoolType) IsSigned() bool
- func (BoolType) LLVM() types.Type
- func (BoolType) Name() string
- func (BoolType) Size() int64
- func (b BoolType) Zero(block *ir.Block, alloca llvmValue.Value)
- type Function
- type Int
- type Interface
- func (b *Interface) AddMethod(name string, method *Method)
- func (b *Interface) GetMethod(name string) (*Method, bool)
- func (Interface) IsSigned() bool
- func (i Interface) JumpTable() *types.StructType
- func (i Interface) LLVM() types.Type
- func (i Interface) Name() string
- func (Interface) Size() int64
- func (i Interface) SortedRequiredMethods() []string
- func (Interface) Zero(*ir.Block, llvmValue.Value)
- type InterfaceMethod
- func (b *InterfaceMethod) AddMethod(name string, method *Method)
- func (b *InterfaceMethod) GetMethod(name string) (*Method, bool)
- func (InterfaceMethod) IsSigned() bool
- func (InterfaceMethod) LLVM() types.Type
- func (InterfaceMethod) Name() string
- func (InterfaceMethod) Size() int64
- func (InterfaceMethod) Zero(*ir.Block, llvmValue.Value)
- type Method
- type MultiValue
- func (b *MultiValue) AddMethod(name string, method *Method)
- func (b *MultiValue) GetMethod(name string) (*Method, bool)
- func (MultiValue) IsSigned() bool
- func (m MultiValue) LLVM() types.Type
- func (m MultiValue) Name() string
- func (MultiValue) Size() int64
- func (MultiValue) Zero(*ir.Block, llvmValue.Value)
- type PackageInstance
- func (b *PackageInstance) AddMethod(name string, method *Method)
- func (p *PackageInstance) GetFunc(name string) (*Function, bool)
- func (b *PackageInstance) GetMethod(name string) (*Method, bool)
- func (PackageInstance) IsSigned() bool
- func (PackageInstance) LLVM() types.Type
- func (p PackageInstance) Name() string
- func (p *PackageInstance) SetFunc(name string, val *Function)
- func (p *PackageInstance) SetName(name string)
- func (PackageInstance) Size() int64
- func (PackageInstance) Zero(*ir.Block, llvmValue.Value)
- type Pointer
- type Slice
- func (b *Slice) AddMethod(name string, method *Method)
- func (b *Slice) GetMethod(name string) (*Method, bool)
- func (Slice) IsSigned() bool
- func (s Slice) LLVM() types.Type
- func (Slice) Name() string
- func (Slice) Size() int64
- func (s Slice) SliceZero(block *ir.Block, mallocFunc llvmValue.Named, initCap int, ...)
- func (Slice) Zero(*ir.Block, llvmValue.Value)
- type StringType
- func (b *StringType) AddMethod(name string, method *Method)
- func (b *StringType) GetMethod(name string) (*Method, bool)
- func (StringType) IsSigned() bool
- func (StringType) LLVM() types.Type
- func (StringType) Name() string
- func (StringType) Size() int64
- func (s StringType) Zero(block *ir.Block, alloca llvmValue.Value)
- type Struct
- type Type
- type UntypedConstantNumber
- func (b *UntypedConstantNumber) AddMethod(name string, method *Method)
- func (b *UntypedConstantNumber) GetMethod(name string) (*Method, bool)
- func (UntypedConstantNumber) IsSigned() bool
- func (m UntypedConstantNumber) LLVM() types.Type
- func (m UntypedConstantNumber) Name() string
- func (UntypedConstantNumber) Size() int64
- func (UntypedConstantNumber) Zero(*ir.Block, llvmValue.Value)
- type VoidType
Constants ¶
This section is empty.
Variables ¶
View Source
var Bool = &BoolType{}
View Source
var EmptyStringConstant *ir.Global
View Source
var I16 = &Int{Type: types.I16, TypeName: "int16", TypeSize: 18 / 8, Signed: true}
View Source
var I32 = &Int{Type: types.I32, TypeName: "int32", TypeSize: 32 / 8, Signed: true}
View Source
var I64 = &Int{Type: types.I64, TypeName: "int64", TypeSize: 64 / 8, Signed: true}
View Source
var I8 = &Int{Type: types.I8, TypeName: "int8", TypeSize: 8 / 8, Signed: true}
View Source
var ModuleStringType types.Type
Populated by compiler.go
View Source
var String = &StringType{}
View Source
var U128 = &Int{Type: types.I128, TypeName: "uint128", TypeSize: 128 / 8}
View Source
var U16 = &Int{Type: types.I16, TypeName: "uint16", TypeSize: 18 / 8}
View Source
var U256 = &Int{Type: types.I256, TypeName: "uint256", TypeSize: 256 / 8}
View Source
var U32 = &Int{Type: types.I32, TypeName: "uint32", TypeSize: 32 / 8}
View Source
var U64 = &Int{Type: types.I64, TypeName: "uint64", TypeSize: 64 / 8}
View Source
var U8 = &Int{Type: types.I8, TypeName: "uint8", TypeSize: 8 / 8}
View Source
var Uintptr = &Int{Type: types.I64, TypeName: "uintptr", TypeSize: 64 / 8}
View Source
var Void = &VoidType{}
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Function ¶
type Function struct { // LlvmFunction llvmValue.Named FuncType types.Type // The return type of the LLVM function (is always 1) LlvmReturnType Type // Return types of the Tre function ReturnTypes []Type IsVariadic bool ArgumentTypes []Type IsExternal bool // Is used when calling an interface method JumpFunction *ir.Func // contains filtered or unexported fields }
type Int ¶
type Interface ¶
type Interface struct { SourceName string RequiredMethods map[string]InterfaceMethod // contains filtered or unexported fields }
func (Interface) JumpTable ¶
func (i Interface) JumpTable() *types.StructType
func (Interface) SortedRequiredMethods ¶
SortedRequiredMethods returns a sorted slice of all method names The returned order is the order the methods will be layed out in the JumpTable
type InterfaceMethod ¶
type InterfaceMethod struct { LlvmJumpFunction llvmValue.Named ArgumentTypes []Type ReturnTypes []Type // contains filtered or unexported fields }
func (InterfaceMethod) LLVM ¶
func (InterfaceMethod) LLVM() types.Type
func (InterfaceMethod) Name ¶
func (InterfaceMethod) Name() string
type Method ¶
type MultiValue ¶
type MultiValue struct { Types []Type // contains filtered or unexported fields }
MultiValue is used when returning multiple values from a function
func (MultiValue) LLVM ¶
func (m MultiValue) LLVM() types.Type
func (MultiValue) Name ¶
func (m MultiValue) Name() string
type PackageInstance ¶
type PackageInstance struct {
// contains filtered or unexported fields
}
func (PackageInstance) LLVM ¶
func (PackageInstance) LLVM() types.Type
func (PackageInstance) Name ¶
func (p PackageInstance) Name() string
func (*PackageInstance) SetFunc ¶
func (p *PackageInstance) SetFunc(name string, val *Function)
func (*PackageInstance) SetName ¶
func (p *PackageInstance) SetName(name string)
type Pointer ¶
type Slice ¶
type Slice struct { Type Type // type of the items in the slice []int => int LlvmType types.Type // contains filtered or unexported fields }
type StringType ¶
func (StringType) LLVM ¶
func (StringType) LLVM() types.Type
func (StringType) Name ¶
func (StringType) Name() string
func (StringType) Size ¶
func (StringType) Size() int64
type Struct ¶
type UntypedConstantNumber ¶
type UntypedConstantNumber struct {
// contains filtered or unexported fields
}
func (UntypedConstantNumber) LLVM ¶
func (m UntypedConstantNumber) LLVM() types.Type
func (UntypedConstantNumber) Name ¶
func (m UntypedConstantNumber) Name() string
Click to show internal directories.
Click to hide internal directories.