RISC Conversion and SIMD #1

Merged
chrono merged 15 commits from risc-conversion into main 2026-04-15 00:42:32 -04:00
Owner
No description provided.
Add FunctionProto flags for class/derived constructors, introduce
Op::SuperConstruct and generator init marker, and emit SuperConstruct
for direct super(...) calls. Add intrinsics used by class semantics
(setFunctionNameIfAnonymous, iteratorToArray, objectSetPrototypeOf,
classInitExtends) and store bound-function metadata. Update
Value::is_constructable to account for bound functions and add VM
runtime checks for class-constructor calls and uninitialized `this`.

Note: this changes bytecode layout by adding opcodes — run focused
bytecode/VM tests to verify compatibility
Add ICEntry struct and per-function ic_table; add register/aux encoding
helpers and rework Op enum for fixed-width u32 instructions. Update
OP_COUNT
to match the new layout. Also set Test262 "Temporal" feature edition to
17
and apply a minor formatting cleanup in execution.rs
Emit CompareJump for conditional comparisons and patch compiler to use
GetBuiltin/CallBuiltin for builtin calls. Replace Vec<Option<Value>>
array storage with ArrayData across runtime, GC, atomics, and
semantics, and update tests accordingly
Compiler now emits TypeofGlobal for global typeof expressions. The VM
executes it by resolving the identifier and pushing the typeof string.
The new opcode is included in opcode width, disassembly, and
diagnostics.

Patch jump target writing to preserve CompareJump's compare opcode byte
and write a 16-bit relative offset into its payload instead of
clobbering
the compare operand. Add a test that verifies the compare opcode is
preserved for a while loop condition and remove temporary debug prints
from execution tests.
Eliminate the PropertyGetIC cache type and its uses across the VM.
Update runtime paths to no-op cache clears, adjust tests, and fix
related
logic (array hole handling, bytecode/compile tweaks, and minor docs).
Rename the shared mutable slot alias to SharedValue (Rc<Mutex<Value>>)
and update VM, GC, module loader, frame, environment, and runtime
signatures and data structures accordingly. Add a Default impl for
SymbolId and remove the legacy check_oxc shim. Minor test/type and
docstring tweaks to match the changes.
Add helper converters (function_index_to_u8, constant_index_to_u8,
module_index_to_u8 and use existing slot_to_u8) and replace unchecked
as u8 casts when emitting byte operands so overflow returns a
CompilerError instead of silently truncating. Also update VM opcode
index conversion to use try_from and add clarifying comments, tweak
clippy config to allow hashbrown, and make a few small test262/test
helpers cleanups and formatting adjustments.
Replace direct usize as f64 casts with usize_to_f64 across VM, runtime,
and ecmascript intrinsics. Also adjust profile/percentage calculations
to cast via i64 before converting to f64 to preserve precision.
Make Compiler::emit_byte defensive: return on empty chunk and
debug-assert (instead of panic) when too many operand bytes to avoid
corrupting instruction payloads in release builds. Add
global_index_to_u16 to validate usize->u16 conversions and use it when
emitting global indices. Validate jump displacement fits i32 in
patch_jump_to_target. Add assorted doc comments for bench helpers and
a clippy allow on collections builtin.
- Turn redundant_clone and redundant_closure_for_method_calls lints to
  deny
- Replace many unnecessary .clone() calls with moves or Rc::clone across
  builtins, promises, environment, runtime, and tests
- Add calculate_percentage helper and use 0.0_f64 literals in test262
  runner
- Add # Errors doc comments to compiler entrypoints
- Fix map_or/unwrap_or misuse in execution.rs
- Remove excluded language-server entry from .zed settings
chrono merged commit 8fe87dbbf4 into main 2026-04-15 00:42:32 -04:00
chrono deleted branch risc-conversion 2026-04-15 00:44:54 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
chrono/blitz!1
No description provided.