feat(vm): add typed array and struct guest operations
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good

Add seven Registry-backed collection opcodes with bounded verification, complete value groups, transactional publication and exact attempt costs. Publish ISA, memory and cycle contracts, producer handoff and the completed lesson.

Validate with 925 workspace tests, optimized collection suites and all eight coverage domain gates. Make headless fixture directory names unique for parallel tests.
This commit is contained in:
2026-10-08 10:36:20 +01:00
parent 8732f4b0f4
commit 86bade3e1f
27 changed files with 1591 additions and 46 deletions
@@ -1,4 +1,7 @@
use crate::resource_budget::BudgetVec;
mod collections;
#[cfg(test)]
mod collections_tests;
mod dynamic;
mod gc;
mod loader;
@@ -1410,6 +1413,20 @@ impl VirtualMachine {
let (source, target) = instr.imm_u32x2().unwrap();
return self.execute_reference(opcode, source, target, start_pc as u32);
}
OpCode::StructNew
| OpCode::StructGet
| OpCode::StructSet
| OpCode::ArrayNew
| OpCode::ArrayLen
| OpCode::ArrayGet
| OpCode::ArraySet => {
let (ty, field) = if matches!(opcode, OpCode::StructGet | OpCode::StructSet) {
instr.imm_u32x2().unwrap()
} else {
(instr.imm_u32().unwrap(), 0)
};
return self.execute_collection(opcode, ty, field, start_pc as u32);
}
OpCode::FrameSync => {
// Marks the logical end of a frame: consume cycles and signal to the driver
self.cycles += OpCode::FrameSync.cycles();