Open
Conversation
0eb3475 to
7c1c574
Compare
75fdba5 to
527d5b9
Compare
…82 passing, 912 skipped (NIF failures).
Result: {"status":"keep","failures":0,"passing_tests":1582,"skipped_tests":912}
…chieved — all 72 baseline failures fixed across sessions.
Result: {"status":"keep","failures":0,"passing_tests":1582,"skipped_tests":912}
…enerate op attrs from Opcodes table
- Fix unused variable warnings (ref → _ref, pc → _pc) - Move for_of_start_iter helper after catch-all run/6 to fix clause grouping warning - Remove consecutive blank lines (17 credo issues)
- Add Heap.Caches wrappers for: get/put_fn_atoms, get/put_capture_keys, get/put_wrap_cache, get/put_array_proto, get/put_func_proto, get/put_builtin_names, get/put_regexp_result, get/put_string_codepoints - Add Heap delegates for all new Caches functions - Update Heap.Registry @moduledoc to document every :qb_* key pattern - Replace raw Process.get/put calls in: interpreter.ex, runtime_helpers.ex, interpreter/setup.ex, compiler/runner.ex, compiler/lowering.ex, runtime/globals.ex, runtime/object.ex, runtime/regexp.ex, runtime/string.ex, object_model/get.ex, object_model/private.ex - Use Functions.put_home_object/current_home_object in interpreter.ex and private.ex
- lib/quickbeam/vm/compiler/diagnostics.ex: check/1, explain/1, helper_call_counts/1 - bench/compiler_vs_interpreter.exs: compiler vs interpreter on six JS patterns - Complete lowering tuple refactor (list→tuple for O(1) instruction access) - Apply analysis tuple refactor to cfg.ex, stack.ex, types.ex
- Fix bench/compiler_vs_interpreter.exs Heap.reset issue - Targeted benchmarks show compiler ~= interpreter on all patterns - String concat: 8.42µs (compiler), 9.17µs (interpreter) - Numeric loop: 61.33µs, 59.17µs - Array loop: 201.83µs, 207.50µs - Object field: 615.29µs, 614.04µs - Function call: 1668.50µs, 1687.06µs - Closure: 2385.31µs, 2408.00µs
…teger types Compiler now emits direct BEAM arithmetic/bitwise ops when type analysis proves operands are integers, bypassing Values.* runtime dispatch. Specialized: mod→rem, band→band, bor→bor, bxor→bxor, shl→bsl, sar→bsr.
Variables, Objects, Functions, Iterators, Coercion — RuntimeHelpers is now a thin defdelegate facade. Public API unchanged.
…ef propagation to compile_program
…fix with-statement ASI, derived ctor flags
… float constants, remove redundant global whitelist
…s, pass this to iterator.next(), fix declarations for AssignmentPattern/RestElement
…maining mismatches
… for sloppy mode globals
…n body, handle AssignmentPattern params
…unsupported case (6→5)
… fix check_ctor_return stack handling (5→4)
…for_of_start/for_of_next (4→3)
…ass iodata encoding
…rectly on Function struct
… interpreter still skips decode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a second QuickJS execution backend that runs decoded QuickJS bytecode on the BEAM, plus an experimental compiler path that lowers QuickJS bytecode to BEAM modules.
Public API and runtime modes
mode: :beamsupport for running JavaScript through the BEAM VM backendmode: :autocompiler-backed execution with fallbackmode: :beam_compilerQUICKBEAM_MODE=beam_compilersupport for audit runs:beambackend viaQuickBEAM.disasm/2Error.captureStackTraceBytecode VM
Compiler backend
JavaScript semantics covered
Object,Array,Function,String,Number,BooleanMath,JSON,Date,RegExpMap,Set,WeakMap,WeakSet, collection iterators, and self-iterabilitySymbol, well-known symbols, property keys, andSymbol.toStringTagPromise,async/await, generators, delegatedyield*, and async generatorsProxyandReflect, including descriptor/prototype/extensibility invariantsTypedArray,ArrayBuffer,BigIntsuper, private fields, private methods, private accessors, static private members, brand checks, and constructor return semanticsObject.create,Object.assign,Object.fromEntries, freeze/seal/preventExtensions/isExtensible/isFrozen/isSealedeval,with, refs, globals, callback/global write freshness, delete semantics,in,instanceof,new, update operators, arithmetic/coercion edge cases, and BigInt operationsgosub/retfinally control flow, nested catches inside finally, break/continue through finally, and catch-region slot preservationwith/destructuringStatic analysis and cleanup
ex_dna,ex_slop, andcredomix lintnow runs ExDNA with a zero-clone budget--no-starttest runs:modeAudit and benchmark tooling
bench/vm_compiler_compat.exsbench/vm_compiler_corpus.exsbench/vm_compiler_opcode_coverage.exsbench/vm_compiler_perf.exsbench/vm_compiler_semantic_gaps.exsbench/vm_compiler_test262.exstest/support/vm_compiler_audit.exCurrent compiler audit status
invalid, intentionally unsupported45.239µsto42.845µs1.113xRecent validation
mix compile --warnings-as-errorsmix lintmix dialyzermix test test/js/parser test/vm/auto_mode_test.exs test/vm/compiler_differential_test.exs test/web_apis/beam_fetch_test.exs test/web_apis/beam_text_encoding_test.exs test/web_apis/beam_buffer_test.exs test/web_apis/beam_streams_test.exs test/web_apis/event_source_test.exsmix test --no-start --exclude napi_addon --exclude napi_sqlite test/web_apis/event_source_test.exs test/web_apis/beam_event_source_test.exsPARSER_BENCH=vm_compiler_semantics ./autoresearch.shTEST262_LIMIT=1500 TEST262_CASE_TIMEOUT=5000 PARSER_BENCH=vm_compiler_test262 ./autoresearch.shPrevious broad validation:
QUICKBEAM_BUILD=1 MIX_ENV=test mix testMIX_ENV=test QUICKBEAM_BUILD=1 mix test test/vm/js_engine_test.exs --include js_engine --seed 0mix format --check-formattedmix credo --strictmix dialyzermix ex_dnazlint lib/quickbeam/*.zig lib/quickbeam/napi/*.zigbunx oxlint -c oxlint.json --type-aware --type-check priv/ts/bunx jscpd lib/quickbeam/*.zig priv/ts/*.ts --min-tokens 50 --threshold 0