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

Unified Diff: src/heap/heap.cc

Issue 1478943003: Use WeakCells in the optimized code map rather than traversing in pause. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Facepalm. Created 5 years 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/heap/heap.h ('k') | src/heap/mark-compact.h » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 46f62f001d4f2da005586b16de92b8191520458a..caad72e0cf48a467c1fbc55816d42f6529ee129e 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -2768,8 +2768,14 @@ void Heap::CreateInitialObjects() {
}
{
+ Handle<WeakCell> cell = factory->NewWeakCell(factory->undefined_value());
+ set_empty_weak_cell(*cell);
+ cell->clear();
+
Handle<FixedArray> cleared_optimized_code_map =
factory->NewFixedArray(SharedFunctionInfo::kEntriesStart, TENURED);
+ cleared_optimized_code_map->set(SharedFunctionInfo::kSharedCodeIndex,
+ *cell);
STATIC_ASSERT(SharedFunctionInfo::kEntriesStart == 1 &&
SharedFunctionInfo::kSharedCodeIndex == 0);
set_cleared_optimized_code_map(*cleared_optimized_code_map);
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698