Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index cfeecadf7b581b87006fcab43eb6963099e2e5d3..e712cc7c84b9ee692b7642a3c467cb2c67e75536 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -661,8 +661,7 @@ MaybeObject* JSObject::SetNormalizedProperty(Name* name, |
Object* store_value = value; |
if (IsGlobalObject()) { |
Heap* heap = name->GetHeap(); |
- MaybeObject* maybe_store_value = |
- heap->AllocatePropertyCell(value); |
+ MaybeObject* maybe_store_value = heap->AllocatePropertyCell(value); |
if (!maybe_store_value->ToObject(&store_value)) return maybe_store_value; |
} |
Object* dict; |
@@ -11076,7 +11075,7 @@ void Map::AddDependentCompilationInfo(DependentCode::DependencyGroup group, |
Handle<DependentCode> codes = |
DependentCode::Insert(dep, group, info->object_wrapper()); |
if (*codes != dependent_code()) set_dependent_code(*codes); |
- info->dependent_maps(group)->Add(Handle<Map>(this), info->zone()); |
+ info->dependencies(group)->Add(Handle<HeapObject>(this), info->zone()); |
} |
@@ -11102,6 +11101,16 @@ void DependentCode::GroupStartIndexes::Recompute(DependentCode* entries) { |
} |
+DependentCode* DependentCode::ForObject(Handle<HeapObject> object, |
+ DependencyGroup group) { |
+ AllowDeferredHandleDereference dependencies_are_safe; |
+ if (group == DependentCode::kPropertyCellChangedGroup) { |
+ return Handle<PropertyCell>::cast(object)->dependent_code(); |
+ } |
+ return Handle<Map>::cast(object)->dependent_code(); |
+} |
+ |
+ |
Handle<DependentCode> DependentCode::Insert(Handle<DependentCode> entries, |
DependencyGroup group, |
Handle<Object> object) { |
@@ -11240,7 +11249,7 @@ void DependentCode::DeoptimizeDependentCodeGroup( |
code->set_marked_for_deoptimization(true); |
} else { |
CompilationInfo* info = compilation_info_at(i); |
- info->AbortDueToDependentMap(); |
+ info->AbortDueToDependencyChange(); |
} |
} |
// Compact the array by moving all subsequent groups to fill in the new holes. |
@@ -15773,4 +15782,23 @@ void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { |
} |
+void PropertyCell::AddDependentCompilationInfo(CompilationInfo* info) { |
+ Handle<DependentCode> dep(dependent_code()); |
+ Handle<DependentCode> codes = |
+ DependentCode::Insert(dep, DependentCode::kPropertyCellChangedGroup, |
+ info->object_wrapper()); |
+ if (*codes != dependent_code()) set_dependent_code(*codes); |
+ info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
+ Handle<HeapObject>(this), info->zone()); |
+} |
+ |
+ |
+void PropertyCell::AddDependentCode(Handle<Code> code) { |
+ Handle<DependentCode> codes = DependentCode::Insert( |
+ Handle<DependentCode>(dependent_code()), |
+ DependentCode::kPropertyCellChangedGroup, code); |
+ if (*codes != dependent_code()) set_dependent_code(*codes); |
+} |
+ |
+ |
} } // namespace v8::internal |