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:
@@ -179,7 +179,7 @@ pub fn assemble(src: &str) -> Result<Vec<u8>, AsmError> {
|
||||
emit_u16(CoreOpCode::Ret as u16, &mut out);
|
||||
}
|
||||
"YIELD" | "SLEEP" | "SPAWN" => {
|
||||
return Err(AsmError::InvalidOperand("retired coroutine instruction".into()))
|
||||
return Err(AsmError::InvalidOperand("retired coroutine instruction".into()));
|
||||
}
|
||||
"FRAME_SYNC" => {
|
||||
emit_u16(CoreOpCode::FrameSync as u16, &mut out);
|
||||
@@ -362,11 +362,12 @@ pub fn assemble(src: &str) -> Result<Vec<u8>, AsmError> {
|
||||
emit_u32(field, &mut out);
|
||||
}
|
||||
"STRUCT_NEW" | "ARRAY_NEW" | "ARRAY_LEN" | "ARRAY_GET" | "ARRAY_SET"
|
||||
| "ARRAY_CHECK_LENGTH" | "ARRAY_COPY" => {
|
||||
| "ARRAY_CHECK_LENGTH" | "ARRAY_COPY" | "FIELDS_PUBLISH" => {
|
||||
if ops.is_empty() {
|
||||
return Err(AsmError::MissingOperand(line.into()));
|
||||
}
|
||||
let op = match mn {
|
||||
"FIELDS_PUBLISH" => CoreOpCode::FieldsPublish,
|
||||
"STRUCT_NEW" => CoreOpCode::StructNew,
|
||||
"ARRAY_NEW" => CoreOpCode::ArrayNew,
|
||||
"ARRAY_LEN" => CoreOpCode::ArrayLen,
|
||||
|
||||
Reference in New Issue
Block a user