0

我刚刚浏览了 ECMAScript 2018 [ https://www.ecma-international.org/ecma-262/9.0/index.html#sec-lexical-environments]和 ECMAScript 2015 [ http://www.ecma- international.org/ecma-262/6.0/#sec-lexical-environments]了解词法环境和环境记录之间的区别。但是现在我对 Lexical Environment 和 Environment Records 如何在这些规范中定义感到有些困惑。这些文档中的每一个都没有具体说明绑定需要驻留的位置。请告诉我哪个定义对于 ExecutionContexts 是正确的,并且在这两个规范方面是否有一些变化?

ExecutionContext {
  LexicalEnvironment : {
    EnvironementReocrd : {
      - type
      - attributes,
      - this binding // Binding to this
    },
    outter, // Reference to the outer Lexical Environment.
  },
  VariableEnvironment : {
    .....
  }
}

或这个 ??

ExecutionContext {
  LexicalEnvironment: {
    EnvironementReocrd : {
      - type
      - attributes,
    },
    outter, // Reference to the outer Lexical Environment.
    - this binding // Binding to this
  },
  VariableEnvironment : {
    .....
  },
}
4

0 回答 0