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

Unified Diff: src/ic/handler-compiler.cc

Issue 540903002: Flatten property_kind into state. Add UNKNOWN as a state for dict-mode receivers (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add DCHECKs Created 6 years, 3 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/arm64/handler-compiler-arm64.cc ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/handler-compiler.cc
diff --git a/src/ic/handler-compiler.cc b/src/ic/handler-compiler.cc
index 5c747c10ff2055d4391d620e802e2d8307816e6f..21a653e7b61e126bb9a477a65a729aa5d29a5422 100644
--- a/src/ic/handler-compiler.cc
+++ b/src/ic/handler-compiler.cc
@@ -225,22 +225,28 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadInterceptor(
// So far the most popular follow ups for interceptor loads are FIELD and
// ExecutableAccessorInfo, so inline only them. Other cases may be added
// later.
- bool inline_followup = it->state() == LookupIterator::PROPERTY;
- if (inline_followup) {
- switch (it->property_kind()) {
- case LookupIterator::DATA:
- inline_followup = it->property_details().type() == FIELD;
- break;
- case LookupIterator::ACCESSOR: {
- Handle<Object> accessors = it->GetAccessors();
- inline_followup = accessors->IsExecutableAccessorInfo();
- if (!inline_followup) break;
- Handle<ExecutableAccessorInfo> info =
- Handle<ExecutableAccessorInfo>::cast(accessors);
- inline_followup = info->getter() != NULL &&
- ExecutableAccessorInfo::IsCompatibleReceiverType(
- isolate(), info, type());
- }
+ bool inline_followup = false;
+ switch (it->state()) {
+ case LookupIterator::TRANSITION:
+ case LookupIterator::UNKNOWN:
+ UNREACHABLE();
+ case LookupIterator::ACCESS_CHECK:
+ case LookupIterator::INTERCEPTOR:
+ case LookupIterator::JSPROXY:
+ case LookupIterator::NOT_FOUND:
+ break;
+ case LookupIterator::DATA:
+ inline_followup = it->property_details().type() == FIELD;
+ break;
+ case LookupIterator::ACCESSOR: {
+ Handle<Object> accessors = it->GetAccessors();
+ inline_followup = accessors->IsExecutableAccessorInfo();
+ if (!inline_followup) break;
+ Handle<ExecutableAccessorInfo> info =
+ Handle<ExecutableAccessorInfo>::cast(accessors);
+ inline_followup = info->getter() != NULL &&
+ ExecutableAccessorInfo::IsCompatibleReceiverType(
+ isolate(), info, type());
}
}
@@ -264,7 +270,14 @@ void NamedLoadHandlerCompiler::GenerateLoadPostInterceptor(
set_holder(real_named_property_holder);
Register reg = Frontend(interceptor_reg, it->name());
- switch (it->property_kind()) {
+ switch (it->state()) {
+ case LookupIterator::ACCESS_CHECK:
+ case LookupIterator::INTERCEPTOR:
+ case LookupIterator::JSPROXY:
+ case LookupIterator::NOT_FOUND:
+ case LookupIterator::TRANSITION:
+ case LookupIterator::UNKNOWN:
+ UNREACHABLE();
case LookupIterator::DATA: {
DCHECK_EQ(FIELD, it->property_details().type());
__ Move(receiver(), reg);
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698