1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:27:43 +00:00

LibJS: NewExpression doesn't need compute_this_and_callee()

Now that NewExpression is separated from CallExpression, it doesn't
have to use the ad-hoc compute_this_and_callee() logic.
This commit is contained in:
Andreas Kling 2021-07-02 18:43:25 +02:00
parent 814549b846
commit d81f4d5228
2 changed files with 8 additions and 12 deletions

View file

@ -927,15 +927,16 @@ public:
protected:
void throw_type_error_for_callee(Interpreter&, GlobalObject&, Value callee_value, StringView call_type) const;
NonnullRefPtr<Expression> m_callee;
Vector<Argument> const m_arguments;
private:
struct ThisAndCallee {
Value this_value;
Value callee;
};
ThisAndCallee compute_this_and_callee(Interpreter&, GlobalObject&) const;
NonnullRefPtr<Expression> m_callee;
Vector<Argument> const m_arguments;
};
class NewExpression final : public CallExpression {