mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-06-27 19:51:03 +00:00
LibJS: Store bytecode cache indexes instead of pointers
Store compact cache indexes in bytecode instructions instead of raw pointers to the executable cache vectors. This keeps the instruction stream independent from heap addresses and removes pointer fixups when materializing cached bytecode. Resolve the mutable cache pointers at execution time from the current Executable. Bytecode test expectations are updated for the smaller cache operands and resulting instruction offsets.
This commit is contained in:
parent
40515a8745
commit
1ce4242b4b
Notes:
github-actions[bot]
2026-05-18 18:37:20 +00:00
Author: https://github.com/awesomekling
Commit: 1ce4242b4b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/9472
154 changed files with 1808 additions and 1904 deletions
|
|
@ -101,19 +101,6 @@ Executable::Executable(
|
|||
|
||||
Executable::~Executable() = default;
|
||||
|
||||
void Executable::fixup_cache_pointers()
|
||||
{
|
||||
for (auto it = InstructionStreamIterator(bytecode); !it.at_end(); ++it) {
|
||||
fixup_instruction_cache(
|
||||
const_cast<Instruction&>(*it),
|
||||
property_lookup_caches.span(),
|
||||
global_variable_caches.span(),
|
||||
template_object_caches.span(),
|
||||
object_shape_caches.span(),
|
||||
object_property_iterator_caches.span());
|
||||
}
|
||||
}
|
||||
|
||||
static SourceMapEntry const* first_real_source_map_entry(Executable const& executable)
|
||||
{
|
||||
SourceMapEntry const* first_entry = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue