mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 06:37:52 +00:00
LibJS: Make GetIterator's hint parameter required
This is an editorial change in the ECMA-262 spec. See: https://github.com/tc39/ecma262/commit/2562811
This commit is contained in:
committed by
Andreas Kling
parent
5703833116
commit
1760361304
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user