mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 02:31:13 +08:00
docs: 修正私有槽与链元素注释的失实措辞
This commit is contained in:
@@ -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<String>, Option<u32>), String> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user