From 9307e0ecaa4fc30cb70387b26c14f33fa49a81a4 Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> Date: Thu, 17 Sep 2026 16:09:11 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20=E4=BF=AE=E6=AD=A3=E7=A7=81=E6=9C=89?= =?UTF-8?q?=E6=A7=BD=E4=B8=8E=E9=93=BE=E5=85=83=E7=B4=A0=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E7=9A=84=E5=A4=B1=E5=AE=9E=E6=8E=AA=E8=BE=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/oxide_emit/src/shared/chain.rs | 2 +- crates/oxide_emit/src/shared/class_field.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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> {