diff --git a/crates/oxide_emit/src/shared/chain.rs b/crates/oxide_emit/src/shared/chain.rs index 6405b11b..96c4f2ab 100644 --- a/crates/oxide_emit/src/shared/chain.rs +++ b/crates/oxide_emit/src/shared/chain.rs @@ -303,7 +303,7 @@ impl Emitter { } /// 读取对象属性并产出键信息:非计算键走字符串常量 IC 路径,计算键在字面量可折叠时走 IC,否则动态求值。 - /// 返回 `(结果寄存器, 常量键名, 动态键寄存器)`,后两者互补为 None。 + /// 返回 `(结果寄存器, 常量键名, 键寄存器)`,后两者互补为 None(计算键路径无论 IC 折叠还是动态求值均以寄存器返回键)。 pub(crate) fn emit_object_property_read_key( &self, src_reg: u32, key: &PropertyKey, computed: bool, ctx: &mut CompileCtx, ) -> Result<(u32, Option, Option), String> { diff --git a/crates/oxide_emit/src/shared/class_field.rs b/crates/oxide_emit/src/shared/class_field.rs index 6f31c1d1..16424833 100644 --- a/crates/oxide_emit/src/shared/class_field.rs +++ b/crates/oxide_emit/src/shared/class_field.rs @@ -56,7 +56,7 @@ impl Emitter { } } - /// 私有字段初始化:以私有名 id 做 `init_private` 写实例 own 属性。 + /// 私有字段初始化:以私有名 id 做 `init_private` 写目标对象的私有槽(实例字段 target = this,静态字段 target = 构造器)。 pub(crate) fn emit_private_field_init( &self, target: Operand, name: &str, value: Option<&Expression>, ctx: &mut CompileCtx, ) -> Result<(), String> {