Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: src/heap.cc

Issue 2867013: [Isolates] CompilationCache was moved to Isolate. (Closed) Base URL: git@github.com:v8isolate/v8isolates.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index e49ca4b3574c40d4b7c4e1378702b0a5c97704b9..f73c18397d87ac57d82f4227f89e6ef213dbbcab 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -688,7 +688,7 @@ void Heap::MarkCompactPrologue(bool is_compacting) {
isolate_->context_slot_cache()->Clear();
isolate_->descriptor_lookup_cache()->Clear();
- CompilationCache::MarkCompactPrologue();
+ isolate_->compilation_cache()->MarkCompactPrologue();
Top::MarkCompactPrologue(is_compacting);
ThreadManager::MarkCompactPrologue(is_compacting);
@@ -1658,7 +1658,7 @@ bool Heap::CreateInitialObjects() {
isolate_->descriptor_lookup_cache()->Clear();
// Initialize compilation cache.
- CompilationCache::Clear();
+ isolate_->compilation_cache()->Clear();
return true;
}
@@ -2222,7 +2222,8 @@ static void FlushCodeForFunction(SharedFunctionInfo* function_info) {
if (function_info->is_toplevel()) return;
// If this function is in the compilation cache we do not flush the code.
- if (CompilationCache::HasFunction(function_info)) return;
+ if (Isolate::Current()->compilation_cache()->HasFunction(function_info))
+ return;
// Make sure we are not referencing the code from the stack.
for (StackFrameIterator it; !it.done(); it.Advance()) {
@@ -3224,7 +3225,7 @@ bool Heap::IdleNotification() {
// Before doing the mark-sweep collections we clear the
// compilation cache to avoid hanging on to source code and
// generated code for cached functions.
- CompilationCache::Clear();
+ isolate_->compilation_cache()->Clear();
CollectAllGarbage(false);
new_space_.Shrink();
@@ -3778,7 +3779,7 @@ void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) {
Debug::Iterate(v);
#endif
v->Synchronize("debug");
- CompilationCache::Iterate(v);
+ isolate_->compilation_cache()->Iterate(v);
v->Synchronize("compilationcache");
// Iterate over local handles in handle scopes.
« no previous file with comments | « src/debug.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698