Add generic logical guards and atomic storage publication

This commit is contained in:
2026-10-22 22:24:28 +01:00
parent f7d7c16753
commit d9b9eeb171
17 changed files with 749 additions and 4 deletions
@@ -14,6 +14,9 @@ mod random;
mod reference;
mod runtime;
mod stack;
mod storage_publication;
#[cfg(test)]
mod storage_publication_tests;
mod strings;
mod typed;
#[cfg(test)]
@@ -1083,6 +1086,17 @@ impl VirtualMachine {
let (source, target) = instr.imm_u32x2().unwrap();
return self.execute_reference(opcode, source, target, start_pc as u32);
}
OpCode::IndexGuard
| OpCode::ArrayCheckLength
| OpCode::ArrayCopy
| OpCode::StoragePublish => {
let operands = match opcode {
OpCode::StoragePublish => instr.imm_u32x4().unwrap(),
OpCode::IndexGuard => [0; 4],
_ => [instr.imm_u32().unwrap(), 0, 0, 0],
};
return self.execute_storage_publication(opcode, operands, start_pc as u32);
}
OpCode::StructNew
| OpCode::StructGet
| OpCode::StructSet