OLD | NEW |
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 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1457 | 1457 |
1458 | 1458 |
1459 void HLoadKeyedFastElement::PrintDataTo(StringStream* stream) { | 1459 void HLoadKeyedFastElement::PrintDataTo(StringStream* stream) { |
1460 object()->PrintNameTo(stream); | 1460 object()->PrintNameTo(stream); |
1461 stream->Add("["); | 1461 stream->Add("["); |
1462 key()->PrintNameTo(stream); | 1462 key()->PrintNameTo(stream); |
1463 stream->Add("]"); | 1463 stream->Add("]"); |
1464 } | 1464 } |
1465 | 1465 |
1466 | 1466 |
1467 bool HLoadKeyedFastElement::RequiresHoleCheck() const { | 1467 bool HLoadKeyedFastElement::RequiresHoleCheck() { |
1468 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { | 1468 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { |
1469 HValue* use = it.value(); | 1469 HValue* use = it.value(); |
1470 if (!use->IsChange()) return true; | 1470 if (!use->IsChange()) return true; |
1471 } | 1471 } |
1472 return false; | 1472 return false; |
1473 } | 1473 } |
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 Loading... |
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 (!details_.IsDontDelete()) stream->Add(" (deleteable)"); |
| 1638 if (details_.IsReadOnly()) stream->Add(" (read-only)"); |
| 1639 } |
| 1640 |
| 1641 |
| 1642 bool HLoadGlobalCell::RequiresHoleCheck() { |
| 1643 if (details_.IsDontDelete() && !details_.IsReadOnly()) return false; |
| 1644 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { |
| 1645 HValue* use = it.value(); |
| 1646 if (!use->IsChange()) return true; |
| 1647 } |
| 1648 return false; |
1643 } | 1649 } |
1644 | 1650 |
1645 | 1651 |
1646 void HLoadGlobalGeneric::PrintDataTo(StringStream* stream) { | 1652 void HLoadGlobalGeneric::PrintDataTo(StringStream* stream) { |
1647 stream->Add("%o ", *name()); | 1653 stream->Add("%o ", *name()); |
1648 } | 1654 } |
1649 | 1655 |
1650 | 1656 |
1651 void HStoreGlobalCell::PrintDataTo(StringStream* stream) { | 1657 void HStoreGlobalCell::PrintDataTo(StringStream* stream) { |
1652 stream->Add("[%p] = ", *cell()); | 1658 stream->Add("[%p] = ", *cell()); |
1653 value()->PrintNameTo(stream); | 1659 value()->PrintNameTo(stream); |
| 1660 if (!details_.IsDontDelete()) stream->Add(" (deleteable)"); |
| 1661 if (details_.IsReadOnly()) stream->Add(" (read-only)"); |
1654 } | 1662 } |
1655 | 1663 |
1656 | 1664 |
1657 void HStoreGlobalGeneric::PrintDataTo(StringStream* stream) { | 1665 void HStoreGlobalGeneric::PrintDataTo(StringStream* stream) { |
1658 stream->Add("%o = ", *name()); | 1666 stream->Add("%o = ", *name()); |
1659 value()->PrintNameTo(stream); | 1667 value()->PrintNameTo(stream); |
1660 } | 1668 } |
1661 | 1669 |
1662 | 1670 |
1663 void HLoadContextSlot::PrintDataTo(StringStream* stream) { | 1671 void HLoadContextSlot::PrintDataTo(StringStream* stream) { |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1926 | 1934 |
1927 | 1935 |
1928 void HCheckPrototypeMaps::Verify() { | 1936 void HCheckPrototypeMaps::Verify() { |
1929 HInstruction::Verify(); | 1937 HInstruction::Verify(); |
1930 ASSERT(HasNoUses()); | 1938 ASSERT(HasNoUses()); |
1931 } | 1939 } |
1932 | 1940 |
1933 #endif | 1941 #endif |
1934 | 1942 |
1935 } } // namespace v8::internal | 1943 } } // namespace v8::internal |
OLD | NEW |