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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 261003002: Drop obsolete HCheckMaps::HandleSideEffectsDominator(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "double.h" 7 #include "double.h"
8 #include "factory.h" 8 #include "factory.h"
9 #include "hydrogen-infer-representation.h" 9 #include "hydrogen-infer-representation.h"
10 #include "property-details-inl.h" 10 #include "property-details-inl.h"
(...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 case IS_INTERNALIZED_STRING: 1662 case IS_INTERNALIZED_STRING:
1663 *mask = kIsNotStringMask | kIsNotInternalizedMask; 1663 *mask = kIsNotStringMask | kIsNotInternalizedMask;
1664 *tag = kInternalizedTag; 1664 *tag = kInternalizedTag;
1665 return; 1665 return;
1666 default: 1666 default:
1667 UNREACHABLE(); 1667 UNREACHABLE();
1668 } 1668 }
1669 } 1669 }
1670 1670
1671 1671
1672 bool HCheckMaps::HandleSideEffectDominator(GVNFlag side_effect,
1673 HValue* dominator) {
1674 ASSERT(side_effect == kMaps);
1675 // TODO(mstarzinger): For now we specialize on HStoreNamedField, but once
1676 // type information is rich enough we should generalize this to any HType
1677 // for which the map is known.
1678 if (HasNoUses() && dominator->IsStoreNamedField()) {
1679 HStoreNamedField* store = HStoreNamedField::cast(dominator);
1680 if (!store->has_transition() || store->object() != value()) return false;
1681 HConstant* transition = HConstant::cast(store->transition());
1682 if (map_set_.Contains(Unique<Map>::cast(transition->GetUnique()))) {
1683 DeleteAndReplaceWith(NULL);
1684 return true;
1685 }
1686 }
1687 return false;
1688 }
1689
1690
1691 void HCheckMaps::PrintDataTo(StringStream* stream) { 1672 void HCheckMaps::PrintDataTo(StringStream* stream) {
1692 value()->PrintNameTo(stream); 1673 value()->PrintNameTo(stream);
1693 stream->Add(" [%p", *map_set_.at(0).handle()); 1674 stream->Add(" [%p", *map_set_.at(0).handle());
1694 for (int i = 1; i < map_set_.size(); ++i) { 1675 for (int i = 1; i < map_set_.size(); ++i) {
1695 stream->Add(",%p", *map_set_.at(i).handle()); 1676 stream->Add(",%p", *map_set_.at(i).handle());
1696 } 1677 }
1697 stream->Add("]%s", CanOmitMapChecks() ? "(omitted)" : ""); 1678 stream->Add("]%s", CanOmitMapChecks() ? "(omitted)" : "");
1698 } 1679 }
1699 1680
1700 1681
(...skipping 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after
4764 break; 4745 break;
4765 case kExternalMemory: 4746 case kExternalMemory:
4766 stream->Add("[external-memory]"); 4747 stream->Add("[external-memory]");
4767 break; 4748 break;
4768 } 4749 }
4769 4750
4770 stream->Add("@%d", offset()); 4751 stream->Add("@%d", offset());
4771 } 4752 }
4772 4753
4773 } } // namespace v8::internal 4754 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698