aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/compilation-cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compilation-cache.cc')
-rw-r--r--deps/v8/src/compilation-cache.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/deps/v8/src/compilation-cache.cc b/deps/v8/src/compilation-cache.cc
index 0068c83362..e210dd4025 100644
--- a/deps/v8/src/compilation-cache.cc
+++ b/deps/v8/src/compilation-cache.cc
@@ -7,8 +7,10 @@
#include "src/counters.h"
#include "src/globals.h"
#include "src/heap/factory.h"
+#include "src/log.h"
#include "src/objects-inl.h"
#include "src/objects/compilation-cache-inl.h"
+#include "src/objects/slots.h"
#include "src/visitors.h"
namespace v8 {
@@ -41,7 +43,7 @@ Handle<CompilationCacheTable> CompilationSubCache::GetTable(int generation) {
result = CompilationCacheTable::New(isolate(), kInitialCacheSize);
tables_[generation] = *result;
} else {
- CompilationCacheTable* table =
+ CompilationCacheTable table =
CompilationCacheTable::cast(tables_[generation]);
result = Handle<CompilationCacheTable>(table, isolate());
}
@@ -67,12 +69,14 @@ void CompilationSubCache::Age() {
}
void CompilationSubCache::Iterate(RootVisitor* v) {
- v->VisitRootPointers(Root::kCompilationCache, nullptr, &tables_[0],
- &tables_[generations_]);
+ v->VisitRootPointers(Root::kCompilationCache, nullptr,
+ FullObjectSlot(&tables_[0]),
+ FullObjectSlot(&tables_[generations_]));
}
void CompilationSubCache::Clear() {
- MemsetPointer(tables_, ReadOnlyRoots(isolate()).undefined_value(),
+ MemsetPointer(reinterpret_cast<Address*>(tables_),
+ ReadOnlyRoots(isolate()).undefined_value()->ptr(),
generations_);
}
@@ -135,8 +139,8 @@ MaybeHandle<SharedFunctionInfo> CompilationCacheScript::Lookup(
const int generation = 0;
DCHECK_EQ(generations(), 1);
Handle<CompilationCacheTable> table = GetTable(generation);
- MaybeHandle<SharedFunctionInfo> probe =
- table->LookupScript(source, native_context, language_mode);
+ MaybeHandle<SharedFunctionInfo> probe = CompilationCacheTable::LookupScript(
+ table, source, native_context, language_mode);
Handle<SharedFunctionInfo> function_info;
if (probe.ToHandle(&function_info)) {
// Break when we've found a suitable shared function info that
@@ -190,8 +194,8 @@ InfoCellPair CompilationCacheEval::Lookup(Handle<String> source,
const int generation = 0;
DCHECK_EQ(generations(), 1);
Handle<CompilationCacheTable> table = GetTable(generation);
- result = table->LookupEval(source, outer_info, native_context, language_mode,
- position);
+ result = CompilationCacheTable::LookupEval(
+ table, source, outer_info, native_context, language_mode, position);
if (result.has_shared()) {
isolate()->counters()->compilation_cache_hits()->Increment();
} else {