1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 10:47:35 +00:00

LibJS: Bring the super keyword in line with the spec

This patch implements spec-compliant runtime semantics for the following
constructs:

- super.property
- super[property]

The MakeSuperPropertyReference AO is added to support this. :^)
This commit is contained in:
Andreas Kling 2021-07-03 00:20:52 +02:00
parent 52f9aaa823
commit 1270df257b
3 changed files with 58 additions and 0 deletions

View file

@ -18,6 +18,7 @@ DeclarativeEnvironment* new_declarative_environment(Environment&);
ObjectEnvironment* new_object_environment(Object&, bool is_with_environment, Environment*);
Environment& get_this_environment(VM&);
Object* get_super_constructor(VM&);
Reference make_super_property_reference(GlobalObject&, Value actual_this, StringOrSymbol const& property_key, bool strict);
Value require_object_coercible(GlobalObject&, Value);
size_t length_of_array_like(GlobalObject&, Object const&);
MarkedValueList create_list_from_array_like(GlobalObject&, Value, Function<Result<void, ErrorType>(Value)> = {});