1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:58:11 +00:00

LibJS/Bytecode: Implement for await of

Summary:
    Diff Tests:
        +391    +15    +2 💥️    -408 📝
This commit is contained in:
Luke Wilde 2023-06-27 19:24:34 +01:00 committed by Andreas Kling
parent 9b8b8c0e04
commit 363bf114c0
4 changed files with 43 additions and 19 deletions

View file

@ -18,6 +18,7 @@
#include <LibJS/Heap/Cell.h>
#include <LibJS/Runtime/Environment.h>
#include <LibJS/Runtime/EnvironmentCoordinate.h>
#include <LibJS/Runtime/IteratorOperations.h>
#include <LibJS/Runtime/Value.h>
#include <LibJS/Runtime/ValueTraits.h>
@ -1125,8 +1126,9 @@ private:
class GetIterator final : public Instruction {
public:
GetIterator()
GetIterator(IteratorHint hint = IteratorHint::Sync)
: Instruction(Type::GetIterator)
, m_hint(hint)
{
}
@ -1134,6 +1136,9 @@ public:
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
private:
IteratorHint m_hint { IteratorHint::Sync };
};
class GetMethod final : public Instruction {