Documentation ¶
Index ¶
- Constants
- type ErrorHandler
- func (self *ErrorHandler) Debug(v ...interface{})
- func (self *ErrorHandler) Debugf(format string, v ...interface{})
- func (self *ErrorHandler) Error(v ...interface{})
- func (self *ErrorHandler) ErrorOccured() bool
- func (self *ErrorHandler) Errorf(format string, v ...interface{})
- func (self *ErrorHandler) Fatal(v ...interface{})
- func (self *ErrorHandler) Fatalf(format string, v ...interface{})
- func (self *ErrorHandler) GetErrors() int
- func (self *ErrorHandler) Info(v ...interface{})
- func (self *ErrorHandler) Infof(format string, v ...interface{})
- func (self *ErrorHandler) Panic(v ...interface{})
- func (self *ErrorHandler) Panicf(format string, v ...interface{})
- func (self *ErrorHandler) Warn(v ...interface{})
- func (self *ErrorHandler) Warnf(format string, v ...interface{})
- type IAssembly
- type IAssemblyCode
- type IBinaryOpNode
- type ICompositeType
- type ICompositeTypeDefinition
- type IEntity
- type IExpr
- type IExprNode
- type IFunction
- type IImmediateValue
- type ILiteral
- type IMemoryReference
- type INamedType
- type INode
- type IOperand
- type IRegister
- type IScope
- type ISlot
- type IStatistics
- type IStmt
- type IStmtNode
- type ISymbol
- type ISymbolTable
- type IType
- type ITypeDefinition
- type ITypeNode
- type ITypeRef
- type IUnaryArithmeticOpNode
- type IVariable
- type Location
- type Options
- func (self *Options) CheckSyntax() bool
- func (self *Options) DumpAST() bool
- func (self *Options) DumpAsm() bool
- func (self *Options) DumpExpr() bool
- func (self *Options) DumpIR() bool
- func (self *Options) DumpReference() bool
- func (self *Options) DumpSemantic() bool
- func (self *Options) DumpStmt() bool
- func (self *Options) DumpTokens() bool
- func (self *Options) GetLibraryPath() []string
- func (self *Options) IsAssembleRequired() bool
- func (self *Options) IsCompileRequired() bool
- func (self *Options) IsGenratingSharedLibrary() bool
- func (self *Options) IsLinkRequired() bool
- func (self *Options) IsPICRequired() bool
- func (self *Options) IsPIERequired() bool
- func (self *Options) IsPositionIndependent() bool
- func (self *Options) IsVerboseAsm() bool
- func (self *Options) IsVerboseMode() bool
- func (self *Options) OutputFilename() string
- func (self *Options) Parse(args []string) *Options
- func (self *Options) PrintAsm() bool
- func (self *Options) SourceFiles() []string
- func (self *Options) TargetPlatform() int
- type SourceFile
- func (self SourceFile) GetName() string
- func (self SourceFile) GetPath() string
- func (self SourceFile) IsAssemblySource() bool
- func (self SourceFile) IsExecutableFile() bool
- func (self SourceFile) IsGenerated() bool
- func (self SourceFile) IsObjectFile() bool
- func (self SourceFile) IsProgramSource() bool
- func (self SourceFile) IsSharedLibrary() bool
- func (self SourceFile) IsStaticLibrary() bool
- func (self SourceFile) ReadAll() ([]byte, error)
- func (self SourceFile) Remove() error
- func (self SourceFile) String() string
- func (self SourceFile) ToAssemblySource() *SourceFile
- func (self SourceFile) ToExecutableFile() *SourceFile
- func (self SourceFile) ToObjectFile() *SourceFile
- func (self SourceFile) ToProgramSource() *SourceFile
- func (self SourceFile) ToSharedLibrary() *SourceFile
- func (self SourceFile) ToStaticLibrary() *SourceFile
- func (self SourceFile) WriteAll(bytes []byte) error
Constants ¶
View Source
const ( EXT_PROGRAM_SOURCE = ".xtc" EXT_ASSEMBLY_SOURCE = ".s" EXT_OBJECT_FILE = ".o" EXT_STATIC_LIBRARY = ".a" EXT_SHARED_LIBRARY = ".so" EXT_EXECUTABLE_FILE = "" )
View Source
const ( LOG_DEBUG = iota LOG_INFO LOG_WARN LOG_ERROR )
View Source
const ( PLATFORM_X86_LINUX = iota PLATFORM_AMD64_LINUX )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorHandler ¶
type ErrorHandler struct {
// contains filtered or unexported fields
}
func NewErrorHandler ¶
func NewErrorHandler(level int) *ErrorHandler
func (*ErrorHandler) Debug ¶
func (self *ErrorHandler) Debug(v ...interface{})
func (*ErrorHandler) Debugf ¶
func (self *ErrorHandler) Debugf(format string, v ...interface{})
func (*ErrorHandler) Error ¶
func (self *ErrorHandler) Error(v ...interface{})
func (*ErrorHandler) ErrorOccured ¶
func (self *ErrorHandler) ErrorOccured() bool
func (*ErrorHandler) Errorf ¶
func (self *ErrorHandler) Errorf(format string, v ...interface{})
func (*ErrorHandler) Fatal ¶
func (self *ErrorHandler) Fatal(v ...interface{})
func (*ErrorHandler) Fatalf ¶
func (self *ErrorHandler) Fatalf(format string, v ...interface{})
func (*ErrorHandler) GetErrors ¶
func (self *ErrorHandler) GetErrors() int
func (*ErrorHandler) Info ¶
func (self *ErrorHandler) Info(v ...interface{})
func (*ErrorHandler) Infof ¶
func (self *ErrorHandler) Infof(format string, v ...interface{})
func (*ErrorHandler) Panic ¶
func (self *ErrorHandler) Panic(v ...interface{})
func (*ErrorHandler) Panicf ¶
func (self *ErrorHandler) Panicf(format string, v ...interface{})
func (*ErrorHandler) Warn ¶
func (self *ErrorHandler) Warn(v ...interface{})
func (*ErrorHandler) Warnf ¶
func (self *ErrorHandler) Warnf(format string, v ...interface{})
type IAssembly ¶
type IAssembly interface { AsAssembly() IAssembly IsInstruction() bool IsLabel() bool IsDirective() bool IsComment() bool CollectStatistics(IStatistics) ToSource(ISymbolTable) string }
type IAssemblyCode ¶
type IAssemblyCode interface {
ToSource() string
}
type IBinaryOpNode ¶
type ICompositeType ¶
type ICompositeTypeDefinition ¶
type ICompositeTypeDefinition interface { ITypeDefinition IsCompositeType() bool GetMembers() []ISlot }
type IEntity ¶
type IEntity interface { String() string GetName() string IsDefined() bool IsPrivate() bool IsConstant() bool IsParameter() bool IsVariable() bool Refered() IsRefered() bool GetNumRefered() int GetTypeNode() ITypeNode GetTypeRef() ITypeRef GetType() IType GetValue() IExprNode SymbolString() string GetMemref() IMemoryReference SetMemref(IMemoryReference) GetAddress() IOperand SetAddress(IOperand) }
type IImmediateValue ¶
type IImmediateValue interface { AsImmediateValue() IImmediateValue IOperand }
type ILiteral ¶
type ILiteral interface { AsLiteral() ILiteral String() string IsZero() bool CollectStatistics(IStatistics) ToSource(ISymbolTable) string }
type IMemoryReference ¶
type IMemoryReference interface { IOperand AsMemoryReference() IMemoryReference FixOffset(int64) }
type INamedType ¶
type IOperand ¶
type IOperand interface { AsOperand() IOperand IsRegister() bool IsMemoryReference() bool CollectStatistics(IStatistics) ToSource(ISymbolTable) string }
type IStatistics ¶
type IStatistics interface { AsStatistics() IStatistics InstructionUsed(string) SymbolUsed(ISymbol) RegisterUsed(IRegister) }
type ISymbolTable ¶
type ISymbolTable interface { AsSymbolTable() ISymbolTable SymbolString(ISymbol) string }
type IType ¶
type IType interface { Key() string String() string Size() int AllocSize() int Alignment() int IsSameType(IType) bool IsVoid() bool IsInteger() bool IsSigned() bool IsPointer() bool IsArray() bool IsCompositeType() bool IsStruct() bool IsUnion() bool IsUserType() bool IsFunction() bool IsAllocatedArray() bool IsIncompleteArray() bool IsScalar() bool IsCallable() bool IsCompatible(IType) bool IsCastableTo(IType) bool GetBaseType() IType }
IType
type ITypeDefinition ¶
type IUnaryArithmeticOpNode ¶
type Location ¶
type Location struct {
// contains filtered or unexported fields
}
func (Location) GetLineNumber ¶
func (Location) GetLineOffset ¶
func (Location) GetSourceName ¶
func (Location) MarshalJSON ¶
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func NewOptions ¶
func ParseOptions ¶
func (*Options) CheckSyntax ¶
func (*Options) DumpReference ¶
func (*Options) DumpSemantic ¶
func (*Options) DumpTokens ¶
func (*Options) GetLibraryPath ¶
func (*Options) IsAssembleRequired ¶
func (*Options) IsCompileRequired ¶
func (*Options) IsGenratingSharedLibrary ¶
func (*Options) IsLinkRequired ¶
func (*Options) IsPICRequired ¶
func (*Options) IsPIERequired ¶
func (*Options) IsPositionIndependent ¶
func (*Options) IsVerboseAsm ¶
func (*Options) IsVerboseMode ¶
func (*Options) OutputFilename ¶
func (*Options) SourceFiles ¶
func (*Options) TargetPlatform ¶
type SourceFile ¶
type SourceFile struct {
// contains filtered or unexported fields
}
func NewSourceFile ¶
func NewSourceFile(name, file, ext string) *SourceFile
func NewTemporarySourceFile ¶
func NewTemporarySourceFile(name, ext string, bytes []byte) (*SourceFile, error)
func (SourceFile) GetName ¶
func (self SourceFile) GetName() string
func (SourceFile) GetPath ¶
func (self SourceFile) GetPath() string
func (SourceFile) IsAssemblySource ¶
func (self SourceFile) IsAssemblySource() bool
func (SourceFile) IsExecutableFile ¶
func (self SourceFile) IsExecutableFile() bool
func (SourceFile) IsGenerated ¶
func (self SourceFile) IsGenerated() bool
func (SourceFile) IsObjectFile ¶
func (self SourceFile) IsObjectFile() bool
func (SourceFile) IsProgramSource ¶
func (self SourceFile) IsProgramSource() bool
func (SourceFile) IsSharedLibrary ¶
func (self SourceFile) IsSharedLibrary() bool
func (SourceFile) IsStaticLibrary ¶
func (self SourceFile) IsStaticLibrary() bool
func (SourceFile) ReadAll ¶
func (self SourceFile) ReadAll() ([]byte, error)
func (SourceFile) Remove ¶
func (self SourceFile) Remove() error
func (SourceFile) String ¶
func (self SourceFile) String() string
func (SourceFile) ToAssemblySource ¶
func (self SourceFile) ToAssemblySource() *SourceFile
func (SourceFile) ToExecutableFile ¶
func (self SourceFile) ToExecutableFile() *SourceFile
func (SourceFile) ToObjectFile ¶
func (self SourceFile) ToObjectFile() *SourceFile
func (SourceFile) ToProgramSource ¶
func (self SourceFile) ToProgramSource() *SourceFile
func (SourceFile) ToSharedLibrary ¶
func (self SourceFile) ToSharedLibrary() *SourceFile
func (SourceFile) ToStaticLibrary ¶
func (self SourceFile) ToStaticLibrary() *SourceFile
func (SourceFile) WriteAll ¶
func (self SourceFile) WriteAll(bytes []byte) error
Click to show internal directories.
Click to hide internal directories.