Skip to content

Commit

Permalink
Editorial: Make CreateImmutableBinding's strict parameter a required …
Browse files Browse the repository at this point in the history
…parameter

And update the three legacy callers to pass *false* as the strict parameter.
  • Loading branch information
anba authored and bterlson committed Feb 29, 2016
1 parent f623ed6 commit 9e15064
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -4606,7 +4606,7 @@ <h1>Environment Records</h1>
CreateImmutableBinding(N, S)
</td>
<td>
Create a new but uninitialized immutable binding in an Environment Record. The String value _N_ is the text of the bound name. If _S_ is *true* then attempts to access the value of the binding before it is initialized or set it after it has been initialized will always throw an exception, regardless of the strict mode setting of operations that reference that binding. _S_ is an optional parameter that defaults to *false*.
Create a new but uninitialized immutable binding in an Environment Record. The String value _N_ is the text of the bound name. If _S_ is *true* then attempts to access the value of the binding before it is initialized or set it after it has been initialized will always throw an exception, regardless of the strict mode setting of operations that reference that binding.
</td>
</tr>
<tr>
Expand Down Expand Up @@ -4701,7 +4701,7 @@ <h1>CreateMutableBinding (_N_, _D_)</h1>
<!-- es6num="8.1.1.1.3" -->
<emu-clause id="sec-declarative-environment-records-createimmutablebinding-n-s">
<h1>CreateImmutableBinding (_N_, _S_)</h1>
<p>The concrete Environment Record method CreateImmutableBinding for declarative Environment Records creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If Boolean argument _S_ is provided and has the value *true* the new binding is marked as a strict binding.</p>
<p>The concrete Environment Record method CreateImmutableBinding for declarative Environment Records creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If the Boolean argument _S_ has the value *true* the new binding is marked as a strict binding.</p>
<emu-alg>
1. Let _envRec_ be the declarative Environment Record for which the method was invoked.
1. Assert: _envRec_ does not already have a binding for _N_.
Expand Down Expand Up @@ -5276,7 +5276,7 @@ <h1>CreateMutableBinding (_N_, _D_)</h1>
<!-- es6num="8.1.1.4.3" -->
<emu-clause id="sec-global-environment-records-createimmutablebinding-n-s">
<h1>CreateImmutableBinding (_N_, _S_)</h1>
<p>The concrete Environment Record method CreateImmutableBinding for global Environment Records creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If Boolean argument _S_ is provided and has the value *true* the new binding is marked as a strict binding.</p>
<p>The concrete Environment Record method CreateImmutableBinding for global Environment Records creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If the Boolean argument _S_ has the value *true* the new binding is marked as a strict binding.</p>
<emu-alg>
1. Let _envRec_ be the global Environment Record for which the method was invoked.
1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]].
Expand Down Expand Up @@ -7064,7 +7064,7 @@ <h1>FunctionDeclarationInstantiation (_func_, _argumentsList_)</h1>
1. NOTE mapped argument object is only provided for non-strict functions that don't have a rest parameter, any parameter default value initializers, or any destructured parameters.
1. Let _ao_ be CreateMappedArgumentsObject(_func_, _formals_, _argumentsList_, _envRec_).
1. If _strict_ is *true*, then
1. Perform ! _envRec_.CreateImmutableBinding(`"arguments"`).
1. Perform ! _envRec_.CreateImmutableBinding(`"arguments"`, *false*).
1. Else,
1. Perform ! _envRec_.CreateMutableBinding(`"arguments"`).
1. Call _envRec_.InitializeBinding(`"arguments"`, _ao_).
Expand Down Expand Up @@ -17888,7 +17888,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1. Let _funcEnv_ be NewDeclarativeEnvironment(_scope_).
1. Let _envRec_ be _funcEnv_'s EnvironmentRecord.
1. Let _name_ be StringValue of |BindingIdentifier|.
1. Perform _envRec_.CreateImmutableBinding(_name_).
1. Perform _envRec_.CreateImmutableBinding(_name_, *false*).
1. Let _closure_ be FunctionCreate(~Normal~, |FormalParameters|, |FunctionBody|, _funcEnv_, _strict_).
1. Perform MakeConstructor(_closure_).
1. Perform SetFunctionName(_closure_, _name_).
Expand Down Expand Up @@ -18650,7 +18650,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1. Let _funcEnv_ be NewDeclarativeEnvironment(_scope_).
1. Let _envRec_ be _funcEnv_'s EnvironmentRecord.
1. Let _name_ be StringValue of |BindingIdentifier|.
1. Perform _envRec_.CreateImmutableBinding(_name_).
1. Perform _envRec_.CreateImmutableBinding(_name_, *false*).
1. Let _closure_ be GeneratorFunctionCreate(~Normal~, |FormalParameters|, |GeneratorBody|, _funcEnv_, _strict_).
1. Let _prototype_ be ObjectCreate(%GeneratorPrototype%).
1. Perform DefinePropertyOrThrow(_closure_, `"prototype"`, PropertyDescriptor{[[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false*}).
Expand Down

0 comments on commit 9e15064

Please sign in to comment.