mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
LibJS: Add JS_CELL macro and use it in all JS::Cell subclasses
This is similar to what we already had with JS_OBJECT (and also JS_ENVIRONMENT) but sits at the top of the Cell inheritance hierarchy.
This commit is contained in:
parent
94f016b363
commit
6e973ce69b
16 changed files with 37 additions and 23 deletions
|
@ -46,6 +46,8 @@ struct PrivateElement {
|
|||
};
|
||||
|
||||
class Object : public Cell {
|
||||
JS_CELL(Object, Cell);
|
||||
|
||||
public:
|
||||
static Object* create(Realm&, Object* prototype);
|
||||
|
||||
|
@ -174,7 +176,6 @@ public:
|
|||
bool has_parameter_map() const { return m_has_parameter_map; }
|
||||
void set_has_parameter_map() { m_has_parameter_map = true; }
|
||||
|
||||
virtual StringView class_name() const override { return "Object"sv; }
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
Value get_direct(size_t index) const { return m_storage[index]; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue