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

Unified Diff: src/heap/heap.cc

Issue 2788413004: [inspector] cache stack frame for call sites (Closed)
Patch Set: put map separately Created 3 years, 8 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/heap/heap.h ('k') | src/isolate.cc » ('j') | src/isolate.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 cfeda5d55711a71cd650131edd145da162d9e986..a186f4a7c265bacc36730074aa1fc4e7d0c05883 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -2815,6 +2815,9 @@ void Heap::CreateInitialObjects() {
*WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY,
TENURED));
+ set_stack_frame_cache(*WeakHashTable::New(
+ isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, TENURED));
+
set_weak_new_space_object_to_code_list(
ArrayList::cast(*(factory->NewFixedArray(16, TENURED))));
weak_new_space_object_to_code_list()->SetLength(0);
@@ -2937,6 +2940,7 @@ bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) {
case kMicrotaskQueueRootIndex:
case kDetachedContextsRootIndex:
case kWeakObjectToCodeTableRootIndex:
+ case kStackFrameCacheRootIndex:
case kWeakNewSpaceObjectToCodeListRootIndex:
case kRetainedMapsRootIndex:
case kCodeCoverageListRootIndex:
@@ -5855,13 +5859,16 @@ void Heap::AddWeakObjectToCodeDependency(Handle<HeapObject> obj,
DCHECK_EQ(*dep, LookupWeakObjectToCodeDependency(obj));
}
-
DependentCode* Heap::LookupWeakObjectToCodeDependency(Handle<HeapObject> obj) {
Object* dep = weak_object_to_code_table()->Lookup(obj);
if (dep->IsDependentCode()) return DependentCode::cast(dep);
return DependentCode::cast(empty_fixed_array());
}
+void Heap::SetStackFrameCache(WeakHashTable* table) {
+ set_stack_frame_cache(table);
+}
+
namespace {
void CompactWeakFixedArray(Object* object) {
if (object->IsWeakFixedArray()) {
« no previous file with comments | « src/heap/heap.h ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698