mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
LibJS: Make GetIterator's hint parameter required
This is an editorial change in the ECMA-262 spec. See:
2562811
This commit is contained in:
parent
5703833116
commit
1760361304
7 changed files with 25 additions and 26 deletions
|
@ -2669,12 +2669,12 @@ static Bytecode::CodeGenerationErrorOr<ForInOfHeadEvaluationResult> for_in_of_he
|
|||
// 7. Else,
|
||||
else {
|
||||
// a. Assert: iterationKind is iterate or async-iterate.
|
||||
// b. If iterationKind is async-iterate, let iteratorHint be async.
|
||||
// c. Else, let iteratorHint be sync.
|
||||
auto iterator_hint = iteration_kind == IterationKind::AsyncIterate ? IteratorHint::Async : IteratorHint::Sync;
|
||||
// b. If iterationKind is async-iterate, let iteratorKind be async.
|
||||
// c. Else, let iteratorKind be sync.
|
||||
auto iterator_kind = iteration_kind == IterationKind::AsyncIterate ? IteratorHint::Async : IteratorHint::Sync;
|
||||
|
||||
// d. Return ? GetIterator(exprValue, iteratorHint).
|
||||
generator.emit<Bytecode::Op::GetIterator>(iterator_hint);
|
||||
// d. Return ? GetIterator(exprValue, iteratorKind).
|
||||
generator.emit<Bytecode::Op::GetIterator>(iterator_kind);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue