mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-12 22:22:55 +00:00
LibJS/JIT: Resolve the PropertyLookupCache pointers at JIT time
We know where the lookup cache is by the time we're jitting code, so let's put the pointer directly into the instruction stream.
This commit is contained in:
parent
3b6b9b9f25
commit
f03d4a1ffe
Notes:
sideshowbarker
2024-07-16 23:52:10 +09:00
Author: https://github.com/awesomekling
Commit: f03d4a1ffe
Pull-request: https://github.com/SerenityOS/serenity/pull/21817
4 changed files with 12 additions and 12 deletions
|
@ -34,10 +34,8 @@ ThrowCompletionOr<NonnullGCPtr<Object>> base_object_for_get(VM& vm, Value base_v
|
|||
return base_value.to_object(vm);
|
||||
}
|
||||
|
||||
ThrowCompletionOr<Value> get_by_id(VM& vm, DeprecatedFlyString const& property, Value base_value, Value this_value, u32 cache_index)
|
||||
ThrowCompletionOr<Value> get_by_id(VM& vm, DeprecatedFlyString const& property, Value base_value, Value this_value, PropertyLookupCache& cache)
|
||||
{
|
||||
auto& cache = vm.bytecode_interpreter().current_executable().property_lookup_caches[cache_index];
|
||||
|
||||
if (base_value.is_string()) {
|
||||
auto string_value = TRY(base_value.as_string().get(vm, property));
|
||||
if (string_value.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue