Skip to content

Commit

Permalink
Deploying to gh-pages from @ 4c1b90f 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
dminor committed Dec 3, 2024
1 parent a6cad51 commit 4163326
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</ul></div><div id="menu-toggle"><svg xmlns="http://www.w3.org/2000/svg" style="width:100%; height:100%; stroke:currentColor" viewBox="0 0 120 120" width="54" height="54">
<title>Menu</title>
<path stroke-width="10" stroke-linecap="round" d="M30,60 h60 M30,30 m0,5 h60 M30,90 m0,-5 h60"></path>
</svg></div><div id="menu-spacer" class="menu-spacer"></div><div id="menu"><div id="menu-search"><input type="text" id="menu-search-box" placeholder="Search..."><div id="menu-search-results" class="inactive"></div></div><div id="menu-pins"><div class="menu-pane-header">Pins<button class="unpin-all">clear</button></div><ul id="menu-pins-list"></ul></div><div class="menu-pane-header">Table of Contents</div><div id="menu-toc"><ol class="toc"><li><span class="item-toggle-none"></span><a href="#intro" title="Introduction">Introduction</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.getOrInsert" title="Map.prototype.getOrInsert ( key, value )"><span class="secnum">1</span> Map.prototype.getOrInsert ( <var>key</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.getOrInsertComputed" title="Map.prototype.getOrInsertComputed ( key, callbackfn )"><span class="secnum">2</span> Map.prototype.getOrInsertComputed ( <var>key</var>, <var>callbackfn</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakmap.prototype.getOrInsert" title="WeakMap.prototype.getOrInsert ( key, value )"><span class="secnum">3</span> WeakMap.prototype.getOrInsert ( <var>key</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakmap.prototype.getOrInsertComputed" title="WeakMap.prototype.getOrInsertComputed ( key, callbackfn )"><span class="secnum">4</span> WeakMap.prototype.getOrInsertComputed ( <var>key</var>, <var>callbackfn</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-copyright-and-software-license" title="Copyright &amp; Software License"><span class="secnum">A</span> Copyright &amp; Software License</a></li></ol></div></div><div id="spec-container"><h1 class="version">Stage 2 Draft / November 29, 2024</h1><h1 class="title">Map.prototype.getOrInsert</h1>
</svg></div><div id="menu-spacer" class="menu-spacer"></div><div id="menu"><div id="menu-search"><input type="text" id="menu-search-box" placeholder="Search..."><div id="menu-search-results" class="inactive"></div></div><div id="menu-pins"><div class="menu-pane-header">Pins<button class="unpin-all">clear</button></div><ul id="menu-pins-list"></ul></div><div class="menu-pane-header">Table of Contents</div><div id="menu-toc"><ol class="toc"><li><span class="item-toggle-none"></span><a href="#intro" title="Introduction">Introduction</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.getOrInsert" title="Map.prototype.getOrInsert ( key, value )"><span class="secnum">1</span> Map.prototype.getOrInsert ( <var>key</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-map.prototype.getOrInsertComputed" title="Map.prototype.getOrInsertComputed ( key, callbackfn )"><span class="secnum">2</span> Map.prototype.getOrInsertComputed ( <var>key</var>, <var>callbackfn</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakmap.prototype.getOrInsert" title="WeakMap.prototype.getOrInsert ( key, value )"><span class="secnum">3</span> WeakMap.prototype.getOrInsert ( <var>key</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-weakmap.prototype.getOrInsertComputed" title="WeakMap.prototype.getOrInsertComputed ( key, callbackfn )"><span class="secnum">4</span> WeakMap.prototype.getOrInsertComputed ( <var>key</var>, <var>callbackfn</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-copyright-and-software-license" title="Copyright &amp; Software License"><span class="secnum">A</span> Copyright &amp; Software License</a></li></ol></div></div><div id="spec-container"><h1 class="version">Stage 2 Draft / December 3, 2024</h1><h1 class="title">Map.prototype.getOrInsert</h1>
<emu-intro id="intro">
<h1>Introduction</h1>
Expand All @@ -65,7 +65,7 @@ <h1><span class="secnum">1</span> Map.prototype.getOrInsert ( <var>key</var>, <v
<emu-clause id="sec-map.prototype.getOrInsertComputed">
<h1><span class="secnum">2</span> Map.prototype.getOrInsertComputed ( <var>key</var>, <var>callbackfn</var> )</h1>
<p>When the getOrInsertComputed method is called the following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="RequireInternalSlot"><a href="https://tc39.es/ecma262/#sec-requireinternalslot">RequireInternalSlot</a></emu-xref>(<var>M</var>, <var class="field">[[MapData]]</var>).</li><li>If <emu-xref aoid="IsCallable"><a href="https://tc39.es/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Set <var>key</var> to <emu-xref aoid="CanonicalizeKeyedCollectionKey"><a href="https://tc39.es/ecma262/#sec-canonicalizekeyedcollectionkey">CanonicalizeKeyedCollectionKey</a></emu-xref>(<var>key</var>).</li><li>For each <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[Key]]</var>, <var class="field">[[Value]]</var>&nbsp;} <var>p</var> of <var>M</var>.<var class="field">[[MapData]]</var>, do<ol><li>If <var>p</var>.<var class="field">[[Key]]</var> is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue"><a href="https://tc39.es/ecma262/#sec-samevalue">SameValue</a></emu-xref>(<var>p</var>.<var class="field">[[Key]]</var>, <var>key</var>) is <emu-val>true</emu-val>, return <var>p</var>.<var class="field">[[Value]]</var>.</li></ol></li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <emu-val>undefined</emu-val>, « <var>key</var>&nbsp;»).</li><li>Let <var>p</var> be the <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[Key]]</var>: <var>key</var>, <var class="field">[[Value]]</var>: <var>value</var>&nbsp;}.</li><li>Append <var>p</var> to <var>M</var>.<var class="field">[[MapData]]</var>.</li><li>Return <var>value</var>.</li></ol></emu-alg>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="RequireInternalSlot"><a href="https://tc39.es/ecma262/#sec-requireinternalslot">RequireInternalSlot</a></emu-xref>(<var>M</var>, <var class="field">[[MapData]]</var>).</li><li>If <emu-xref aoid="IsCallable"><a href="https://tc39.es/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Set <var>key</var> to <emu-xref aoid="CanonicalizeKeyedCollectionKey"><a href="https://tc39.es/ecma262/#sec-canonicalizekeyedcollectionkey">CanonicalizeKeyedCollectionKey</a></emu-xref>(<var>key</var>).</li><li>For each <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[Key]]</var>, <var class="field">[[Value]]</var>&nbsp;} <var>p</var> of <var>M</var>.<var class="field">[[MapData]]</var>, do<ol><li>If <var>p</var>.<var class="field">[[Key]]</var> is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue"><a href="https://tc39.es/ecma262/#sec-samevalue">SameValue</a></emu-xref>(<var>p</var>.<var class="field">[[Key]]</var>, <var>key</var>) is <emu-val>true</emu-val>, return <var>p</var>.<var class="field">[[Value]]</var>.</li></ol></li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <emu-val>undefined</emu-val>, « <var>key</var>&nbsp;»).</li><li>For each <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[Key]]</var>, <var class="field">[[Value]]</var>&nbsp;} <var>p</var> of <var>M</var>.<var class="field">[[MapData]]</var>, do<ol><li>If <var>p</var>.<var class="field">[[Key]]</var> is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue"><a href="https://tc39.es/ecma262/#sec-samevalue">SameValue</a></emu-xref>(<var>p</var>.<var class="field">[[Key]]</var>, <var>key</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>p</var>.<var class="field">[[Value]]</var> to <var>value</var>.</li><li>Return <var>value</var>.</li></ol></li></ol></li><li>Let <var>p</var> be the <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[Key]]</var>: <var>key</var>, <var class="field">[[Value]]</var>: <var>value</var>&nbsp;}.</li><li>Append <var>p</var> to <var>M</var>.<var class="field">[[MapData]]</var>.</li><li>Return <var>value</var>.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-weakmap.prototype.getOrInsert">
Expand All @@ -77,7 +77,7 @@ <h1><span class="secnum">3</span> WeakMap.prototype.getOrInsert ( <var>key</var>
<emu-clause id="sec-weakmap.prototype.getOrInsertComputed">
<h1><span class="secnum">4</span> WeakMap.prototype.getOrInsertComputed ( <var>key</var>, <var>callbackfn</var> )</h1>
<p>When the getOrInsertComputed method is called the following steps are taken:</p>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="RequireInternalSlot"><a href="https://tc39.es/ecma262/#sec-requireinternalslot">RequireInternalSlot</a></emu-xref>(<var>M</var>, <var class="field">[[WeakMapData]]</var>).</li><li>If <emu-xref aoid="IsCallable"><a href="https://tc39.es/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="CanBeHeldWeakly"><a href="https://tc39.es/ecma262/#sec-canbeheldweakly">CanBeHeldWeakly</a></emu-xref>(<var>key</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>For each <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[Key]]</var>, <var class="field">[[Value]]</var>&nbsp;} <var>p</var> of <var>M</var>.<var class="field">[[WeakMapData]]</var>, do<ol><li>If <var>p</var>.<var class="field">[[Key]]</var> is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue"><a href="https://tc39.es/ecma262/#sec-samevalue">SameValue</a></emu-xref>(<var>p</var>.<var class="field">[[Key]]</var>, <var>key</var>) is <emu-val>true</emu-val>, return <var>p</var>.<var class="field">[[Value]]</var>.</li></ol></li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <emu-val>undefined</emu-val>, « <var>key</var>&nbsp;»).</li><li>Let <var>p</var> be the <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[Key]]</var>: <var>key</var>, <var class="field">[[Value]]</var>: <var>value</var>&nbsp;}.</li><li>Append <var>p</var> to <var>M</var>.<var class="field">[[WeakMapData]]</var>.</li><li>Return <var>value</var>.</li></ol></emu-alg>
<emu-alg><ol><li>Let <var>M</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="RequireInternalSlot"><a href="https://tc39.es/ecma262/#sec-requireinternalslot">RequireInternalSlot</a></emu-xref>(<var>M</var>, <var class="field">[[WeakMapData]]</var>).</li><li>If <emu-xref aoid="IsCallable"><a href="https://tc39.es/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>callbackfn</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="CanBeHeldWeakly"><a href="https://tc39.es/ecma262/#sec-canbeheldweakly">CanBeHeldWeakly</a></emu-xref>(<var>key</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>For each <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[Key]]</var>, <var class="field">[[Value]]</var>&nbsp;} <var>p</var> of <var>M</var>.<var class="field">[[WeakMapData]]</var>, do<ol><li>If <var>p</var>.<var class="field">[[Key]]</var> is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue"><a href="https://tc39.es/ecma262/#sec-samevalue">SameValue</a></emu-xref>(<var>p</var>.<var class="field">[[Key]]</var>, <var>key</var>) is <emu-val>true</emu-val>, return <var>p</var>.<var class="field">[[Value]]</var>.</li></ol></li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call">Call</a></emu-xref>(<var>callbackfn</var>, <emu-val>undefined</emu-val>, « <var>key</var>&nbsp;»).</li><li>For each <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[Key]]</var>, <var class="field">[[Value]]</var>&nbsp;} <var>p</var> of <var>M</var>.<var class="field">[[WeakMapData]]</var>, do<ol><li>If <var>p</var>.<var class="field">[[Key]]</var> is not <emu-const>empty</emu-const> and <emu-xref aoid="SameValue"><a href="https://tc39.es/ecma262/#sec-samevalue">SameValue</a></emu-xref>(<var>p</var>.<var class="field">[[Key]]</var>, <var>key</var>) is <emu-val>true</emu-val>, then<ol><li>Set <var>p</var>.<var class="field">[[Value]]</var> to <var>value</var>.</li><li>Return <var>value</var>.</li></ol></li></ol></li><li>Let <var>p</var> be the <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[Key]]</var>: <var>key</var>, <var class="field">[[Value]]</var>: <var>value</var>&nbsp;}.</li><li>Append <var>p</var> to <var>M</var>.<var class="field">[[WeakMapData]]</var>.</li><li>Return <var>value</var>.</li></ol></emu-alg>
</emu-clause><emu-annex id="sec-copyright-and-software-license">
<h1><span class="secnum">A</span> Copyright &amp; Software License</h1>
Expand Down

0 comments on commit 4163326

Please sign in to comment.