ladybird/Libraries/LibJS/Bytecode/Validator.h
Andreas Kling 1ce4242b4b 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.
2026-05-18 20:35:14 +02:00

19 lines
332 B
C++

/*
* Copyright (c) 2026-present, the Ladybird developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Error.h>
#include <AK/Span.h>
#include <LibJS/Forward.h>
namespace JS::Bytecode {
class Executable;
ErrorOr<void> validate_bytecode(Executable const&, ReadonlySpan<u32> basic_block_offsets);
}