mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 01:48:11 +00:00
LibJS/Bytecode: Ensure we do not generate bytecode for super expressions
Similar to AST mode, super expressions are handled elsewhere.
This commit is contained in:
parent
23daf5097b
commit
2f1d6c0b9a
2 changed files with 7 additions and 0 deletions
|
@ -1435,6 +1435,7 @@ public:
|
||||||
|
|
||||||
virtual Completion execute(Interpreter&) const override;
|
virtual Completion execute(Interpreter&) const override;
|
||||||
virtual void dump(int indent) const override;
|
virtual void dump(int indent) const override;
|
||||||
|
virtual Bytecode::CodeGenerationErrorOr<void> generate_bytecode(Bytecode::Generator&) const override;
|
||||||
|
|
||||||
virtual bool is_super_expression() const override { return true; }
|
virtual bool is_super_expression() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -2348,6 +2348,12 @@ Bytecode::CodeGenerationErrorOr<void> SwitchStatement::generate_labelled_evaluat
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Bytecode::CodeGenerationErrorOr<void> SuperExpression::generate_bytecode(Bytecode::Generator&) const
|
||||||
|
{
|
||||||
|
// The semantics for SuperExpression are handled in CallExpression and SuperCall.
|
||||||
|
VERIFY_NOT_REACHED();
|
||||||
|
}
|
||||||
|
|
||||||
Bytecode::CodeGenerationErrorOr<void> ClassDeclaration::generate_bytecode(Bytecode::Generator& generator) const
|
Bytecode::CodeGenerationErrorOr<void> ClassDeclaration::generate_bytecode(Bytecode::Generator& generator) const
|
||||||
{
|
{
|
||||||
auto accumulator_backup_reg = generator.allocate_register();
|
auto accumulator_backup_reg = generator.allocate_register();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue