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

Unified Diff: src/type-info.cc

Issue 602773003: Eliminate special keyed load string stub in favor of uniform handlers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and ports. 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/objects.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index cf3950f4f01b2af65111bb10c5e02b93a33bc796..a6bc0730805e741b24c2d0c0887b6a9fa7cc4272 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -266,12 +266,14 @@ void TypeFeedbackOracle::PropertyReceiverTypes(TypeFeedbackId id,
void TypeFeedbackOracle::KeyedPropertyReceiverTypes(
TypeFeedbackId id, SmallMapList* receiver_types, bool* is_string) {
receiver_types->Clear();
- *is_string = false;
- if (LoadIsBuiltin(id, Builtins::kKeyedLoadIC_String)) {
- *is_string = true;
- } else {
- CollectReceiverTypes(id, receiver_types);
+ CollectReceiverTypes(id, receiver_types);
+
+ // Are all the receiver maps string maps?
+ bool all_strings = receiver_types->length() > 0;
+ for (int i = 0; i < receiver_types->length(); i++) {
+ all_strings &= receiver_types->at(i)->IsStringMap();
}
+ *is_string = all_strings;
}
« no previous file with comments | « src/objects.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698