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

Unified Diff: src/ic.cc

Issue 8491016: Refactoring only: Make the handling of PropertyType more explicit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | « no previous file | src/objects.h » ('j') | src/v8globals.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index fbe77b09d23fa7daccabb0a842ae49221adf9b77..7b0a815aa646fd983b4a5341bd595911ac5a44f7 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1354,7 +1354,6 @@ void StoreIC::UpdateCaches(LookupResult* lookup,
break;
case MAP_TRANSITION: {
if (lookup->GetAttributes() != NONE) return;
- ASSERT(type == MAP_TRANSITION);
Handle<Map> transition(lookup->GetTransitionMap());
int index = transition->PropertyIndexFor(*name);
code = isolate()->stub_cache()->ComputeStoreField(
@@ -1390,7 +1389,13 @@ void StoreIC::UpdateCaches(LookupResult* lookup,
code = isolate()->stub_cache()->ComputeStoreInterceptor(
name, receiver, strict_mode);
break;
- default:
+ case CONSTANT_FUNCTION:
+ case CONSTANT_TRANSITION:
+ case ELEMENTS_TRANSITION:
+ return;
+ case HANDLER:
Kevin Millikin (Chromium) 2011/11/07 14:13:39 Is HANDLER unreachable because the caller takes ca
Sven Panne 2011/11/08 07:36:10 Done.
+ case NULL_DESCRIPTOR:
+ UNREACHABLE();
return;
}
@@ -1719,6 +1724,13 @@ void KeyedStoreIC::UpdateCaches(LookupResult* lookup,
Handle<Code> code;
switch (type) {
+ case CONSTANT_FUNCTION:
Kevin Millikin (Chromium) 2011/11/07 14:13:39 I guess we should not get NULL_DESCRIPTOR here, an
Sven Panne 2011/11/08 07:36:10 Done.
+ case HANDLER:
+ case INTERCEPTOR:
+ case ELEMENTS_TRANSITION:
+ case NULL_DESCRIPTOR:
+ UNREACHABLE();
+ return;
case FIELD:
code = isolate()->stub_cache()->ComputeKeyedStoreField(
name, receiver, lookup->GetFieldIndex(),
@@ -1726,7 +1738,6 @@ void KeyedStoreIC::UpdateCaches(LookupResult* lookup,
break;
case MAP_TRANSITION:
if (lookup->GetAttributes() == NONE) {
- ASSERT(type == MAP_TRANSITION);
Handle<Map> transition(lookup->GetTransitionMap());
int index = transition->PropertyIndexFor(*name);
code = isolate()->stub_cache()->ComputeKeyedStoreField(
@@ -1734,7 +1745,9 @@ void KeyedStoreIC::UpdateCaches(LookupResult* lookup,
break;
}
// fall through.
- default:
+ case NORMAL:
+ case CALLBACKS:
+ case CONSTANT_TRANSITION:
// Always rewrite to the generic case so that we do not
// repeatedly try to rewrite.
code = (strict_mode == kStrictMode)
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/v8globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698