1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:58:12 +00:00

LibJS/JIT: Resolve the GetById property name at JIT time

We can resolve the IdentifierTableIndex to a DeprecatedFlyString& once
when jitting the code, instead of every time GetById executes.
This commit is contained in:
Andreas Kling 2023-11-05 14:16:41 +01:00
parent 673e3ec57d
commit c92954db36
4 changed files with 10 additions and 11 deletions

View file

@ -13,7 +13,7 @@
namespace JS::Bytecode {
ThrowCompletionOr<NonnullGCPtr<Object>> base_object_for_get(Bytecode::Interpreter&, Value base_value);
ThrowCompletionOr<Value> get_by_id(Bytecode::Interpreter&, IdentifierTableIndex, Value base_value, Value this_value, u32 cache_index);
ThrowCompletionOr<Value> get_by_id(Bytecode::Interpreter&, DeprecatedFlyString const& property, Value base_value, Value this_value, u32 cache_index);
ThrowCompletionOr<Value> get_by_value(Bytecode::Interpreter&, Value base_value, Value property_key_value);
ThrowCompletionOr<Value> get_global(Bytecode::Interpreter&, IdentifierTableIndex, u32 cache_index);
ThrowCompletionOr<void> put_by_property_key(VM&, Value base, Value this_value, Value value, PropertyKey name, Op::PropertyKind kind);