bool handle_smi = false;
STATIC_ASSERT(kMaxLoadPolymorphism == kMaxStorePolymorphism);
- for (int i = 0; i < types->length() && count < kMaxLoadPolymorphism; ++i) {
+ int i;
+ for (i = 0; i < types->length() && count < kMaxLoadPolymorphism; ++i) {
PropertyAccessInfo info(this, access_type, ToType(types->at(i)), name);
if (info.type()->Is(Type::String())) {
if (handled_string) continue;
}
}
- count = 0;
+ if (i < types->length()) {
+ count = -1;
+ types->Clear();
+ } else {
+ count = 0;
+ }
HControlInstruction* smi_check = NULL;
handled_string = false;
bool handled_string = false;
int ordered_functions = 0;
- for (int i = 0;
- i < types->length() && ordered_functions < kMaxCallPolymorphism;
+ int i;
+ for (i = 0; i < types->length() && ordered_functions < kMaxCallPolymorphism;
++i) {
PropertyAccessInfo info(this, LOAD, ToType(types->at(i)), name);
if (info.CanAccessMonomorphic() && info.IsConstant() &&
std::sort(order, order + ordered_functions);
+ if (i < types->length()) {
+ types->Clear();
+ ordered_functions = -1;
+ }
+
HBasicBlock* number_block = NULL;
HBasicBlock* join = NULL;
handled_string = false;