mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 14:07:45 +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
|
@ -23,6 +23,8 @@ public: \
|
|||
virtual StringView class_name() const override { return #class_##sv; }
|
||||
|
||||
class Environment : public Cell {
|
||||
JS_CELL(Environment, Cell);
|
||||
|
||||
public:
|
||||
virtual bool has_this_binding() const { return false; }
|
||||
virtual ThrowCompletionOr<Value> get_this_binding(VM&) const { return Value {}; }
|
||||
|
@ -48,8 +50,6 @@ public:
|
|||
template<typename T>
|
||||
bool fast_is() const = delete;
|
||||
|
||||
virtual StringView class_name() const override { return "Environment"sv; }
|
||||
|
||||
// This flag is set on the entire variable environment chain when direct eval() is performed.
|
||||
// It is used to disable non-local variable access caching.
|
||||
bool is_permanently_screwed_by_eval() const { return m_permanently_screwed_by_eval; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue