mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:47:35 +00:00
LibJS: Make EnvironmentRecord inherit directly from Cell
Previously, EnvironmentRecord was a JS::Object. This was done because GlobalObject inherited from EnvironmentRecord. Now that this is no longer the case, we can simplify things by making EnvironmentRecord inherit from Cell directly. This also removes the need for environment records to have a shape, which was awkward. This will be removed in the following patch.
This commit is contained in:
parent
7a87e920f2
commit
9ccc2f6c4d
8 changed files with 25 additions and 18 deletions
|
@ -11,7 +11,7 @@
|
|||
namespace JS {
|
||||
|
||||
class FunctionEnvironmentRecord final : public DeclarativeEnvironmentRecord {
|
||||
JS_OBJECT(FunctionEnvironmentRecord, DeclarativeEnvironmentRecord);
|
||||
JS_ENVIRONMENT_RECORD(FunctionEnvironmentRecord, DeclarativeEnvironmentRecord);
|
||||
|
||||
public:
|
||||
enum class ThisBindingStatus : u8 {
|
||||
|
@ -61,6 +61,6 @@ private:
|
|||
};
|
||||
|
||||
template<>
|
||||
inline bool Object::fast_is<FunctionEnvironmentRecord>() const { return is_function_environment_record(); }
|
||||
inline bool EnvironmentRecord::fast_is<FunctionEnvironmentRecord>() const { return is_function_environment_record(); }
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue