| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 void HValue::PrintRangeTo(StringStream* stream) { | 409 void HValue::PrintRangeTo(StringStream* stream) { |
| 410 if (range() == NULL || range()->IsMostGeneric()) return; | 410 if (range() == NULL || range()->IsMostGeneric()) return; |
| 411 stream->Add(" range[%d,%d,m0=%d]", | 411 stream->Add(" range[%d,%d,m0=%d]", |
| 412 range()->lower(), | 412 range()->lower(), |
| 413 range()->upper(), | 413 range()->upper(), |
| 414 static_cast<int>(range()->CanBeMinusZero())); | 414 static_cast<int>(range()->CanBeMinusZero())); |
| 415 } | 415 } |
| 416 | 416 |
| 417 | 417 |
| 418 void HValue::PrintChangesTo(StringStream* stream) { | 418 void HValue::PrintChangesTo(StringStream* stream) { |
| 419 int changes_flags = ChangesFlags(); | 419 GVNFlagSet changes_flags = ChangesFlags(); |
| 420 if (changes_flags == 0) return; | 420 if (changes_flags.IsEmpty()) return; |
| 421 stream->Add(" changes["); | 421 stream->Add(" changes["); |
| 422 if (changes_flags == AllSideEffects()) { | 422 if (changes_flags == AllSideEffectsFlagSet()) { |
| 423 stream->Add("*"); | 423 stream->Add("*"); |
| 424 } else { | 424 } else { |
| 425 bool add_comma = false; | 425 bool add_comma = false; |
| 426 #define PRINT_DO(type) \ | 426 #define PRINT_DO(type) \ |
| 427 if (changes_flags & (1 << kChanges##type)) { \ | 427 if (changes_flags.Contains(kChanges##type)) { \ |
| 428 if (add_comma) stream->Add(","); \ | 428 if (add_comma) stream->Add(","); \ |
| 429 add_comma = true; \ | 429 add_comma = true; \ |
| 430 stream->Add(#type); \ | 430 stream->Add(#type); \ |
| 431 } | 431 } |
| 432 GVN_FLAG_LIST(PRINT_DO); | 432 GVN_FLAG_LIST(PRINT_DO); |
| 433 #undef PRINT_DO | 433 #undef PRINT_DO |
| 434 } | 434 } |
| 435 stream->Add("]"); | 435 stream->Add("]"); |
| 436 } | 436 } |
| 437 | 437 |
| 438 | 438 |
| 439 void HValue::PrintNameTo(StringStream* stream) { | 439 void HValue::PrintNameTo(StringStream* stream) { |
| 440 stream->Add("%s%d", representation_.Mnemonic(), id()); | 440 stream->Add("%s%d", representation_.Mnemonic(), id()); |
| (...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 HLoadNamedFieldPolymorphic::HLoadNamedFieldPolymorphic(HValue* context, | 1401 HLoadNamedFieldPolymorphic::HLoadNamedFieldPolymorphic(HValue* context, |
| 1402 HValue* object, | 1402 HValue* object, |
| 1403 SmallMapList* types, | 1403 SmallMapList* types, |
| 1404 Handle<String> name) | 1404 Handle<String> name) |
| 1405 : types_(Min(types->length(), kMaxLoadPolymorphism)), | 1405 : types_(Min(types->length(), kMaxLoadPolymorphism)), |
| 1406 name_(name), | 1406 name_(name), |
| 1407 need_generic_(false) { | 1407 need_generic_(false) { |
| 1408 SetOperandAt(0, context); | 1408 SetOperandAt(0, context); |
| 1409 SetOperandAt(1, object); | 1409 SetOperandAt(1, object); |
| 1410 set_representation(Representation::Tagged()); | 1410 set_representation(Representation::Tagged()); |
| 1411 SetFlag(kDependsOnMaps); | 1411 SetGVNFlag(kDependsOnMaps); |
| 1412 for (int i = 0; | 1412 for (int i = 0; |
| 1413 i < types->length() && types_.length() < kMaxLoadPolymorphism; | 1413 i < types->length() && types_.length() < kMaxLoadPolymorphism; |
| 1414 ++i) { | 1414 ++i) { |
| 1415 Handle<Map> map = types->at(i); | 1415 Handle<Map> map = types->at(i); |
| 1416 LookupResult lookup(map->GetIsolate()); | 1416 LookupResult lookup(map->GetIsolate()); |
| 1417 map->LookupInDescriptors(NULL, *name, &lookup); | 1417 map->LookupInDescriptors(NULL, *name, &lookup); |
| 1418 if (lookup.IsProperty()) { | 1418 if (lookup.IsProperty()) { |
| 1419 switch (lookup.type()) { | 1419 switch (lookup.type()) { |
| 1420 case FIELD: { | 1420 case FIELD: { |
| 1421 int index = lookup.GetLocalFieldIndexFromMap(*map); | 1421 int index = lookup.GetLocalFieldIndexFromMap(*map); |
| 1422 if (index < 0) { | 1422 if (index < 0) { |
| 1423 SetFlag(kDependsOnInobjectFields); | 1423 SetGVNFlag(kDependsOnInobjectFields); |
| 1424 } else { | 1424 } else { |
| 1425 SetFlag(kDependsOnBackingStoreFields); | 1425 SetGVNFlag(kDependsOnBackingStoreFields); |
| 1426 } | 1426 } |
| 1427 types_.Add(types->at(i)); | 1427 types_.Add(types->at(i)); |
| 1428 break; | 1428 break; |
| 1429 } | 1429 } |
| 1430 case CONSTANT_FUNCTION: | 1430 case CONSTANT_FUNCTION: |
| 1431 types_.Add(types->at(i)); | 1431 types_.Add(types->at(i)); |
| 1432 break; | 1432 break; |
| 1433 default: | 1433 default: |
| 1434 break; | 1434 break; |
| 1435 } | 1435 } |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2129 | 2129 |
| 2130 | 2130 |
| 2131 void HCheckPrototypeMaps::Verify() { | 2131 void HCheckPrototypeMaps::Verify() { |
| 2132 HInstruction::Verify(); | 2132 HInstruction::Verify(); |
| 2133 ASSERT(HasNoUses()); | 2133 ASSERT(HasNoUses()); |
| 2134 } | 2134 } |
| 2135 | 2135 |
| 2136 #endif | 2136 #endif |
| 2137 | 2137 |
| 2138 } } // namespace v8::internal | 2138 } } // namespace v8::internal |
| OLD | NEW |