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

Unified Diff: src/ic/ic.cc

Issue 2624903003: [runtime] Use PropertyKind/PropertyLocation instead of PropertyType. (Closed)
Patch Set: Addressing comments Created 3 years, 11 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-compiler.cc ('k') | src/json-stringifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 6cd1641ade3f3d15f7898ed611f154ddae0e94db..0baba966a4b27681eb94336b4f6e9fb172e12e7e 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -1396,6 +1396,7 @@ Handle<Object> LoadIC::GetMapIndependentHandler(LookupIterator* lookup) {
}
case LookupIterator::DATA: {
+ DCHECK_EQ(kData, lookup->property_details().kind());
if (lookup->is_dictionary_holder()) {
if (kind() != Code::LOAD_IC && kind() != Code::LOAD_GLOBAL_IC) {
TRACE_HANDLER_STATS(isolate(), LoadIC_SlowStub);
@@ -1417,7 +1418,7 @@ Handle<Object> LoadIC::GetMapIndependentHandler(LookupIterator* lookup) {
}
// -------------- Fields --------------
- if (lookup->property_details().type() == DATA) {
+ if (lookup->property_details().location() == kField) {
FieldIndex field = lookup->GetFieldIndex();
Handle<Object> smi_handler = SimpleFieldLoad(isolate(), field);
if (receiver_is_holder) {
@@ -1428,7 +1429,7 @@ Handle<Object> LoadIC::GetMapIndependentHandler(LookupIterator* lookup) {
}
// -------------- Constant properties --------------
- DCHECK(lookup->property_details().type() == DATA_CONSTANT);
+ DCHECK_EQ(kDescriptor, lookup->property_details().location());
Handle<Object> smi_handler =
LoadHandler::LoadConstant(isolate(), lookup->GetConstantIndex());
if (receiver_is_holder) {
@@ -1878,11 +1879,12 @@ Handle<Object> StoreIC::StoreTransition(Handle<Map> receiver_map,
DCHECK(!transition->is_access_check_needed());
Handle<Object> smi_handler;
- if (details.type() == DATA_CONSTANT) {
+ DCHECK_EQ(kData, details.kind());
+ if (details.location() == kDescriptor) {
smi_handler = StoreHandler::TransitionToConstant(isolate(), descriptor);
} else {
- DCHECK_EQ(DATA, details.type());
+ DCHECK_EQ(kField, details.location());
bool extend_storage =
Map::cast(transition->GetBackPointer())->unused_property_fields() == 0;
@@ -2029,6 +2031,7 @@ Handle<Object> StoreIC::GetMapIndependentHandler(LookupIterator* lookup) {
}
case LookupIterator::DATA: {
+ DCHECK_EQ(kData, lookup->property_details().kind());
if (lookup->is_dictionary_holder()) {
if (holder->IsJSGlobalObject()) {
break; // Custom-compiled handler.
@@ -2039,7 +2042,7 @@ Handle<Object> StoreIC::GetMapIndependentHandler(LookupIterator* lookup) {
}
// -------------- Fields --------------
- if (lookup->property_details().type() == DATA) {
+ if (lookup->property_details().location() == kField) {
TRACE_HANDLER_STATS(isolate(), StoreIC_StoreFieldDH);
int descriptor = lookup->GetFieldDescriptorIndex();
FieldIndex index = lookup->GetFieldIndex();
@@ -2048,7 +2051,7 @@ Handle<Object> StoreIC::GetMapIndependentHandler(LookupIterator* lookup) {
}
// -------------- Constant properties --------------
- DCHECK(lookup->property_details().type() == DATA_CONSTANT);
+ DCHECK_EQ(kDescriptor, lookup->property_details().location());
TRACE_GENERIC_IC(isolate(), "StoreIC", "constant property");
TRACE_HANDLER_STATS(isolate(), StoreIC_SlowStub);
return slow_stub();
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/json-stringifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698