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

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

Issue 2488673004: [ic] Support data handlers that represent transitioning stores. (Closed)
Patch Set: Rebasing again Created 4 years, 1 month 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.h » ('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 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
« no previous file with comments | « src/ic/handler-configuration.h ('k') | src/ic/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698