mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
LibJS: Implement bytecode generation for For-In/Of statements
This also implements the rather interesting behaviour that #12772 relies on, so this fixes that bug in BC mode (the AST interp remains affected).
This commit is contained in:
parent
83afc1154c
commit
8f7021faf7
6 changed files with 454 additions and 15 deletions
|
@ -778,6 +778,18 @@ public:
|
|||
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
|
||||
};
|
||||
|
||||
class GetObjectPropertyIterator final : public Instruction {
|
||||
public:
|
||||
GetObjectPropertyIterator()
|
||||
: Instruction(Type::GetObjectPropertyIterator)
|
||||
{
|
||||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
String to_string_impl(Bytecode::Executable const&) const;
|
||||
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
|
||||
};
|
||||
|
||||
class IteratorNext final : public Instruction {
|
||||
public:
|
||||
IteratorNext()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue