Help us shape the future of Go! Take the 2026 Go Developer Survey

compiler

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const RuntimeModuleName = "crt"

Variables

This section is empty.

Functions

func GenerateWasm

func GenerateWasm(funcs []*ir.Func) *wasm.Module

Types

type Compiler

type Compiler struct {
	Checker *sema.Checker
	// contains filtered or unexported fields
}

func NewCompiler

func NewCompiler(checker *sema.Checker) *Compiler

func (*Compiler) VisitArrayExpression

func (compiler *Compiler) VisitArrayExpression(_ *ast.ArrayExpression) ir.Expr

func (*Compiler) VisitAssignmentStatement

func (compiler *Compiler) VisitAssignmentStatement(_ *ast.AssignmentStatement) ir.Stmt

func (*Compiler) VisitAttachExpression added in v0.36.0

func (compiler *Compiler) VisitAttachExpression(_ *ast.AttachExpression) ir.Expr

func (*Compiler) VisitAttachmentDeclaration added in v0.36.0

func (compiler *Compiler) VisitAttachmentDeclaration(_ *ast.AttachmentDeclaration) ir.Stmt

func (*Compiler) VisitBinaryExpression

func (compiler *Compiler) VisitBinaryExpression(expression *ast.BinaryExpression) ir.Expr

func (*Compiler) VisitBoolExpression

func (compiler *Compiler) VisitBoolExpression(_ *ast.BoolExpression) ir.Expr

func (*Compiler) VisitBreakStatement

func (compiler *Compiler) VisitBreakStatement(_ *ast.BreakStatement) ir.Stmt

func (*Compiler) VisitCastingExpression

func (compiler *Compiler) VisitCastingExpression(_ *ast.CastingExpression) ir.Expr

func (*Compiler) VisitCompositeDeclaration

func (compiler *Compiler) VisitCompositeDeclaration(_ *ast.CompositeDeclaration) ir.Stmt

func (*Compiler) VisitConditionalExpression

func (compiler *Compiler) VisitConditionalExpression(_ *ast.ConditionalExpression) ir.Expr

func (*Compiler) VisitContinueStatement

func (compiler *Compiler) VisitContinueStatement(_ *ast.ContinueStatement) ir.Stmt

func (*Compiler) VisitCreateExpression

func (compiler *Compiler) VisitCreateExpression(_ *ast.CreateExpression) ir.Expr

func (*Compiler) VisitDestroyExpression

func (compiler *Compiler) VisitDestroyExpression(_ *ast.DestroyExpression) ir.Expr

func (*Compiler) VisitDictionaryExpression

func (compiler *Compiler) VisitDictionaryExpression(_ *ast.DictionaryExpression) ir.Expr

func (*Compiler) VisitEmitStatement

func (compiler *Compiler) VisitEmitStatement(_ *ast.EmitStatement) ir.Stmt

func (*Compiler) VisitEntitlementDeclaration added in v1.0.0

func (compiler *Compiler) VisitEntitlementDeclaration(_ *ast.EntitlementDeclaration) ir.Stmt

func (*Compiler) VisitEntitlementMappingDeclaration added in v1.0.0

func (compiler *Compiler) VisitEntitlementMappingDeclaration(_ *ast.EntitlementMappingDeclaration) ir.Stmt

func (*Compiler) VisitEnumCaseDeclaration

func (compiler *Compiler) VisitEnumCaseDeclaration(_ *ast.EnumCaseDeclaration) ir.Stmt

func (*Compiler) VisitExpressionStatement

func (compiler *Compiler) VisitExpressionStatement(_ *ast.ExpressionStatement) ir.Stmt

func (*Compiler) VisitFieldDeclaration

func (compiler *Compiler) VisitFieldDeclaration(_ *ast.FieldDeclaration) ir.Stmt

func (*Compiler) VisitFixedPointExpression

func (compiler *Compiler) VisitFixedPointExpression(_ *ast.FixedPointExpression) ir.Expr

func (*Compiler) VisitForStatement

func (compiler *Compiler) VisitForStatement(_ *ast.ForStatement) ir.Stmt

func (*Compiler) VisitForceExpression

func (compiler *Compiler) VisitForceExpression(_ *ast.ForceExpression) ir.Expr

func (*Compiler) VisitFunctionDeclaration

func (compiler *Compiler) VisitFunctionDeclaration(declaration *ast.FunctionDeclaration) ir.Stmt

func (*Compiler) VisitFunctionExpression

func (compiler *Compiler) VisitFunctionExpression(_ *ast.FunctionExpression) ir.Expr

func (*Compiler) VisitIdentifierExpression

func (compiler *Compiler) VisitIdentifierExpression(expression *ast.IdentifierExpression) ir.Expr

func (*Compiler) VisitIfStatement

func (compiler *Compiler) VisitIfStatement(_ *ast.IfStatement) ir.Stmt

func (*Compiler) VisitImportDeclaration

func (compiler *Compiler) VisitImportDeclaration(_ *ast.ImportDeclaration) ir.Stmt

func (*Compiler) VisitIndexExpression

func (compiler *Compiler) VisitIndexExpression(_ *ast.IndexExpression) ir.Expr

func (*Compiler) VisitIntegerExpression

func (compiler *Compiler) VisitIntegerExpression(expression *ast.IntegerExpression) ir.Expr

func (*Compiler) VisitInterfaceDeclaration

func (compiler *Compiler) VisitInterfaceDeclaration(_ *ast.InterfaceDeclaration) ir.Stmt

func (*Compiler) VisitInvocationExpression

func (compiler *Compiler) VisitInvocationExpression(_ *ast.InvocationExpression) ir.Expr

func (*Compiler) VisitMemberExpression

func (compiler *Compiler) VisitMemberExpression(_ *ast.MemberExpression) ir.Expr

func (*Compiler) VisitNilExpression

func (compiler *Compiler) VisitNilExpression(_ *ast.NilExpression) ir.Expr

func (*Compiler) VisitPathExpression

func (compiler *Compiler) VisitPathExpression(_ *ast.PathExpression) ir.Expr

func (*Compiler) VisitPragmaDeclaration

func (compiler *Compiler) VisitPragmaDeclaration(_ *ast.PragmaDeclaration) ir.Stmt

func (*Compiler) VisitProgram

func (compiler *Compiler) VisitProgram(_ *ast.Program) ir.Repr

func (*Compiler) VisitReferenceExpression

func (compiler *Compiler) VisitReferenceExpression(_ *ast.ReferenceExpression) ir.Expr

func (*Compiler) VisitRemoveStatement added in v0.36.0

func (compiler *Compiler) VisitRemoveStatement(_ *ast.RemoveStatement) ir.Stmt

func (*Compiler) VisitReturnStatement

func (compiler *Compiler) VisitReturnStatement(statement *ast.ReturnStatement) ir.Stmt

func (*Compiler) VisitSpecialFunctionDeclaration added in v0.25.0

func (compiler *Compiler) VisitSpecialFunctionDeclaration(declaration *ast.SpecialFunctionDeclaration) ir.Stmt

func (*Compiler) VisitStringExpression

func (compiler *Compiler) VisitStringExpression(e *ast.StringExpression) ir.Expr

func (*Compiler) VisitSwapStatement

func (compiler *Compiler) VisitSwapStatement(_ *ast.SwapStatement) ir.Stmt

func (*Compiler) VisitSwitchStatement

func (compiler *Compiler) VisitSwitchStatement(_ *ast.SwitchStatement) ir.Stmt

func (*Compiler) VisitTransactionDeclaration

func (compiler *Compiler) VisitTransactionDeclaration(_ *ast.TransactionDeclaration) ir.Stmt

func (*Compiler) VisitUnaryExpression

func (compiler *Compiler) VisitUnaryExpression(_ *ast.UnaryExpression) ir.Expr

func (*Compiler) VisitVariableDeclaration

func (compiler *Compiler) VisitVariableDeclaration(declaration *ast.VariableDeclaration) ir.Stmt

func (*Compiler) VisitVoidExpression added in v0.27.1

func (compiler *Compiler) VisitVoidExpression(_ *ast.VoidExpression) ir.Expr

func (*Compiler) VisitWhileStatement

func (compiler *Compiler) VisitWhileStatement(_ *ast.WhileStatement) ir.Stmt

type Local

type Local struct {
	Index uint32
	Type  ir.ValType
}

func NewLocal

func NewLocal(index uint32, valType ir.ValType) *Local

Directories

Path Synopsis
WebAssembly (https://webassembly.org/) is an open standard for portable executable programs.
WebAssembly (https://webassembly.org/) is an open standard for portable executable programs.
gen command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL