compiler

package
v0.13.9 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 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) ast.Repr

func (*Compiler) VisitAssignmentStatement

func (compiler *Compiler) VisitAssignmentStatement(_ *ast.AssignmentStatement) ast.Repr

func (*Compiler) VisitBinaryExpression

func (compiler *Compiler) VisitBinaryExpression(expression *ast.BinaryExpression) ast.Repr

func (*Compiler) VisitBlock

func (compiler *Compiler) VisitBlock(block *ast.Block) ast.Repr

func (*Compiler) VisitBoolExpression

func (compiler *Compiler) VisitBoolExpression(_ *ast.BoolExpression) ast.Repr

func (*Compiler) VisitBreakStatement

func (compiler *Compiler) VisitBreakStatement(_ *ast.BreakStatement) ast.Repr

func (*Compiler) VisitCastingExpression

func (compiler *Compiler) VisitCastingExpression(_ *ast.CastingExpression) ast.Repr

func (*Compiler) VisitCompositeDeclaration

func (compiler *Compiler) VisitCompositeDeclaration(_ *ast.CompositeDeclaration) ast.Repr

func (*Compiler) VisitCondition

func (compiler *Compiler) VisitCondition(_ *ast.Condition) ast.Repr

func (*Compiler) VisitConditionalExpression

func (compiler *Compiler) VisitConditionalExpression(_ *ast.ConditionalExpression) ast.Repr

func (*Compiler) VisitContinueStatement

func (compiler *Compiler) VisitContinueStatement(_ *ast.ContinueStatement) ast.Repr

func (*Compiler) VisitCreateExpression

func (compiler *Compiler) VisitCreateExpression(_ *ast.CreateExpression) ast.Repr

func (*Compiler) VisitDestroyExpression

func (compiler *Compiler) VisitDestroyExpression(_ *ast.DestroyExpression) ast.Repr

func (*Compiler) VisitDictionaryExpression

func (compiler *Compiler) VisitDictionaryExpression(_ *ast.DictionaryExpression) ast.Repr

func (*Compiler) VisitEmitStatement

func (compiler *Compiler) VisitEmitStatement(_ *ast.EmitStatement) ast.Repr

func (*Compiler) VisitEnumCaseDeclaration

func (compiler *Compiler) VisitEnumCaseDeclaration(_ *ast.EnumCaseDeclaration) ast.Repr

func (*Compiler) VisitExpressionStatement

func (compiler *Compiler) VisitExpressionStatement(_ *ast.ExpressionStatement) ast.Repr

func (*Compiler) VisitFieldDeclaration

func (compiler *Compiler) VisitFieldDeclaration(_ *ast.FieldDeclaration) ast.Repr

func (*Compiler) VisitFixedPointExpression

func (compiler *Compiler) VisitFixedPointExpression(_ *ast.FixedPointExpression) ast.Repr

func (*Compiler) VisitForStatement

func (compiler *Compiler) VisitForStatement(_ *ast.ForStatement) ast.Repr

func (*Compiler) VisitForceExpression

func (compiler *Compiler) VisitForceExpression(_ *ast.ForceExpression) ast.Repr

func (*Compiler) VisitFunctionBlock

func (compiler *Compiler) VisitFunctionBlock(_ *ast.FunctionBlock) ast.Repr

func (*Compiler) VisitFunctionDeclaration

func (compiler *Compiler) VisitFunctionDeclaration(declaration *ast.FunctionDeclaration) ast.Repr

func (*Compiler) VisitFunctionExpression

func (compiler *Compiler) VisitFunctionExpression(_ *ast.FunctionExpression) ast.Repr

func (*Compiler) VisitIdentifierExpression

func (compiler *Compiler) VisitIdentifierExpression(expression *ast.IdentifierExpression) ast.Repr

func (*Compiler) VisitIfStatement

func (compiler *Compiler) VisitIfStatement(_ *ast.IfStatement) ast.Repr

func (*Compiler) VisitImportDeclaration

func (compiler *Compiler) VisitImportDeclaration(_ *ast.ImportDeclaration) ast.Repr

func (*Compiler) VisitIndexExpression

func (compiler *Compiler) VisitIndexExpression(_ *ast.IndexExpression) ast.Repr

func (*Compiler) VisitIntegerExpression

func (compiler *Compiler) VisitIntegerExpression(expression *ast.IntegerExpression) ast.Repr

func (*Compiler) VisitInterfaceDeclaration

func (compiler *Compiler) VisitInterfaceDeclaration(_ *ast.InterfaceDeclaration) ast.Repr

func (*Compiler) VisitInvocationExpression

func (compiler *Compiler) VisitInvocationExpression(_ *ast.InvocationExpression) ast.Repr

func (*Compiler) VisitMemberExpression

func (compiler *Compiler) VisitMemberExpression(_ *ast.MemberExpression) ast.Repr

func (*Compiler) VisitNilExpression

func (compiler *Compiler) VisitNilExpression(_ *ast.NilExpression) ast.Repr

func (*Compiler) VisitPathExpression

func (compiler *Compiler) VisitPathExpression(_ *ast.PathExpression) ast.Repr

func (*Compiler) VisitPragmaDeclaration

func (compiler *Compiler) VisitPragmaDeclaration(_ *ast.PragmaDeclaration) ast.Repr

func (*Compiler) VisitProgram

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

func (*Compiler) VisitReferenceExpression

func (compiler *Compiler) VisitReferenceExpression(_ *ast.ReferenceExpression) ast.Repr

func (*Compiler) VisitReturnStatement

func (compiler *Compiler) VisitReturnStatement(statement *ast.ReturnStatement) ast.Repr

func (*Compiler) VisitStringExpression

func (compiler *Compiler) VisitStringExpression(e *ast.StringExpression) ast.Repr

func (*Compiler) VisitSwapStatement

func (compiler *Compiler) VisitSwapStatement(_ *ast.SwapStatement) ast.Repr

func (*Compiler) VisitSwitchStatement

func (compiler *Compiler) VisitSwitchStatement(_ *ast.SwitchStatement) ast.Repr

func (*Compiler) VisitTransactionDeclaration

func (compiler *Compiler) VisitTransactionDeclaration(_ *ast.TransactionDeclaration) ast.Repr

func (*Compiler) VisitUnaryExpression

func (compiler *Compiler) VisitUnaryExpression(_ *ast.UnaryExpression) ast.Repr

func (*Compiler) VisitVariableDeclaration

func (compiler *Compiler) VisitVariableDeclaration(declaration *ast.VariableDeclaration) ast.Repr

func (*Compiler) VisitWhileStatement

func (compiler *Compiler) VisitWhileStatement(_ *ast.WhileStatement) ast.Repr

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

Jump to

Keyboard shortcuts

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