Reputation: 371
Are the environment record and exotic object creation procedures the same?
i.e. creation of a basic object with different internal slots and methods, than that of an ordinary object?
Are both objects constructed with the same %Object% intrinsic method?
P.S. Is it correct to refer to an environment record as a completed execution context?
Upvotes: 0
Views: 138
Reputation: 2448
An Environment Record isn't an object at all. (Or more precisely, there's no requirement that Environment Records be implemented as objects. Thinking of them as objects will probably hinder your understanding.)
Environment Records are "specification values", entities that are defined only as a device to specify semantics. In contrast, objects are "language values", values that your JavaScript code can actually manipulate.
P.S. Is it correct to refer to an environment record as a completed execution context?
Nope. Environment Records and Execution Contexts are distinct kinds of specification values. A typical Execution Context will refer to one or two Environment Records, to resolve identifiers in the code that it evaluates.
Upvotes: 2