feat(vm): publish typed fields across multiple structs atomically

Add schema-driven FIELDS_PUBLISH without collection-specific runtime behavior. Validate every nullable destination and complete field group before allocation-free publication, with neutral ownership, malformed-input and quota coverage.
This commit is contained in:
Nilton Constantino
2026-10-23 09:53:40 +01:00
committed by bquarkz
parent d9b9eeb171
commit 57992cf214
13 changed files with 384 additions and 12 deletions
@@ -676,10 +676,14 @@ impl OpCodeSpecExt for OpCode {
may_trap: true,
is_safepoint: false,
},
OpCode::ArrayCheckLength | OpCode::ArrayCopy | OpCode::StoragePublish => OpcodeSpec {
OpCode::ArrayCheckLength
| OpCode::ArrayCopy
| OpCode::StoragePublish
| OpCode::FieldsPublish => OpcodeSpec {
name: match self {
OpCode::ArrayCheckLength => "ARRAY_CHECK_LENGTH",
OpCode::ArrayCopy => "ARRAY_COPY",
OpCode::FieldsPublish => "FIELDS_PUBLISH",
_ => "STORAGE_PUBLISH",
},
imm_bytes: if *self == OpCode::StoragePublish { 16 } else { 4 },