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

Unified Diff: src/ic.cc

Issue 10695120: Ensure that all descriptors have a valid enumeration index, and replace NextEnumIndex with LastAdde… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment. Created 8 years, 5 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/ia32/macro-assembler-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »
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 bee29f0b844c271c143656f83b0c6308d8a03cc4..d75b3e9799abae97e9fad7e6fc99c66bf99b209d 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1518,8 +1518,7 @@ void StoreIC::UpdateCaches(LookupResult* lookup,
Handle<Map> transition(Map::cast(value));
DescriptorArray* target_descriptors = transition->instance_descriptors();
- int descriptor = target_descriptors->SearchWithCache(*name);
- ASSERT(descriptor != DescriptorArray::kNotFound);
+ int descriptor = target_descriptors->LastAdded();
PropertyDetails details = target_descriptors->GetDetails(descriptor);
if (details.type() != FIELD || details.attributes() != NONE) return;
@@ -1990,8 +1989,7 @@ void KeyedStoreIC::UpdateCaches(LookupResult* lookup,
Handle<Map> transition(Map::cast(value));
DescriptorArray* target_descriptors = transition->instance_descriptors();
- int descriptor = target_descriptors->SearchWithCache(*name);
- ASSERT(descriptor != DescriptorArray::kNotFound);
+ int descriptor = target_descriptors->LastAdded();
PropertyDetails details = target_descriptors->GetDetails(descriptor);
if (details.type() == FIELD && details.attributes() == NONE) {
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698