Monday, December 12, 2022

NewGlobalEnvironment

NewGlobalEnvironment ( G, thisValue )

NewGlobalEnvironment ( G, thisValue ) returns a new global env who's outer lexical environment is null and its global Environment Record created as globalRec:

  1. .[[ObjectRecord]]: a new object Environment Record who's binding object is G
  2. .[[DeclarativeRecord]]: a new declarative Environment Record; [[VarNames]]: a new empty List.
  3. .[[GlobalThisValue]]: thisValue (zxxu: thisValue and G means different stuff? according to SetRealmGlobalObject and InitializeHostDefinedRealm, they can be the same but also can be different)

No comments:

Post a Comment