mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +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
Notes:
sideshowbarker
2024-07-17 05:21:12 +09:00
Author: https://github.com/trflynn89
Commit: 1760361304
Pull-request: https://github.com/SerenityOS/serenity/pull/20091
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