Open
Bug 2002637
(ragnarok)
Opened 4 months ago
Updated 1 month ago
Remove asm.js code
Categories
(Core :: JavaScript: WebAssembly, task, P3)
Core
JavaScript: WebAssembly
Tracking
()
NEW
People
(Reporter: rhunt, Assigned: yury)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
If we are able to unship asm.js in bug 2002635, then we will want to start removing asm.js code.
The asm.js compiler is also known as OdinMonkey, and so this will be the long-foretold Ragnarök.
| Assignee | ||
Updated•1 month ago
|
Assignee: nobody → ydelendik
| Assignee | ||
Comment 1•1 month ago
|
||
This commit completely removes asm.js compilation support from SpiderMonkey,
keeping only minimal API compatibility stubs.
Core asm.js Removal:
- Remove entire asm.js compiler implementation (AsmJS.cpp/h)
- Remove AsmJS.cpp from build system
JIT Compiler Infrastructure:
- Remove MAsmJSLoadHeap, MAsmJSStoreHeap, MAsmJSMemoryAccess MIR classes
- Remove asm.js heap access operations from MIROps.yaml and LIROps.yaml
- Remove architecture-specific lowering and codegen for asm.js operations
across arm, arm64, x86-shared, mips-shared, riscv64, loong64, wasm32 - Remove AlignmentMaskAnalysis asm.js-specific optimization
- Remove asm.js code paths from MacroAssembler, CodeGenerator, WarpOracle
Parser & Frontend:
- Remove useAsmOrInsideUseAsm() methods and all related checks
- Remove FunctionBox::functionNode field (was for asm.js error messages)
- Remove hasAsmJS() methods from Stencil classes
- Simplify constant folding and parse tree optimization (always enabled)
- Remove special asm.js handling in FunctionEmitter
WebAssembly Compilation:
- Remove callSiteLineNums from FuncCompileInput (asm.js call site tracking)
- Remove readCallSiteLineOrBytecode(), replace with readBytecodeOffset()
- Remove isAsmJS parameters from various wasm functions
- Remove asm.js-specific memory limits and checks
- Clean up wasm metadata to remove asm.js flags
API & Configuration:
- Deprecate AsmJSOption enum (all methods return DisabledByNoWasmCompiler)
- Keep ContextOptions::asmJS() and setAsmJS() as no-ops for compatibility
- Add deprecation comments explaining API compatibility
- Remove javascript.options.asmjs preference
- Remove enableAsmJS from JS shell
- Remove throwOnAsmJSValidationFailure option
- Remove asm.js-related error messages and use counter tracking
Memory & Debugging:
- Remove objectsMallocHeapElementsAsmJS memory metric
- Update memory report descriptions from "wasm/asm.js" to "wasm"
- Remove updateObservesAsmJSOnDebuggees() debugger hook
- Remove allowUnobservedAsmJS debugger option
- Clean up asm.js references in frame iteration
Testing:
- Remove gdb test-asmjs.cpp
- Remove profiler test_asm.js
- Update asm.js jit-tests to verify compilation is disabled
- Remove debugger tests for asm.js-specific features
Array Buffers & Functions:
- Remove isAsmJSMalloced() and related buffer tracking
- Remove FunctionFlags::IsAsmJSNative and related function classification
- Simplify JSFunction by removing asm.js module tracking
- Remove asm.js-specific array buffer restrictions
Documentation:
- Update comments to remove asm.js references
- Fix misleading comments about "asm.js native" functions (actually wasm)
- Add deprecation notices to remaining API stubs
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
| Reporter | ||
Comment 2•1 month ago
|
||
asm.js is now disabled in release. The current nightly is Fx150, so let's wait until Fx152 before we land this. It starts on April 20th [1].
You need to log in
before you can comment on or make changes to this bug.
Description
•