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

Unified Diff: src/objects.cc

Issue 2843473002: Revert of [builtins] DeleteProperty: Handle last-added fast properties (Closed)
Patch Set: 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/ic/accessor-assembler.cc ('k') | test/mjsunit/dictionary-properties.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index b02022a7992e5b00cd411e9ee224a198d7ff581e..ca001ccff843eeb041fa51611b5d1cf3e88c309b 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -3458,15 +3458,11 @@
}
PropertyDetails details = new_map->GetLastDescriptorDetails();
- int target_index = details.field_index() - new_map->GetInObjectProperties();
- bool have_space = old_map->unused_property_fields() > 0 ||
- (details.location() == kField && target_index >= 0 &&
- object->properties()->length() > target_index);
// Either new_map adds an kDescriptor property, or a kField property for
// which there is still space, and which does not require a mutable double
// box (an out-of-object double).
if (details.location() == kDescriptor ||
- (have_space &&
+ (old_map->unused_property_fields() > 0 &&
((FLAG_unbox_double_fields && object->properties()->length() == 0) ||
!details.representation().IsDouble()))) {
object->synchronized_set_map(*new_map);
@@ -3475,7 +3471,7 @@
// If there is still space in the object, we need to allocate a mutable
// double box.
- if (have_space) {
+ if (old_map->unused_property_fields() > 0) {
FieldIndex index =
FieldIndex::ForDescriptor(*new_map, new_map->LastAdded());
DCHECK(details.representation().IsDouble());
@@ -3502,6 +3498,7 @@
}
DCHECK_EQ(kField, details.location());
DCHECK_EQ(kData, details.kind());
+ int target_index = details.field_index() - new_map->GetInObjectProperties();
DCHECK(target_index >= 0); // Must be a backing store index.
new_storage->set(target_index, *value);
« no previous file with comments | « src/ic/accessor-assembler.cc ('k') | test/mjsunit/dictionary-properties.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698