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 1669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1680 | 1680 |
1681 | 1681 |
1682 void HCheckMaps::HandleSideEffectDominator(GVNFlag side_effect, | 1682 void HCheckMaps::HandleSideEffectDominator(GVNFlag side_effect, |
1683 HValue* dominator) { | 1683 HValue* dominator) { |
1684 ASSERT(side_effect == kChangesMaps); | 1684 ASSERT(side_effect == kChangesMaps); |
1685 // TODO(mstarzinger): For now we specialize on HStoreNamedField, but once | 1685 // TODO(mstarzinger): For now we specialize on HStoreNamedField, but once |
1686 // type information is rich enough we should generalize this to any HType | 1686 // type information is rich enough we should generalize this to any HType |
1687 // for which the map is known. | 1687 // for which the map is known. |
1688 if (HasNoUses() && dominator->IsStoreNamedField()) { | 1688 if (HasNoUses() && dominator->IsStoreNamedField()) { |
1689 HStoreNamedField* store = HStoreNamedField::cast(dominator); | 1689 HStoreNamedField* store = HStoreNamedField::cast(dominator); |
1690 UniqueValueId map_unique_id = store->transition_unique_id(); | 1690 if (!store->has_transition() || store->object() != value()) return; |
1691 if (!map_unique_id.IsInitialized() || store->object() != value()) return; | 1691 HConstant* transition = HConstant::cast(store->transition()); |
1692 for (int i = 0; i < map_set()->length(); i++) { | 1692 for (int i = 0; i < map_set()->length(); i++) { |
1693 if (map_unique_id == map_unique_ids_.at(i)) { | 1693 if (transition->UniqueValueIdsMatch(map_unique_ids_.at(i))) { |
1694 DeleteAndReplaceWith(NULL); | 1694 DeleteAndReplaceWith(NULL); |
1695 return; | 1695 return; |
1696 } | 1696 } |
1697 } | 1697 } |
1698 } | 1698 } |
1699 } | 1699 } |
1700 | 1700 |
1701 | 1701 |
1702 void HCheckMaps::PrintDataTo(StringStream* stream) { | 1702 void HCheckMaps::PrintDataTo(StringStream* stream) { |
1703 value()->PrintNameTo(stream); | 1703 value()->PrintNameTo(stream); |
(...skipping 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3515 | 3515 |
3516 | 3516 |
3517 void HStoreNamedField::PrintDataTo(StringStream* stream) { | 3517 void HStoreNamedField::PrintDataTo(StringStream* stream) { |
3518 object()->PrintNameTo(stream); | 3518 object()->PrintNameTo(stream); |
3519 access_.PrintTo(stream); | 3519 access_.PrintTo(stream); |
3520 stream->Add(" = "); | 3520 stream->Add(" = "); |
3521 value()->PrintNameTo(stream); | 3521 value()->PrintNameTo(stream); |
3522 if (NeedsWriteBarrier()) { | 3522 if (NeedsWriteBarrier()) { |
3523 stream->Add(" (write-barrier)"); | 3523 stream->Add(" (write-barrier)"); |
3524 } | 3524 } |
3525 if (!transition().is_null()) { | 3525 if (has_transition()) { |
3526 stream->Add(" (transition map %p)", *transition()); | 3526 stream->Add(" (transition map %p)", *transition_map()); |
3527 } | 3527 } |
3528 } | 3528 } |
3529 | 3529 |
3530 | 3530 |
3531 void HStoreKeyed::PrintDataTo(StringStream* stream) { | 3531 void HStoreKeyed::PrintDataTo(StringStream* stream) { |
3532 if (!is_external()) { | 3532 if (!is_external()) { |
3533 elements()->PrintNameTo(stream); | 3533 elements()->PrintNameTo(stream); |
3534 } else { | 3534 } else { |
3535 elements()->PrintNameTo(stream); | 3535 elements()->PrintNameTo(stream); |
3536 stream->Add("."); | 3536 stream->Add("."); |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4479 break; | 4479 break; |
4480 case kExternalMemory: | 4480 case kExternalMemory: |
4481 stream->Add("[external-memory]"); | 4481 stream->Add("[external-memory]"); |
4482 break; | 4482 break; |
4483 } | 4483 } |
4484 | 4484 |
4485 stream->Add("@%d", offset()); | 4485 stream->Add("@%d", offset()); |
4486 } | 4486 } |
4487 | 4487 |
4488 } } // namespace v8::internal | 4488 } } // namespace v8::internal |
OLD | NEW |