fix: tagged template 语义修正——cooked undefined/this绑定/site缓存/冻结 + groupBy getter 异常传播 + defineGetter setter 保留

This commit is contained in:
2026-08-22 11:15:55 +08:00
parent 9eb0944877
commit 0ffb5d2cf3
10 changed files with 366 additions and 83 deletions
+8
View File
@@ -335,6 +335,14 @@ define_opcodes! {
def = Some(SlotSpec::Slot(Slot::Rd)), uses = [SlotSpec::TemplateExprs],
pure = true, jump = false, term = false, ic = false,
// ── 标签模板对象 (0x97) ──
// GetTemplateObject:按 site 缓存模板对象(同一编译树同 site 恒返回同一对象),
// 首次构建时冻结 cooked/raw 数组并设置规范描述符。ext 布局见
// `Inst::get_template_object`;无寄存器 use(quasis 全为常量池下标)。
GET_TEMPLATE_OBJECT = 0x97 => "GET_TEMPLATE_OBJECT",
def = Some(SlotSpec::Slot(Slot::Rd)), uses = [],
pure = false, jump = false, term = false, ic = false,
// ── 小语言特性 (0x39-0x3B) ──
DELETE_PROP_STATIC = 0x39 => "DELETE_PROP_STATIC",
def = None, uses = [SlotSpec::Slot(Slot::Rd)],