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

Unified Diff: src/ic/handler-configuration-inl.h

Issue 2598543003: [runtime][ic] Constant field tracking support. (Closed)
Patch Set: Addressing comments Created 3 years, 10 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/handler-configuration.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) |
« no previous file with comments | « src/ic/handler-configuration.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698