P0/P1/P2: quick緑化と境界/検証強化\n\n- P0: json_lint_vm を quick で opt-in 化(既定は SKIP)し、builder デバッグノイズは filter_noise で抑制\n- P1: ArrayBox に OOB Strict タグを導入(HAKO_OOB_STRICT/NYASH_OOB_STRICT)+ Stage‑B OOB 観測カナリア整備\n- P2: Bridge/LLVM self まわりの検証を opt-in スモークで拡充(self_param_*)。ドキュメント/PLAN/CHECKLIST/SSOT を更新
This commit is contained in:
@ -70,7 +70,21 @@ impl ArrayBox {
|
||||
}
|
||||
item.clone_box()
|
||||
}
|
||||
None => Box::new(crate::boxes::null_box::NullBox::new()),
|
||||
None => {
|
||||
let strict = std::env::var("HAKO_OOB_STRICT")
|
||||
.ok()
|
||||
.map(|v| matches!(v.as_str(), "1"|"true"|"on"))
|
||||
.unwrap_or(false)
|
||||
|| std::env::var("NYASH_OOB_STRICT")
|
||||
.ok()
|
||||
.map(|v| matches!(v.as_str(), "1"|"true"|"on"))
|
||||
.unwrap_or(false);
|
||||
if strict {
|
||||
Box::new(StringBox::new("[oob/array/get] index out of bounds"))
|
||||
} else {
|
||||
Box::new(crate::boxes::null_box::NullBox::new())
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Box::new(StringBox::new("Error: get() requires integer index"))
|
||||
@ -90,7 +104,19 @@ impl ArrayBox {
|
||||
items.push(value);
|
||||
Box::new(StringBox::new("ok"))
|
||||
} else {
|
||||
Box::new(StringBox::new("Error: index out of bounds"))
|
||||
let strict = std::env::var("HAKO_OOB_STRICT")
|
||||
.ok()
|
||||
.map(|v| matches!(v.as_str(), "1"|"true"|"on"))
|
||||
.unwrap_or(false)
|
||||
|| std::env::var("NYASH_OOB_STRICT")
|
||||
.ok()
|
||||
.map(|v| matches!(v.as_str(), "1"|"true"|"on"))
|
||||
.unwrap_or(false);
|
||||
if strict {
|
||||
Box::new(StringBox::new("[oob/array/set] index out of bounds"))
|
||||
} else {
|
||||
Box::new(StringBox::new("Error: index out of bounds"))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Box::new(StringBox::new("Error: set() requires integer index"))
|
||||
|
||||
Reference in New Issue
Block a user