#include "src/objects/compilation-cache-table.h"
#include "src/codegen/script-details.h"
#include "src/common/assert-scope.h"
#include "src/objects/compilation-cache-table-inl.h"
namespace v8 {
namespace internal {
namespace {
const int kLiteralEntryLength = …;
const int kLiteralInitialLength = …;
const int kLiteralContextOffset = …;
const int kLiteralLiteralsOffset = …;
int SearchLiteralsMapEntry(Tagged<CompilationCacheTable> cache,
InternalIndex cache_entry,
Tagged<Context> native_context) { … }
void AddToFeedbackCellsMap(DirectHandle<CompilationCacheTable> cache,
InternalIndex cache_entry,
DirectHandle<Context> native_context,
DirectHandle<FeedbackCell> feedback_cell) { … }
Tagged<FeedbackCell> SearchLiteralsMap(Tagged<CompilationCacheTable> cache,
InternalIndex cache_entry,
Tagged<Context> native_context) { … }
class EvalCacheKey : public HashTableKey { … };
class RegExpKey : public HashTableKey { … };
class CodeKey : public HashTableKey { … };
Tagged<Smi> ScriptHash(Tagged<String> source, MaybeHandle<Object> maybe_name,
int line_offset, int column_offset,
v8::ScriptOriginOptions origin_options,
Isolate* isolate) { … }
}
bool ScriptCacheKey::MatchesScript(Tagged<Script> script) { … }
ScriptCacheKey::ScriptCacheKey(Handle<String> source,
const ScriptDetails* script_details,
Isolate* isolate)
: … { … }
ScriptCacheKey::ScriptCacheKey(Handle<String> source, MaybeHandle<Object> name,
int line_offset, int column_offset,
v8::ScriptOriginOptions origin_options,
MaybeHandle<Object> host_defined_options,
MaybeHandle<FixedArray> maybe_wrapped_arguments,
Isolate* isolate)
: … { … }
bool ScriptCacheKey::IsMatch(Tagged<Object> other) { … }
Handle<Object> ScriptCacheKey::AsHandle(
Isolate* isolate, DirectHandle<SharedFunctionInfo> shared) { … }
CompilationCacheScriptLookupResult::RawObjects
CompilationCacheScriptLookupResult::GetRawObjects() const { … }
CompilationCacheScriptLookupResult
CompilationCacheScriptLookupResult::FromRawObjects(
CompilationCacheScriptLookupResult::RawObjects raw, Isolate* isolate) { … }
CompilationCacheScriptLookupResult CompilationCacheTable::LookupScript(
DirectHandle<CompilationCacheTable> table, Handle<String> src,
const ScriptDetails& script_details, Isolate* isolate) { … }
InfoCellPair CompilationCacheTable::LookupEval(
DirectHandle<CompilationCacheTable> table, Handle<String> src,
Handle<SharedFunctionInfo> outer_info, DirectHandle<Context> native_context,
LanguageMode language_mode, int position) { … }
Handle<Object> CompilationCacheTable::LookupRegExp(Handle<String> src,
JSRegExp::Flags flags) { … }
Handle<CompilationCacheTable> CompilationCacheTable::EnsureScriptTableCapacity(
Isolate* isolate, Handle<CompilationCacheTable> cache) { … }
Handle<CompilationCacheTable> CompilationCacheTable::PutScript(
Handle<CompilationCacheTable> cache, Handle<String> src,
MaybeHandle<FixedArray> maybe_wrapped_arguments,
DirectHandle<SharedFunctionInfo> value, Isolate* isolate) { … }
Handle<CompilationCacheTable> CompilationCacheTable::PutEval(
Handle<CompilationCacheTable> cache, Handle<String> src,
Handle<SharedFunctionInfo> outer_info,
DirectHandle<SharedFunctionInfo> value,
DirectHandle<Context> native_context,
DirectHandle<FeedbackCell> feedback_cell, int position) { … }
Handle<CompilationCacheTable> CompilationCacheTable::PutRegExp(
Isolate* isolate, Handle<CompilationCacheTable> cache, Handle<String> src,
JSRegExp::Flags flags, DirectHandle<RegExpData> value) { … }
void CompilationCacheTable::Remove(Tagged<Object> value) { … }
void CompilationCacheTable::RemoveEntry(InternalIndex entry) { … }
}
}