mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibJS: Make class definition evaluation more spec like in ordering
This commit is contained in:
parent
d3ef08217b
commit
1245512c50
6 changed files with 258 additions and 131 deletions
|
@ -59,14 +59,14 @@ public:
|
|||
void set_home_object(Object* home_object) { m_home_object = home_object; }
|
||||
|
||||
struct InstanceField {
|
||||
StringOrSymbol name;
|
||||
PropertyName name;
|
||||
ECMAScriptFunctionObject* initializer { nullptr };
|
||||
|
||||
void define_field(VM& vm, Object& receiver) const;
|
||||
};
|
||||
|
||||
Vector<InstanceField> const& fields() const { return m_fields; }
|
||||
void add_field(StringOrSymbol property_key, ECMAScriptFunctionObject* initializer) { m_fields.empend(property_key, initializer); }
|
||||
void add_field(PropertyName property_key, ECMAScriptFunctionObject* initializer) { m_fields.empend(property_key, initializer); }
|
||||
|
||||
// This is for IsSimpleParameterList (static semantics)
|
||||
bool has_simple_parameter_list() const { return m_has_simple_parameter_list; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue