Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index a2dd84066a8fc2b5766376b2672ce2cbf5e5e279..28163662b5dc32885b28ce51158ea8058a6d8a04 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -4902,11 +4902,6 @@ |
DCHECK(object->HasFastSmiOrObjectElements() || |
object->HasFastDoubleElements() || |
object->HasFastArgumentsElements()); |
- |
- // Ensure that notifications fire if the array or object prototypes are |
- // normalizing. |
- isolate->UpdateArrayProtectorOnNormalizeElements(object); |
- |
// Compute the effective length and allocate a new backing store. |
int length = object->IsJSArray() |
? Smi::cast(Handle<JSArray>::cast(object)->length())->value() |
@@ -5761,7 +5756,6 @@ |
Handle<SeededNumberDictionary> new_element_dictionary; |
if (!object->elements()->IsDictionary()) { |
new_element_dictionary = GetNormalizedElementDictionary(object); |
- isolate->UpdateArrayProtectorOnNormalizeElements(object); |
} |
Handle<Symbol> transition_marker; |
@@ -12421,6 +12415,8 @@ |
return "transition"; |
case kPrototypeCheckGroup: |
return "prototype-check"; |
+ case kElementsCantBeAddedGroup: |
+ return "elements-cant-be-added"; |
case kPropertyCellChangedGroup: |
return "property-cell-changed"; |
case kFieldTypeGroup: |
@@ -12518,8 +12514,6 @@ |
// Nothing to do if prototype is already set. |
if (map->prototype() == *value) return value; |
- |
- isolate->UpdateArrayProtectorOnSetPrototype(real_receiver); |
PrototypeOptimizationMode mode = |
from_javascript ? REGULAR_PROTOTYPE : FAST_PROTOTYPE; |
@@ -12741,7 +12735,11 @@ |
// Array optimizations rely on the prototype lookups of Array objects always |
// returning undefined. If there is a store to the initial prototype object, |
// make sure all of these optimizations are invalidated. |
- isolate->UpdateArrayProtectorOnSetElement(object); |
+ if (isolate->is_initial_object_prototype(*object) || |
+ isolate->is_initial_array_prototype(*object)) { |
+ object->map()->dependent_code()->DeoptimizeDependentCodeGroup(isolate, |
+ DependentCode::kElementsCantBeAddedGroup); |
+ } |
Handle<FixedArray> backing_store(FixedArray::cast(object->elements())); |
if (backing_store->map() == |
@@ -17099,15 +17097,4 @@ |
return value; |
} |
- |
-// static |
-void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, |
- Handle<Object> new_value) { |
- if (cell->value() != *new_value) { |
- cell->set_value(*new_value); |
- Isolate* isolate = cell->GetIsolate(); |
- cell->dependent_code()->DeoptimizeDependentCodeGroup( |
- isolate, DependentCode::kPropertyCellChangedGroup); |
- } |
-} |
} } // namespace v8::internal |