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

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

Issue 8054008: Improve our simple elimination of hole checks. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 2 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 1474
1475 1475
1476 void HLoadKeyedFastDoubleElement::PrintDataTo(StringStream* stream) { 1476 void HLoadKeyedFastDoubleElement::PrintDataTo(StringStream* stream) {
1477 elements()->PrintNameTo(stream); 1477 elements()->PrintNameTo(stream);
1478 stream->Add("["); 1478 stream->Add("[");
1479 key()->PrintNameTo(stream); 1479 key()->PrintNameTo(stream);
1480 stream->Add("]"); 1480 stream->Add("]");
1481 } 1481 }
1482 1482
1483 1483
1484 bool HLoadKeyedFastDoubleElement::RequiresHoleCheck() const {
1485 return true;
1486 }
1487
1488
1489 void HLoadKeyedGeneric::PrintDataTo(StringStream* stream) { 1484 void HLoadKeyedGeneric::PrintDataTo(StringStream* stream) {
1490 object()->PrintNameTo(stream); 1485 object()->PrintNameTo(stream);
1491 stream->Add("["); 1486 stream->Add("[");
1492 key()->PrintNameTo(stream); 1487 key()->PrintNameTo(stream);
1493 stream->Add("]"); 1488 stream->Add("]");
1494 } 1489 }
1495 1490
1496 1491
1497 void HLoadKeyedSpecializedArrayElement::PrintDataTo( 1492 void HLoadKeyedSpecializedArrayElement::PrintDataTo(
1498 StringStream* stream) { 1493 StringStream* stream) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 } 1627 }
1633 stream->Add("["); 1628 stream->Add("[");
1634 key()->PrintNameTo(stream); 1629 key()->PrintNameTo(stream);
1635 stream->Add("] = "); 1630 stream->Add("] = ");
1636 value()->PrintNameTo(stream); 1631 value()->PrintNameTo(stream);
1637 } 1632 }
1638 1633
1639 1634
1640 void HLoadGlobalCell::PrintDataTo(StringStream* stream) { 1635 void HLoadGlobalCell::PrintDataTo(StringStream* stream) {
1641 stream->Add("[%p]", *cell()); 1636 stream->Add("[%p]", *cell());
1642 if (check_hole_value()) stream->Add(" (deleteable/read-only)"); 1637 if (deleteable_or_const()) stream->Add(" (deleteable/read-only)");
1638 }
1639
1640
1641 bool HLoadGlobalCell::RequiresHoleCheck() const {
1642 if (!deleteable_or_const()) return false;
1643 for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
1644 HValue* use = it.value();
1645 if (!use->IsChange()) return true;
1646 }
1647 return false;
1643 } 1648 }
1644 1649
1645 1650
1646 void HLoadGlobalGeneric::PrintDataTo(StringStream* stream) { 1651 void HLoadGlobalGeneric::PrintDataTo(StringStream* stream) {
1647 stream->Add("%o ", *name()); 1652 stream->Add("%o ", *name());
1648 } 1653 }
1649 1654
1650 1655
1651 void HStoreGlobalCell::PrintDataTo(StringStream* stream) { 1656 void HStoreGlobalCell::PrintDataTo(StringStream* stream) {
1652 stream->Add("[%p] = ", *cell()); 1657 stream->Add("[%p] = ", *cell());
1653 value()->PrintNameTo(stream); 1658 value()->PrintNameTo(stream);
1659 if (deleteable_or_const()) stream->Add(" (deleteable/read-only)");
1654 } 1660 }
1655 1661
1656 1662
1657 void HStoreGlobalGeneric::PrintDataTo(StringStream* stream) { 1663 void HStoreGlobalGeneric::PrintDataTo(StringStream* stream) {
1658 stream->Add("%o = ", *name()); 1664 stream->Add("%o = ", *name());
1659 value()->PrintNameTo(stream); 1665 value()->PrintNameTo(stream);
1660 } 1666 }
1661 1667
1662 1668
1663 void HLoadContextSlot::PrintDataTo(StringStream* stream) { 1669 void HLoadContextSlot::PrintDataTo(StringStream* stream) {
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1926 1932
1927 1933
1928 void HCheckPrototypeMaps::Verify() { 1934 void HCheckPrototypeMaps::Verify() {
1929 HInstruction::Verify(); 1935 HInstruction::Verify();
1930 ASSERT(HasNoUses()); 1936 ASSERT(HasNoUses());
1931 } 1937 }
1932 1938
1933 #endif 1939 #endif
1934 1940
1935 } } // namespace v8::internal 1941 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698