feat(vm): add typed array and struct guest operations
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user