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
@@ -666,6 +666,30 @@ impl OpCodeSpecExt for OpCode {
may_trap: true,
is_safepoint: false,
},
OpCode::IndexGuard => OpcodeSpec {
name: "INDEX_GUARD",
imm_bytes: 0,
pops: Some(2),
pushes: Some(0),
is_branch: false,
is_terminator: false,
may_trap: true,
is_safepoint: false,
},
OpCode::ArrayCheckLength | OpCode::ArrayCopy | OpCode::StoragePublish => OpcodeSpec {
name: match self {
OpCode::ArrayCheckLength => "ARRAY_CHECK_LENGTH",
OpCode::ArrayCopy => "ARRAY_COPY",
_ => "STORAGE_PUBLISH",
},
imm_bytes: if *self == OpCode::StoragePublish { 16 } else { 4 },
pops: None,
pushes: None,
is_branch: false,
is_terminator: false,
may_trap: true,
is_safepoint: false,
},
OpCode::FrameSync => OpcodeSpec {
name: "FRAME_SYNC",
imm_bytes: 0,