mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
docs: 修正内置名写点注释的零动作表述
This commit is contained in:
@@ -109,9 +109,10 @@ impl Emitter {
|
||||
// 脚本顶层 var:同步写全局对象,使 globalThis.x 反射声明值。
|
||||
if ctx.is_global_scope && matches!(kind, VariableDeclarationKind::Var) {
|
||||
if CompileCtx::is_known_builtin(name) {
|
||||
// 内置名保持 GlobalDeclarationInstantiation(脚本顶层声明实例化)
|
||||
// 序言的零动作写点——属性已存在时不改动值、仅缺失时新建;槽内保留
|
||||
// 求值开始前预载的全局属性值(镜像值),本路径不扩大 strict 抛错面。
|
||||
// 内置名经同一声明写点落值:普通脚本经顶层 This 的
|
||||
// `DEFINE_GLOBAL_PROP`、eval 经 `DEFINE_GLOBAL_PROP_C`;既有可写
|
||||
// 属性仅更新值、保留原 e/c 描述符。只读三常量已在上方拦截,
|
||||
// 本路径不扩大 strict 抛错面。
|
||||
self.emit_global_prop_write(name, src_reg, ctx);
|
||||
} else {
|
||||
// 用户名的既有属性面:声明带初始化是 PutValue 语义,经
|
||||
|
||||
Reference in New Issue
Block a user