Bridge canonicalize: add PhiInst.lower_phi and LLVMConstInstructionBox.lower_const diff tests; ArrayBox.pop empty strict tag [array/empty/pop] + smoke; VM README: document [map/missing] and [array/empty/pop] tags
This commit is contained in:
@ -30,6 +30,12 @@ pub(super) fn try_handle_array_box(
|
||||
if let Some(d) = dst { this.regs.insert(d, VMValue::Void); }
|
||||
return Ok(true);
|
||||
}
|
||||
"pop" => {
|
||||
if !args.is_empty() { return Err(VMError::InvalidInstruction("pop expects 0 args".into())); }
|
||||
let ret = ab.pop();
|
||||
if let Some(d) = dst { this.regs.insert(d, VMValue::from_nyash_box(ret)); }
|
||||
return Ok(true);
|
||||
}
|
||||
"len" | "length" | "size" => {
|
||||
let ret = ab.length();
|
||||
if let Some(d) = dst { this.regs.insert(d, VMValue::from_nyash_box(ret)); }
|
||||
|
||||
Reference in New Issue
Block a user