Skip to content

Commit

Permalink
Editorial: Unfold the only invocation of CaseSelectorEvaluation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdyck committed Aug 12, 2017
1 parent d77cccf commit 1635764
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -17422,26 +17422,17 @@ <h1>Runtime Semantics: CaseBlockEvaluation</h1>
</emu-alg>
</emu-clause>

<emu-clause id="sec-runtime-semantics-caseclauseisselected" aoid="CaseClauseIsSelected">
<emu-clause id="sec-runtime-semantics-caseclauseisselected" aoid="CaseClauseIsSelected" oldids="sec-runtime-semantics-caseselectorevaluation">
<h1>Runtime Semantics: CaseClauseIsSelected ( _C_, _input_ )</h1>
<p>The abstract operation CaseClauseIsSelected, given |CaseClause| _C_ and value _input_, determines whether _C_ matches _input_.</p>
<emu-alg>
1. Let _clauseSelector_ be the result of CaseSelectorEvaluation of _C_.
1. ReturnIfAbrupt(_clauseSelector_).
1. Assert: _C_ is an instance of the production <emu-grammar>CaseClause : `case` Expression `:` StatementList?</emu-grammar>.
1. Let _exprRef_ be the result of evaluating the |Expression| of _C_.
1. Let _clauseSelector_ be ? GetValue(_exprRef_).
1. Return the result of performing Strict Equality Comparison _input_ === _clauseSelector_.
</emu-alg>
</emu-clause>

<!-- es6num="13.12.10" -->
<emu-clause id="sec-runtime-semantics-caseselectorevaluation">
<h1>Runtime Semantics: CaseSelectorEvaluation</h1>
<emu-grammar>CaseClause : `case` Expression `:` StatementList?</emu-grammar>
<emu-alg>
1. Let _exprRef_ be the result of evaluating |Expression|.
1. Return ? GetValue(_exprRef_).
</emu-alg>
<emu-note>
<p>CaseSelectorEvaluation does not execute the associated |StatementList|. It simply evaluates the |Expression| and returns the value, which the |CaseBlock| algorithm uses to determine which |StatementList| to start executing.</p>
<p>This operation does not execute _C_'s |StatementList| (if any). The |CaseBlock| algorithm uses its return value to determine which |StatementList| to start executing.</p>
</emu-note>
</emu-clause>

Expand Down

0 comments on commit 1635764

Please sign in to comment.