Skip to content

Commit

Permalink
Merge pull request #117 from Ms2ger/es-createdataproperty
Browse files Browse the repository at this point in the history
Use CreateDataProperty where possible.
  • Loading branch information
heycam committed May 11, 2016
2 parents b1c6a0b + 0cdd9b3 commit 81b059e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 56 deletions.
36 changes: 8 additions & 28 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7488,9 +7488,7 @@ <h4>4.2.21. Dictionary types</h4>
<ol>
<li>Let <var>idlValue</var> be the value of <var>member</var> on <var>V</var>.</li>
<li>Let <var>value</var> be the result of <a class="dfnref" href="#dfn-convert-idl-to-ecmascript-value">converting</a> <var>idlValue</var> to an ECMAScript value.</li>
<li>Call the <span class="prop">[[DefineOwnProperty]]</span> internal method on <var>O</var> with property name <var>key</var>,
Property Descriptor <span class="descriptor">{ [[Writable]]: <span class="esvalue">true</span>, [[Enumerable]]: <span class="esvalue">true</span>, [[Configurable]]: <span class="esvalue">true</span>, [[Value]]: <var>value</var> }</span>
and Boolean flag <span class="esvalue">false</span>.</li>
<li>Call <a class="external" href="https://tc39.github.io/ecma262/#sec-createdataproperty">CreateDataProperty</a>(<var>O</var>, <var>key</var>, <var>value</var>.</li>
</ol>
</li>
</ol>
Expand Down Expand Up @@ -7678,9 +7676,7 @@ <h4>4.2.25. Sequences — sequence&lt;<var>T</var>&gt;</h4>
<li>Let <var>E</var> be the result of <a class="dfnref" href="#dfn-convert-idl-to-ecmascript-value">converting</a>
<var>V</var> to an ECMAScript value.</li>
<li>Let <var>P</var> be the result of calling <a class="external" href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a>(<var>i</var>).</li>
<li>Call the <span class="prop">[[DefineOwnProperty]]</span> internal method on <var>A</var> with property name <var>P</var>,
Property Descriptor <span class="descriptor">{ [[Writable]]: <span class="esvalue">true</span>, [[Enumerable]]: <span class="esvalue">true</span>, [[Configurable]]: <span class="esvalue">true</span>, [[Value]]: <var>E</var> }</span>
and Boolean flag <span class="esvalue">false</span>.</li>
<li>Call <a class="external" href="https://tc39.github.io/ecma262/#sec-createdataproperty">CreateDataProperty</a>(<var>A</var>, <var>P</var>, <var>E</var>).</li>
<li>Set <var>i</var> to <var>i</var> + 1.</li>
</ol>
</li>
Expand Down Expand Up @@ -11301,14 +11297,9 @@ <h4>4.6.3. Interface prototype object</h4>
<li>Let <var>object</var> be a new object created as if by the expression <code>({})</code>.</li>
<li>For each of the aforementioned <a class="dfnref" href="#dfn-interface-member">interface members</a>
declared with the <a class="xattr" href="#Unscopable">[Unscopable]</a> extended attribute,
call the <span class="prop">[[DefineOwnProperty]]</span> method of <var>object</var>
passing the <a class="dfnref" href="#dfn-identifier">identifier</a> of the
interface member as the property name, Property Descriptor
<span class="descriptor">{ [[Value]]: <span class="esvalue">true</span>,
[[Writable]]: <span class="esvalue">true</span>,
[[Enumerable]]: <span class="esvalue">true</span>,
[[Configurable]]: <span class="esvalue">true</span> }</span>
and <span class="esvalue">false</span>.</li>
call <a class="external" href="https://tc39.github.io/ecma262/#sec-createdataproperty">CreateDataProperty</a>(<var>object</var>,
the <a class="dfnref" href="#dfn-identifier">identifier</a> of the
interface member, <span class="esvalue">true</span>).</li>
<li>Return <var>object</var>.</li>
</ol>
<p>
Expand Down Expand Up @@ -11671,10 +11662,7 @@ <h4>4.6.6. Attributes</h4>
extended attribute, then:
<ol>
<li>Let <var>P</var> be the identifier of the attribute.</li>
<li>Call the <span class="prop">[[DefineOwnProperty]]</span> method of <var>O</var>
passing property name <var>P</var>, Property Descriptor
<span class="descriptor">{ [[Value]]: <var>V</var>, [[Writable]]: <span class="esvalue">true</span>, [[Enumerable]]: <span class="esvalue">true</span>, [[Configurable]]: <span class="esvalue">true</span> }</span>,
and <b>false</b>.</li>
<li>Call <a class="external" href="https://tc39.github.io/ecma262/#sec-createdataproperty">CreateDataProperty</a>(<var>O</var>, <var>P</var>, <var>V</var>).</li>
<li>Return <span class="esvalue">undefined</span>.</li>
</ol>
</li>
Expand Down Expand Up @@ -12058,11 +12046,7 @@ <h5>4.6.7.2. Serializers</h5>
<li>Let <var>V</var> be the result of <a class="dfnref" href="#dfn-convert-serialized-value-to-ecmascript-value">converting</a>
the value of the entry to an ECMAScript value.</li>
<li>Let <var>P</var> be the entry’s key.</li>
<li>Call the <span class="prop">[[DefineOwnProperty]]</span> internal method of <var>O</var> passing
property name <var>P</var>, Property Descriptor <span class="descriptor">{ [[Value]]: <var>V</var>,
[[Writable]]: <span class="esvalue">true</span>, [[Enumerable]]: <span class="esvalue">true</span>,
[[Configurable]]: <span class="esvalue">true</span> }</span>, and <span class="esvalue">false</span>
as arguments.</li>
<li>Call <a class="external" href="https://tc39.github.io/ecma262/#sec-createdataproperty">CreateDataProperty</a>(<var>O</var>, <var>P</var>, <var>V</var>).</li>
</ol>
</li>
<li>Return <var>O</var>.</li>
Expand All @@ -12078,11 +12062,7 @@ <h5>4.6.7.2. Serializers</h5>
<li>Let <var>V</var> be the result of <a class="dfnref" href="#dfn-convert-serialized-value-to-ecmascript-value">converting</a>
the value of the element in <var>S</var> at index <var>index</var> to an ECMAScript value.</li>
<li>Let <var>P</var> be <a class="external" href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a>(<var>index</var>).</li>
<li>Call the <span class="prop">[[DefineOwnProperty]]</span> internal method of <var>O</var> passing
property name <var>P</var>, Property Descriptor <span class="descriptor">{ [[Value]]: <var>V</var>,
[[Writable]]: <span class="esvalue">true</span>, [[Enumerable]]: <span class="esvalue">true</span>,
[[Configurable]]: <span class="esvalue">true</span> }</span>, and <span class="esvalue">false</span>
as arguments.</li>
<li>Call <a class="external" href="https://tc39.github.io/ecma262/#sec-createdataproperty">CreateDataProperty</a>(<var>O</var>, <var>P</var>, <var>V</var>).</li>
</ol>
</li>
<li>Return <var>A</var>.</li>
Expand Down
36 changes: 8 additions & 28 deletions index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7344,9 +7344,7 @@ iframe.appendChild instanceof w.Function; <span class='comment'>// Evaluates to
<ol>
<li>Let <var>idlValue</var> be the value of <var>member</var> on <var>V</var>.</li>
<li>Let <var>value</var> be the result of <a class='dfnref' href='#dfn-convert-idl-to-ecmascript-value'>converting</a> <var>idlValue</var> to an ECMAScript value.</li>
<li>Call the <span class='prop'>[[DefineOwnProperty]]</span> internal method on <var>O</var> with property name <var>key</var>,
Property Descriptor <span class='descriptor'>{ [[Writable]]: <span class='esvalue'>true</span>, [[Enumerable]]: <span class='esvalue'>true</span>, [[Configurable]]: <span class='esvalue'>true</span>, [[Value]]: <var>value</var> }</span>
and Boolean flag <span class='esvalue'>false</span>.</li>
<li>Call <a>CreateDataProperty</a>(<var>O</var>, <var>key</var>, <var>value</var>.</li>
</ol>
</li>
</ol>
Expand Down Expand Up @@ -7537,9 +7535,7 @@ iframe.appendChild instanceof w.Function; <span class='comment'>// Evaluates to
<li>Let <var>E</var> be the result of <a class='dfnref' href='#dfn-convert-idl-to-ecmascript-value'>converting</a>
<var>V</var> to an ECMAScript value.</li>
<li>Let <var>P</var> be the result of calling <a>ToString</a>(<var>i</var>).</li>
<li>Call the <span class='prop'>[[DefineOwnProperty]]</span> internal method on <var>A</var> with property name <var>P</var>,
Property Descriptor <span class='descriptor'>{ [[Writable]]: <span class='esvalue'>true</span>, [[Enumerable]]: <span class='esvalue'>true</span>, [[Configurable]]: <span class='esvalue'>true</span>, [[Value]]: <var>E</var> }</span>
and Boolean flag <span class='esvalue'>false</span>.</li>
<li>Call <a>CreateDataProperty</a>(<var>A</var>, <var>P</var>, <var>E</var>).</li>
<li>Set <var>i</var> to <var>i</var> + 1.</li>
</ol>
</li>
Expand Down Expand Up @@ -11172,14 +11168,9 @@ partial interface Window {
<li>Let <var>object</var> be a new object created as if by the expression <code>({})</code>.</li>
<li>For each of the aforementioned <a class='dfnref' href='#dfn-interface-member'>interface members</a>
declared with the <a class='xattr' href='#Unscopable'>[Unscopable]</a> extended attribute,
call the <span class='prop'>[[DefineOwnProperty]]</span> method of <var>object</var>
passing the <a class='dfnref' href='#dfn-identifier'>identifier</a> of the
interface member as the property name, Property Descriptor
<span class='descriptor'>{ [[Value]]: <span class='esvalue'>true</span>,
[[Writable]]: <span class='esvalue'>true</span>,
[[Enumerable]]: <span class='esvalue'>true</span>,
[[Configurable]]: <span class='esvalue'>true</span> }</span>
and <span class='esvalue'>false</span>.</li>
call <a>CreateDataProperty</a>(<var>object</var>,
the <a class='dfnref' href='#dfn-identifier'>identifier</a> of the
interface member, <span class='esvalue'>true</span>).</li>
<li>Return <var>object</var>.</li>
</ol>
<p>
Expand Down Expand Up @@ -11542,10 +11533,7 @@ interface
extended attribute, then:
<ol>
<li>Let <var>P</var> be the identifier of the attribute.</li>
<li>Call the <span class='prop'>[[DefineOwnProperty]]</span> method of <var>O</var>
passing property name <var>P</var>, Property Descriptor
<span class='descriptor'>{ [[Value]]: <var>V</var>, [[Writable]]: <span class='esvalue'>true</span>, [[Enumerable]]: <span class='esvalue'>true</span>, [[Configurable]]: <span class='esvalue'>true</span> }</span>,
and <b>false</b>.</li>
<li>Call <a>CreateDataProperty</a>(<var>O</var>, <var>P</var>, <var>V</var>).</li>
<li>Return <span class='esvalue'>undefined</span>.</li>
</ol>
</li>
Expand Down Expand Up @@ -11929,11 +11917,7 @@ interface
<li>Let <var>V</var> be the result of <a class='dfnref' href='#dfn-convert-serialized-value-to-ecmascript-value'>converting</a>
the value of the entry to an ECMAScript value.</li>
<li>Let <var>P</var> be the entry’s key.</li>
<li>Call the <span class='prop'>[[DefineOwnProperty]]</span> internal method of <var>O</var> passing
property name <var>P</var>, Property Descriptor <span class='descriptor'>{ [[Value]]: <var>V</var>,
[[Writable]]: <span class='esvalue'>true</span>, [[Enumerable]]: <span class='esvalue'>true</span>,
[[Configurable]]: <span class='esvalue'>true</span> }</span>, and <span class='esvalue'>false</span>
as arguments.</li>
<li>Call <a>CreateDataProperty</a>(<var>O</var>, <var>P</var>, <var>V</var>).</li>
</ol>
</li>
<li>Return <var>O</var>.</li>
Expand All @@ -11949,11 +11933,7 @@ interface
<li>Let <var>V</var> be the result of <a class='dfnref' href='#dfn-convert-serialized-value-to-ecmascript-value'>converting</a>
the value of the element in <var>S</var> at index <var>index</var> to an ECMAScript value.</li>
<li>Let <var>P</var> be <a>ToString</a>(<var>index</var>).</li>
<li>Call the <span class='prop'>[[DefineOwnProperty]]</span> internal method of <var>O</var> passing
property name <var>P</var>, Property Descriptor <span class='descriptor'>{ [[Value]]: <var>V</var>,
[[Writable]]: <span class='esvalue'>true</span>, [[Enumerable]]: <span class='esvalue'>true</span>,
[[Configurable]]: <span class='esvalue'>true</span> }</span>, and <span class='esvalue'>false</span>
as arguments.</li>
<li>Call <a>CreateDataProperty</a>(<var>O</var>, <var>P</var>, <var>V</var>).</li>
</ol>
</li>
<li>Return <var>A</var>.</li>
Expand Down

0 comments on commit 81b059e

Please sign in to comment.