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

Unified Diff: src/hydrogen.cc

Issue 150453003: Fix polymorphic load handling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 98191ce650daab15f282f0ab7a496e084c606d34..0b189d5e3fe890fafc4129c7ae1b4137e1eea7ad 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5697,10 +5697,15 @@ void HOptimizedGraphBuilder::HandlePolymorphicLoadNamedField(
int count = 0;
HBasicBlock* join = NULL;
HBasicBlock* number_block = NULL;
+ bool handled_string = false;
bool handle_smi = false;
for (int i = 0; i < types->length() && count < kMaxLoadPolymorphism; ++i) {
PropertyAccessInfo info(this, IC::MapToType(types->at(i)), name);
+ if (info.type()->Is(HeapType::String())) {
+ if (handled_string) continue;
+ handled_string = true;
+ }
if (info.CanLoadMonomorphic()) {
count++;
if (info.type()->Is(HeapType::Number())) {
@@ -5711,8 +5716,8 @@ void HOptimizedGraphBuilder::HandlePolymorphicLoadNamedField(
}
count = 0;
- bool handled_string = false;
HControlInstruction* smi_check = NULL;
+ handled_string = false;
for (int i = 0; i < types->length() && count < kMaxLoadPolymorphism; ++i) {
PropertyAccessInfo info(this, IC::MapToType(types->at(i)), name);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698