Index: src/ic/handler-configuration-inl.h |
diff --git a/src/ic/handler-configuration-inl.h b/src/ic/handler-configuration-inl.h |
index 8aa887d2b67a1499f79cb9f71229eca63a0e1328..437c5288fbc77e4e8fa2046b586fda5da175b115 100644 |
--- a/src/ic/handler-configuration-inl.h |
+++ b/src/ic/handler-configuration-inl.h |
@@ -103,7 +103,8 @@ Handle<Object> StoreHandler::StoreField(Isolate* isolate, Kind kind, |
} |
int value_index = DescriptorArray::ToValueIndex(descriptor); |
- DCHECK(kind == kStoreField || kind == kTransitionToField); |
+ DCHECK(kind == kStoreField || kind == kTransitionToField || |
+ (kind == kStoreConstField && FLAG_track_constant_fields)); |
DCHECK_IMPLIES(extend_storage, kind == kTransitionToField); |
DCHECK_IMPLIES(field_index.is_inobject(), !extend_storage); |
@@ -118,9 +119,12 @@ Handle<Object> StoreHandler::StoreField(Isolate* isolate, Kind kind, |
Handle<Object> StoreHandler::StoreField(Isolate* isolate, int descriptor, |
FieldIndex field_index, |
+ PropertyConstness constness, |
Representation representation) { |
- return StoreField(isolate, kStoreField, descriptor, field_index, |
- representation, false); |
+ DCHECK_IMPLIES(!FLAG_track_constant_fields, constness == kMutable); |
+ Kind kind = constness == kMutable ? kStoreField : kStoreConstField; |
+ return StoreField(isolate, kind, descriptor, field_index, representation, |
+ false); |
} |
Handle<Object> StoreHandler::TransitionToField(Isolate* isolate, int descriptor, |
@@ -133,6 +137,7 @@ Handle<Object> StoreHandler::TransitionToField(Isolate* isolate, int descriptor, |
Handle<Object> StoreHandler::TransitionToConstant(Isolate* isolate, |
int descriptor) { |
+ DCHECK(!FLAG_track_constant_fields); |
int value_index = DescriptorArray::ToValueIndex(descriptor); |
int config = |
StoreHandler::KindBits::encode(StoreHandler::kTransitionToConstant) | |