Documentation ¶
Index ¶
- func GenerateWasm(funcs []*ir.Func) *wasm.Module
- type Compiler
- func (compiler *Compiler) VisitArrayExpression(_ *ast.ArrayExpression) ast.Repr
- func (compiler *Compiler) VisitAssignmentStatement(_ *ast.AssignmentStatement) ast.Repr
- func (compiler *Compiler) VisitBinaryExpression(expression *ast.BinaryExpression) ast.Repr
- func (compiler *Compiler) VisitBlock(block *ast.Block) ast.Repr
- func (compiler *Compiler) VisitBoolExpression(_ *ast.BoolExpression) ast.Repr
- func (compiler *Compiler) VisitBreakStatement(_ *ast.BreakStatement) ast.Repr
- func (compiler *Compiler) VisitCastingExpression(_ *ast.CastingExpression) ast.Repr
- func (compiler *Compiler) VisitCompositeDeclaration(_ *ast.CompositeDeclaration) ast.Repr
- func (compiler *Compiler) VisitCondition(_ *ast.Condition) ast.Repr
- func (compiler *Compiler) VisitConditionalExpression(_ *ast.ConditionalExpression) ast.Repr
- func (compiler *Compiler) VisitContinueStatement(_ *ast.ContinueStatement) ast.Repr
- func (compiler *Compiler) VisitCreateExpression(_ *ast.CreateExpression) ast.Repr
- func (compiler *Compiler) VisitDestroyExpression(_ *ast.DestroyExpression) ast.Repr
- func (compiler *Compiler) VisitDictionaryExpression(_ *ast.DictionaryExpression) ast.Repr
- func (compiler *Compiler) VisitEmitStatement(_ *ast.EmitStatement) ast.Repr
- func (compiler *Compiler) VisitEnumCaseDeclaration(_ *ast.EnumCaseDeclaration) ast.Repr
- func (compiler *Compiler) VisitExpressionStatement(_ *ast.ExpressionStatement) ast.Repr
- func (compiler *Compiler) VisitFieldDeclaration(_ *ast.FieldDeclaration) ast.Repr
- func (compiler *Compiler) VisitFixedPointExpression(_ *ast.FixedPointExpression) ast.Repr
- func (compiler *Compiler) VisitForStatement(_ *ast.ForStatement) ast.Repr
- func (compiler *Compiler) VisitForceExpression(_ *ast.ForceExpression) ast.Repr
- func (compiler *Compiler) VisitFunctionBlock(_ *ast.FunctionBlock) ast.Repr
- func (compiler *Compiler) VisitFunctionDeclaration(declaration *ast.FunctionDeclaration) ast.Repr
- func (compiler *Compiler) VisitFunctionExpression(_ *ast.FunctionExpression) ast.Repr
- func (compiler *Compiler) VisitIdentifierExpression(expression *ast.IdentifierExpression) ast.Repr
- func (compiler *Compiler) VisitIfStatement(_ *ast.IfStatement) ast.Repr
- func (compiler *Compiler) VisitImportDeclaration(_ *ast.ImportDeclaration) ast.Repr
- func (compiler *Compiler) VisitIndexExpression(_ *ast.IndexExpression) ast.Repr
- func (compiler *Compiler) VisitIntegerExpression(expression *ast.IntegerExpression) ast.Repr
- func (compiler *Compiler) VisitInterfaceDeclaration(_ *ast.InterfaceDeclaration) ast.Repr
- func (compiler *Compiler) VisitInvocationExpression(_ *ast.InvocationExpression) ast.Repr
- func (compiler *Compiler) VisitMemberExpression(_ *ast.MemberExpression) ast.Repr
- func (compiler *Compiler) VisitNilExpression(_ *ast.NilExpression) ast.Repr
- func (compiler *Compiler) VisitPathExpression(_ *ast.PathExpression) ast.Repr
- func (compiler *Compiler) VisitPragmaDeclaration(_ *ast.PragmaDeclaration) ast.Repr
- func (compiler *Compiler) VisitProgram(_ *ast.Program) ast.Repr
- func (compiler *Compiler) VisitReferenceExpression(_ *ast.ReferenceExpression) ast.Repr
- func (compiler *Compiler) VisitReturnStatement(statement *ast.ReturnStatement) ast.Repr
- func (compiler *Compiler) VisitStringExpression(_ *ast.StringExpression) ast.Repr
- func (compiler *Compiler) VisitSwapStatement(_ *ast.SwapStatement) ast.Repr
- func (compiler *Compiler) VisitSwitchStatement(_ *ast.SwitchStatement) ast.Repr
- func (compiler *Compiler) VisitTransactionDeclaration(_ *ast.TransactionDeclaration) ast.Repr
- func (compiler *Compiler) VisitUnaryExpression(_ *ast.UnaryExpression) ast.Repr
- func (compiler *Compiler) VisitVariableDeclaration(declaration *ast.VariableDeclaration) ast.Repr
- func (compiler *Compiler) VisitWhileStatement(_ *ast.WhileStatement) ast.Repr
- type Local
- type WasmCodeGen
- func (codeGen *WasmCodeGen) VisitBinOpExpr(expr *ir.BinOpExpr) ir.Repr
- func (codeGen *WasmCodeGen) VisitBlock(_ *ir.Block) ir.Repr
- func (codeGen *WasmCodeGen) VisitBranch(_ *ir.Branch) ir.Repr
- func (codeGen *WasmCodeGen) VisitBranchIf(_ *ir.BranchIf) ir.Repr
- func (codeGen *WasmCodeGen) VisitCall(_ *ir.Call) ir.Repr
- func (codeGen *WasmCodeGen) VisitConst(c *ir.Const) ir.Repr
- func (codeGen *WasmCodeGen) VisitCopyLocal(c *ir.CopyLocal) ir.Repr
- func (codeGen *WasmCodeGen) VisitDrop(_ *ir.Drop) ir.Repr
- func (codeGen *WasmCodeGen) VisitFunc(f *ir.Func) ir.Repr
- func (codeGen *WasmCodeGen) VisitIf(_ *ir.If) ir.Repr
- func (codeGen *WasmCodeGen) VisitInt(i ir.Int) ir.Repr
- func (codeGen *WasmCodeGen) VisitLoop(_ *ir.Loop) ir.Repr
- func (codeGen *WasmCodeGen) VisitMoveLocal(_ *ir.MoveLocal) ir.Repr
- func (codeGen *WasmCodeGen) VisitReturn(r *ir.Return) ir.Repr
- func (codeGen *WasmCodeGen) VisitSequence(sequence *ir.Sequence) ir.Repr
- func (codeGen *WasmCodeGen) VisitStoreLocal(storeLocal *ir.StoreLocal) ir.Repr
- func (codeGen *WasmCodeGen) VisitUnOpExpr(_ *ir.UnOpExpr) ir.Repr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Compiler ¶
func NewCompiler ¶
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) 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) 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) 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(_ *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 WasmCodeGen ¶
type WasmCodeGen struct {
// contains filtered or unexported fields
}
func (*WasmCodeGen) VisitBinOpExpr ¶
func (codeGen *WasmCodeGen) VisitBinOpExpr(expr *ir.BinOpExpr) ir.Repr
func (*WasmCodeGen) VisitBlock ¶
func (codeGen *WasmCodeGen) VisitBlock(_ *ir.Block) ir.Repr
func (*WasmCodeGen) VisitBranch ¶
func (codeGen *WasmCodeGen) VisitBranch(_ *ir.Branch) ir.Repr
func (*WasmCodeGen) VisitBranchIf ¶
func (codeGen *WasmCodeGen) VisitBranchIf(_ *ir.BranchIf) ir.Repr
func (*WasmCodeGen) VisitConst ¶
func (codeGen *WasmCodeGen) VisitConst(c *ir.Const) ir.Repr
func (*WasmCodeGen) VisitCopyLocal ¶
func (codeGen *WasmCodeGen) VisitCopyLocal(c *ir.CopyLocal) ir.Repr
func (*WasmCodeGen) VisitMoveLocal ¶
func (codeGen *WasmCodeGen) VisitMoveLocal(_ *ir.MoveLocal) ir.Repr
func (*WasmCodeGen) VisitReturn ¶
func (codeGen *WasmCodeGen) VisitReturn(r *ir.Return) ir.Repr
func (*WasmCodeGen) VisitSequence ¶
func (codeGen *WasmCodeGen) VisitSequence(sequence *ir.Sequence) ir.Repr
func (*WasmCodeGen) VisitStoreLocal ¶
func (codeGen *WasmCodeGen) VisitStoreLocal(storeLocal *ir.StoreLocal) ir.Repr
func (*WasmCodeGen) VisitUnOpExpr ¶
func (codeGen *WasmCodeGen) VisitUnOpExpr(_ *ir.UnOpExpr) ir.Repr
Click to show internal directories.
Click to hide internal directories.