mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
LibJS/Bytecode: Implement for await of
Summary: Diff Tests: +391 ✅ +15 ❌ +2 💥️ -408 📝
This commit is contained in:
parent
9b8b8c0e04
commit
363bf114c0
4 changed files with 43 additions and 19 deletions
|
@ -1008,7 +1008,7 @@ ThrowCompletionOr<void> DeleteByValue::execute_impl(Bytecode::Interpreter& inter
|
|||
ThrowCompletionOr<void> GetIterator::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
auto& vm = interpreter.vm();
|
||||
auto iterator = TRY(get_iterator(vm, interpreter.accumulator()));
|
||||
auto iterator = TRY(get_iterator(vm, interpreter.accumulator(), m_hint));
|
||||
interpreter.accumulator() = iterator_to_object(vm, iterator);
|
||||
return {};
|
||||
}
|
||||
|
@ -1525,7 +1525,8 @@ DeprecatedString DeleteByValue::to_deprecated_string_impl(Bytecode::Executable c
|
|||
|
||||
DeprecatedString GetIterator::to_deprecated_string_impl(Executable const&) const
|
||||
{
|
||||
return "GetIterator";
|
||||
auto hint = m_hint == IteratorHint::Sync ? "sync" : "async";
|
||||
return DeprecatedString::formatted("GetIterator hint:{}", hint);
|
||||
}
|
||||
|
||||
DeprecatedString GetMethod::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue