refactor: 移除代码注释中的文档内部编号引用

This commit is contained in:
2026-06-24 16:03:53 +08:00
parent 4535f70f80
commit 94405f50d7
8 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -159,7 +159,7 @@ pub(crate) struct CompileCtx {
pub(crate) builtin_reg_map: Vec<(String, u8)>,
pub(crate) sub_modules: Vec<CompiledModule>,
/// Register holding `this` in the enclosing function context.
/// Used by arrow functions to capture lexical `this` (D-01).
/// Used by arrow functions to capture lexical `this`.
/// Initialized to 254 (conventional this register) at the top level.
pub(crate) enclosing_this_reg: u8,
pub(crate) in_derived_constructor: bool,
@@ -4,7 +4,7 @@ impl Compiler {
pub(in crate::emitter) fn emit_arrow_function_expression(
&self, arrow: &oxide_parser::ArrowFunctionExpression, ctx: &mut CompileCtx,
) -> Result<u8, String> {
// Rest params not yet supported (D-06 placeholder)
// Rest params not yet supported
if let Some(_rest) = &arrow.params.rest {
return Err("rest params in arrow functions not yet supported".into());
}
@@ -38,7 +38,7 @@ impl Compiler {
let key_reg = ctx.alloc_reg();
ctx.emit_load_const(key_reg, idx);
let val_reg = self.emit_expression(&p.value, ctx)?;
// Name inference (D-04): if property value is an arrow function,
// Name inference: if property value is an arrow function,
// set the compiled sub_module's function_name to the property key.
if matches!(&p.value, Expression::ArrowFunctionExpression(_)) {
if let Some(sub_mod) = ctx.sub_modules.last_mut() {