P. 1
JavaScript Language Specification(ECMA-262)

JavaScript Language Specification(ECMA-262)

|Views: 59|Likes:
Publicado porrayaspnet
http://rayaspnet.blogspot.com/

http://rayaspnet.blogspot.com/

More info:

Published by: rayaspnet on Jun 06, 2011
Direitos Autorais:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

04/06/2012

pdf

text

original

The following steps are performed when control enters the execution context for eval code:

1. If there is no calling context or if the eval code is not being evaluated by a direct call (15.1.2.1.1) to the eval

function then,

a. Initialize the execution context as if it was a global execution context using the eval code as C as
described in 10.4.1.1.

2. Else,

a. Set the ThisBinding to the same value as the ThisBinding of the calling execution context.
b. Set the LexicalEnvironment to the same value as the LexicalEnvironment of the calling execution

context.

c. Set the VariableEnvironment to the same value as the VariableEnvironment of the calling execution

context.
3. If the eval code is strict code, then
a. Let strictVarEnv be the result of calling NewDeclarativeEnvironment passing the
LexicalEnvironment as the argument.
b. Set the LexicalEnvironment to strictVarEnv.
c. Set the VariableEnvironment to strictVarEnv.
4. Perform Declaration Binding Instantiation as described in 10.5 using the eval code.

10.4.2.1 Strict Mode Restrictions

The eval code cannot instantiate variable or function bindings in the variable environment of the calling
context that invoked the eval if either the code of the calling context or the eval code is strict code. Instead
such bindings are instantiated in a new VariableEnvironment that is only accessible to the eval code.

You're Reading a Free Preview

Descarregar
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->