Index: src/ic/handler-configuration-inl.h |
diff --git a/src/ic/handler-configuration-inl.h b/src/ic/handler-configuration-inl.h |
index ca67257abe02ba5afb55309caccfd88ec71b70a1..505d67cf42bac03dc17dbfe7ac6c2f20c2c82535 100644 |
--- a/src/ic/handler-configuration-inl.h |
+++ b/src/ic/handler-configuration-inl.h |
@@ -79,9 +79,10 @@ Handle<Object> LoadHandler::LoadElement(Isolate* isolate, |
return handle(Smi::FromInt(config), isolate); |
} |
-Handle<Object> StoreHandler::StoreField(Isolate* isolate, int descriptor, |
- FieldIndex field_index, |
- Representation representation) { |
+Handle<Object> StoreHandler::StoreField(Isolate* isolate, Kind kind, |
+ int descriptor, FieldIndex field_index, |
+ Representation representation, |
+ bool extend_storage) { |
StoreHandler::FieldRepresentation field_rep; |
switch (representation.kind()) { |
case Representation::kSmi: |
@@ -102,7 +103,11 @@ Handle<Object> StoreHandler::StoreField(Isolate* isolate, int descriptor, |
} |
int value_index = DescriptorArray::ToValueIndex(descriptor); |
- int config = StoreHandler::KindBits::encode(StoreHandler::kForFields) | |
+ DCHECK(kind == kStoreField || kind == kTransitionToField); |
+ DCHECK_IMPLIES(kind == kStoreField, !extend_storage); |
+ |
+ int config = StoreHandler::KindBits::encode(kind) | |
+ StoreHandler::ExtendStorageBits::encode(extend_storage) | |
StoreHandler::IsInobjectBits::encode(field_index.is_inobject()) | |
StoreHandler::FieldRepresentationBits::encode(field_rep) | |
StoreHandler::DescriptorValueIndexBits::encode(value_index) | |
@@ -110,6 +115,30 @@ Handle<Object> StoreHandler::StoreField(Isolate* isolate, int descriptor, |
return handle(Smi::FromInt(config), isolate); |
} |
+Handle<Object> StoreHandler::StoreField(Isolate* isolate, int descriptor, |
+ FieldIndex field_index, |
+ Representation representation) { |
+ return StoreField(isolate, kStoreField, descriptor, field_index, |
+ representation, false); |
+} |
+ |
+Handle<Object> StoreHandler::TransitionToField(Isolate* isolate, int descriptor, |
+ FieldIndex field_index, |
+ Representation representation, |
+ bool extend_storage) { |
+ return StoreField(isolate, kTransitionToField, descriptor, field_index, |
+ representation, extend_storage); |
+} |
+ |
+Handle<Object> StoreHandler::TransitionToConstant(Isolate* isolate, |
+ int descriptor) { |
+ int value_index = DescriptorArray::ToValueIndex(descriptor); |
+ int config = |
+ StoreHandler::KindBits::encode(StoreHandler::kTransitionToConstant) | |
+ StoreHandler::DescriptorValueIndexBits::encode(value_index); |
+ return handle(Smi::FromInt(config), isolate); |
+} |
+ |
} // namespace internal |
} // namespace v8 |