8.3.3 GetThisEnvironment ( )

抽象操作 GetThisEnvironment 找到当前提供关键字 this 的绑定的 Environment Record。 GetThisEnvironment 执行以下步骤:

  1. 让 lex 为正在运行的执行上下文的词法环境。
  2. 重复

a. 让 envRec 成为 lex 的EnvironmentRecord。 b. 使 exists 变为 envRec.HasThisBinding()。

c. 如果 exists 为 true,则返回 envRec。

d. 让 outer 是 lex 的外部环境引用的值。

e. 使 lex 变为 outer。

results matching ""

    No results matching ""