简体   繁体   中英

Javascript Environment Record, is it an Exotic Object?

Are the environment record and exotic object creation procedures the same?

ie 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?

PS Is it correct to refer to an environment record as a completed execution context?

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.

PS 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM