5#ifndef V8_OBJECTS_COMPILATION_CACHE_TABLE_INL_H_
6#define V8_OBJECTS_COMPILATION_CACHE_TABLE_INL_H_
27 return get(EntryToIndex(entry) + 1);
33 set(EntryToIndex(entry) + 1, value, mode);
38 return get(EntryToIndex(entry) + 2);
44 set(EntryToIndex(entry) + 2, value, mode);
66 int line_offset,
int column_offset,
80 DCHECK(IsWeakFixedArray(obj));
109 return string->EnsureHash() + flags.value();
116 uint32_t hash = source->EnsureHash();
117 if (shared->HasSourceCode()) {
127 if (
is_strict(language_mode)) hash ^= 0x8000;
139 if (IsSharedFunctionInfo(
object)) {
144 if (IsWeakFixedArray(
object)) {
151 if (IsRegExpDataWrapper(
object)) {
160 DCHECK_EQ(val->map(), roots.fixed_cow_array_map());
163 int language_unchecked =
Smi::ToInt(val->get(2));
174 : is_compiled_scope_(!shared.is_null() ? shared->is_compiled_scope(isolate)
177 feedback_cell_(feedback_cell) {}
static uint32_t EvalHash(Tagged< String > source, Tagged< SharedFunctionInfo > shared, LanguageMode language_mode, int position)
static uint32_t HashForObject(ReadOnlyRoots roots, Tagged< Object > object)
static const int kEntrySize
static uint32_t RegExpHash(Tagged< String > string, Tagged< Smi > flags)
void SetPrimaryValueAt(InternalIndex entry, Tagged< Object > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
Tagged< Object > EvalFeedbackValueAt(InternalIndex entry)
void SetEvalFeedbackValueAt(InternalIndex entry, Tagged< Object > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
static double NumberValue(Tagged< Number > obj)
MaybeHandle< FixedArray > wrapped_arguments_
static std::optional< Tagged< String > > SourceFromObject(Tagged< Object > obj)
MaybeHandle< Object > host_defined_options_
ScriptCacheKey(Handle< String > source, const ScriptDetails *script_details, Isolate *isolate)
DirectHandle< Object > AsHandle(Isolate *isolate, DirectHandle< SharedFunctionInfo > shared)
bool MatchesScript(Tagged< Script > script)
v8::ScriptOriginOptions origin_options_
bool IsMatch(Tagged< Object > other) override
MaybeHandle< Object > name_
static constexpr int ToInt(const Tagged< Object > object)
static constexpr Tagged< Smi > FromInt(int value)
constexpr bool IsCleared() const
bool GetHeapObjectIfWeak(Tagged< HeapObject > *result) const
Tagged< SharedFunctionInfo > shared_
bool is_valid_language_mode(int language_mode)
bool IsNumber(Tagged< Object > obj)
V8_INLINE Isolate * GetIsolateFromWritableObject(Tagged< HeapObject > object)
bool is_strict(LanguageMode language_mode)
static const size_t LanguageModeSize
kInterpreterTrampolineOffset script
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
#define NEVER_READ_ONLY_SPACE_IMPL(Type)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)