fix(vm): 数组元素写入越过元素区时搬移属性区 + defineProperty 数组索引走元素区

This commit is contained in:
爱特每羊队
2026-08-07 23:20:32 +08:00
parent f0f45c4ae0
commit 820de00d79
4 changed files with 155 additions and 23 deletions
-1
View File
@@ -704,7 +704,6 @@ impl Vm {
// 数组属性存储索引 = array_prop_count + shape 槽位(与元素区分)。
let idx = obj.array_prop_count as usize + pos as usize;
let val = obj.get_prop_at(idx);
eprintln!("[DBG] gos array prop pos={} apc={} idx={} val={:?}", pos, obj.array_prop_count, idx, val);
if !val.is_undefined() {
Some(idx as u32)
} else {