Skip to content

Commit d68dfa1

Browse files
committed
Editorial: Use 'list-concatenation' more
Specifically, use it in `Runtime Semantics: LabelledEvaluation`. It's unusual to modify the value of an SDO parameter. Certainly, other SDOs with a _labelSet_ parameter are careful to copy it before appending anything. (ContainsDuplicateLabels, ContainsUndefinedBreakTarget, ContainsUndefinedContinueTarget) I'm pretty sure that the modification here doesn't matter (because in the few places that LabelledEvaluation is invoked, nothing is done with the _labelSet_ arg afterward). But it's easier to understand (and more consistent) if we leave _labelSet_ unmodified. So I've used list-concatenation.
1 parent 2e118ff commit d68dfa1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19663,8 +19663,8 @@ <h1>Runtime Semantics: LabelledEvaluation</h1>
1966319663
<emu-grammar>LabelledStatement : LabelIdentifier `:` LabelledItem</emu-grammar>
1966419664
<emu-alg>
1966519665
1. Let _label_ be the StringValue of |LabelIdentifier|.
19666-
1. Append _label_ as an element of _labelSet_.
19667-
1. Let _stmtResult_ be LabelledEvaluation of |LabelledItem| with argument _labelSet_.
19666+
1. Let _newLabelSet_ be the list-concatenation of _labelSet_ and &laquo; _label_ &raquo;.
19667+
1. Let _stmtResult_ be LabelledEvaluation of |LabelledItem| with argument _newLabelSet_.
1966819668
1. If _stmtResult_.[[Type]] is ~break~ and SameValue(_stmtResult_.[[Target]], _label_) is *true*, then
1966919669
1. Set _stmtResult_ to NormalCompletion(_stmtResult_.[[Value]]).
1967019670
1. Return Completion(_stmtResult_).

0 commit comments

Comments
 (0)