ECMAScript(ECMA-262 5.1)中“reference”的“base value”是什么?

What is `base value` of `reference` in ECMAScript(ECMA-262 5.1)?

我一直在努力了解 this 值是如何在 javascript 中设置的,并且发现 ECMAScript 语言规范非常有用。我正在阅读 section 8.7 reference specification type and found that reference in ECMAScript is made of 3 component, base value, referenced name, strict reference flagto understand section 11.2.3

我可以从他们的名字中猜出 referenced namestrict reference flag 是什么,但我不明白 base value 是什么。文档说 base valueundefinedStringBooleanNumberObject,但没有说明它是如何设置的它是什么。我猜它类似于上下文对象。谁能解释一下?

是的,基本值 是引用名称所在的上下文。

对于 object 属性,这将是 object(参见 §8.12 Object internal methods for setter/getter operations). For a variable, this would be the variable environment (§10.2.1 Environment records). For an unresolvable reference (the things that throw reference errors ),这将是 undefined

it does not say how it is set

Reference 值仅由很少的操作构成: