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

Unified Diff: src/heap/heap.cc

Issue 1433923002: Maintain a FixedArray for the optimized code map. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Missed a case, also turn on flag for testing. Created 5 years, 1 month 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
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 08d44f5bb962d48949acaa6a87577dac6788afab..bdc92c01cd2f956e4efbd7edd8741858ecc80828 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -2786,6 +2786,17 @@ void Heap::CreateInitialObjects() {
set_dummy_vector(*dummy_vector);
}
+ {
+ Handle<FixedArray> cleared_optimized_code_map =
+ factory->NewFixedArray(SharedFunctionInfo::kEntriesStart, TENURED);
+ DCHECK(SharedFunctionInfo::kEntriesStart == 1 &&
Michael Starzinger 2015/11/13 12:14:22 nit: Could be turned into a STATIC_ASSERT instead.
mvstanton 2015/11/17 20:32:12 Done.
+ SharedFunctionInfo::kSharedCodeIndex == 0);
+ cleared_optimized_code_map->set(SharedFunctionInfo::kSharedCodeIndex,
Michael Starzinger 2015/11/13 12:14:22 The field is already initialized to undefined, bec
mvstanton 2015/11/17 20:32:12 Done.
+ *factory->undefined_value(),
+ SKIP_WRITE_BARRIER);
+ set_cleared_optimized_code_map(*cleared_optimized_code_map);
+ }
+
set_detached_contexts(empty_fixed_array());
set_retained_maps(ArrayList::cast(empty_fixed_array()));

Powered by Google App Engine
This is Rietveld 408576698