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) |