QuickBEAM.JS.Compiler (QuickBEAM v0.10.9)

Copy Markdown View Source

Experimental JavaScript AST-to-QuickBEAM VM instruction compiler.

This compiler is intentionally separate from QuickBEAM.VM.Compiler, which lowers VM instructions to BEAM code. This module starts from QuickBEAM.JS.Parser AST and emits VM functions with pre-resolved instructions, not materialized QuickJS bytecode binaries.

Summary

Types

compile_error()

@type compile_error() :: {:unsupported, term()} | {:parse_error, term()}

Functions

compile(source)

@spec compile(binary() | struct()) ::
  {:ok, QuickBEAM.VM.Program.t()} | {:error, compile_error()}

compile_to_function(source)