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

Unified Diff: src/ic/accessor-assembler.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.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/accessor-assembler.cc
diff --git a/src/ic/accessor-assembler.cc b/src/ic/accessor-assembler.cc
index 34b3402dba497fbed2b3a806e528e8f585759ff4..c048c7ec818f7774eaf14965ce71b13af487ba64 100644
--- a/src/ic/accessor-assembler.cc
+++ b/src/ic/accessor-assembler.cc
@@ -984,7 +984,15 @@
BIND(&if_out_of_object);
{
if (transition_to_field) {
- ExtendPropertiesBackingStore(holder, handler_word);
+ Label storage_extended(this);
+ GotoIfNot(IsSetWord<StoreHandler::ExtendStorageBits>(handler_word),
+ &storage_extended);
+ Comment("[ Extend storage");
+ ExtendPropertiesBackingStore(holder);
+ Comment("] Extend storage");
+ Goto(&storage_extended);
+
+ BIND(&storage_extended);
}
StoreNamedField(handler_word, holder, false, representation, prepared_value,
@@ -1045,26 +1053,13 @@
return value;
}
-void AccessorAssembler::ExtendPropertiesBackingStore(Node* object,
- Node* handler_word) {
- Label done(this);
- GotoIfNot(IsSetWord<StoreHandler::ExtendStorageBits>(handler_word), &done);
- Comment("[ Extend storage");
-
+void AccessorAssembler::ExtendPropertiesBackingStore(Node* object) {
ParameterMode mode = OptimalParameterMode();
Node* properties = LoadProperties(object);
Node* length = (mode == INTPTR_PARAMETERS)
? LoadAndUntagFixedArrayBaseLength(properties)
: LoadFixedArrayBaseLength(properties);
-
- // Previous property deletion could have left behind unused backing store
- // capacity even for a map that think it doesn't have any unused fields.
- // Perform a bounds check to see if we actually have to grow the array.
- Node* offset = DecodeWord<StoreHandler::FieldOffsetBits>(handler_word);
- Node* size = ElementOffsetFromIndex(length, FAST_ELEMENTS, mode,
- FixedArray::kHeaderSize);
- GotoIf(UintPtrLessThan(offset, size), &done);
Node* delta = IntPtrOrSmiConstant(JSObject::kFieldsAdded, mode);
Node* new_capacity = IntPtrOrSmiAdd(length, delta, mode);
@@ -1093,10 +1088,6 @@
SKIP_WRITE_BARRIER, mode);
StoreObjectField(object, JSObject::kPropertiesOffset, new_properties);
- Comment("] Extend storage");
- Goto(&done);
-
- BIND(&done);
}
void AccessorAssembler::StoreNamedField(Node* handler_word, Node* object,
« no previous file with comments | « src/ic/accessor-assembler.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698