| 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 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1689 stream->Add("]"); | 1689 stream->Add("]"); |
| 1690 } | 1690 } |
| 1691 | 1691 |
| 1692 | 1692 |
| 1693 void HCheckFunction::PrintDataTo(StringStream* stream) { | 1693 void HCheckFunction::PrintDataTo(StringStream* stream) { |
| 1694 value()->PrintNameTo(stream); | 1694 value()->PrintNameTo(stream); |
| 1695 stream->Add(" %p", *target()); | 1695 stream->Add(" %p", *target()); |
| 1696 } | 1696 } |
| 1697 | 1697 |
| 1698 | 1698 |
| 1699 HValue* HCheckFunction::Canonicalize() { | |
| 1700 return (value()->IsConstant() && | |
| 1701 HConstant::cast(value())->UniqueValueIdsMatch(target_unique_id_)) | |
| 1702 ? NULL | |
| 1703 : this; | |
| 1704 } | |
| 1705 | |
| 1706 | |
| 1707 const char* HCheckInstanceType::GetCheckName() { | 1699 const char* HCheckInstanceType::GetCheckName() { |
| 1708 switch (check_) { | 1700 switch (check_) { |
| 1709 case IS_SPEC_OBJECT: return "object"; | 1701 case IS_SPEC_OBJECT: return "object"; |
| 1710 case IS_JS_ARRAY: return "array"; | 1702 case IS_JS_ARRAY: return "array"; |
| 1711 case IS_STRING: return "string"; | 1703 case IS_STRING: return "string"; |
| 1712 case IS_INTERNALIZED_STRING: return "internalized_string"; | 1704 case IS_INTERNALIZED_STRING: return "internalized_string"; |
| 1713 } | 1705 } |
| 1714 UNREACHABLE(); | 1706 UNREACHABLE(); |
| 1715 return ""; | 1707 return ""; |
| 1716 } | 1708 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1744 context()->PrintNameTo(stream); | 1736 context()->PrintNameTo(stream); |
| 1745 } | 1737 } |
| 1746 | 1738 |
| 1747 | 1739 |
| 1748 Range* HValue::InferRange(Zone* zone) { | 1740 Range* HValue::InferRange(Zone* zone) { |
| 1749 Range* result; | 1741 Range* result; |
| 1750 if (type().IsSmi()) { | 1742 if (type().IsSmi()) { |
| 1751 result = new(zone) Range(Smi::kMinValue, Smi::kMaxValue); | 1743 result = new(zone) Range(Smi::kMinValue, Smi::kMaxValue); |
| 1752 result->set_can_be_minus_zero(false); | 1744 result->set_can_be_minus_zero(false); |
| 1753 } else { | 1745 } else { |
| 1754 // Untagged integer32 cannot be -0, all other representations can. | |
| 1755 result = new(zone) Range(); | 1746 result = new(zone) Range(); |
| 1756 result->set_can_be_minus_zero(!representation().IsInteger32()); | 1747 result->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32)); |
| 1748 // TODO(jkummerow): The range cannot be minus zero when the upper type |
| 1749 // bound is Integer32. |
| 1757 } | 1750 } |
| 1758 return result; | 1751 return result; |
| 1759 } | 1752 } |
| 1760 | 1753 |
| 1761 | 1754 |
| 1762 Range* HChange::InferRange(Zone* zone) { | 1755 Range* HChange::InferRange(Zone* zone) { |
| 1763 Range* input_range = value()->range(); | 1756 Range* input_range = value()->range(); |
| 1764 if (from().IsInteger32() && | 1757 if (from().IsInteger32() && |
| 1765 to().IsSmiOrTagged() && | 1758 to().IsSmiOrTagged() && |
| 1766 !value()->CheckFlag(HInstruction::kUint32) && | 1759 !value()->CheckFlag(HInstruction::kUint32) && |
| 1767 input_range != NULL && input_range->IsInSmiRange()) { | 1760 input_range != NULL && input_range->IsInSmiRange()) { |
| 1768 set_type(HType::Smi()); | 1761 set_type(HType::Smi()); |
| 1769 ClearGVNFlag(kChangesNewSpacePromotion); | 1762 ClearGVNFlag(kChangesNewSpacePromotion); |
| 1770 } | 1763 } |
| 1771 Range* result = (input_range != NULL) | 1764 Range* result = (input_range != NULL) |
| 1772 ? input_range->Copy(zone) | 1765 ? input_range->Copy(zone) |
| 1773 : HValue::InferRange(zone); | 1766 : HValue::InferRange(zone); |
| 1774 if (to().IsInteger32()) result->set_can_be_minus_zero(false); | 1767 result->set_can_be_minus_zero(!to().IsSmiOrInteger32() || |
| 1768 !CheckFlag(kAllUsesTruncatingToInt32)); |
| 1775 return result; | 1769 return result; |
| 1776 } | 1770 } |
| 1777 | 1771 |
| 1778 | 1772 |
| 1779 Range* HConstant::InferRange(Zone* zone) { | 1773 Range* HConstant::InferRange(Zone* zone) { |
| 1780 if (has_int32_value_) { | 1774 if (has_int32_value_) { |
| 1781 Range* result = new(zone) Range(int32_value_, int32_value_); | 1775 Range* result = new(zone) Range(int32_value_, int32_value_); |
| 1782 result->set_can_be_minus_zero(false); | 1776 result->set_can_be_minus_zero(false); |
| 1783 return result; | 1777 return result; |
| 1784 } | 1778 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1809 | 1803 |
| 1810 Range* HAdd::InferRange(Zone* zone) { | 1804 Range* HAdd::InferRange(Zone* zone) { |
| 1811 if (representation().IsInteger32()) { | 1805 if (representation().IsInteger32()) { |
| 1812 Range* a = left()->range(); | 1806 Range* a = left()->range(); |
| 1813 Range* b = right()->range(); | 1807 Range* b = right()->range(); |
| 1814 Range* res = a->Copy(zone); | 1808 Range* res = a->Copy(zone); |
| 1815 if (!res->AddAndCheckOverflow(b) || | 1809 if (!res->AddAndCheckOverflow(b) || |
| 1816 CheckFlag(kAllUsesTruncatingToInt32)) { | 1810 CheckFlag(kAllUsesTruncatingToInt32)) { |
| 1817 ClearFlag(kCanOverflow); | 1811 ClearFlag(kCanOverflow); |
| 1818 } | 1812 } |
| 1819 if (!CheckFlag(kAllUsesTruncatingToInt32)) { | 1813 res->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32) && |
| 1820 res->set_can_be_minus_zero(a->CanBeMinusZero() && b->CanBeMinusZero()); | 1814 a->CanBeMinusZero() && b->CanBeMinusZero()); |
| 1821 } | |
| 1822 return res; | 1815 return res; |
| 1823 } else { | 1816 } else { |
| 1824 return HValue::InferRange(zone); | 1817 return HValue::InferRange(zone); |
| 1825 } | 1818 } |
| 1826 } | 1819 } |
| 1827 | 1820 |
| 1828 | 1821 |
| 1829 Range* HSub::InferRange(Zone* zone) { | 1822 Range* HSub::InferRange(Zone* zone) { |
| 1830 if (representation().IsInteger32()) { | 1823 if (representation().IsInteger32()) { |
| 1831 Range* a = left()->range(); | 1824 Range* a = left()->range(); |
| 1832 Range* b = right()->range(); | 1825 Range* b = right()->range(); |
| 1833 Range* res = a->Copy(zone); | 1826 Range* res = a->Copy(zone); |
| 1834 if (!res->SubAndCheckOverflow(b) || | 1827 if (!res->SubAndCheckOverflow(b) || |
| 1835 CheckFlag(kAllUsesTruncatingToInt32)) { | 1828 CheckFlag(kAllUsesTruncatingToInt32)) { |
| 1836 ClearFlag(kCanOverflow); | 1829 ClearFlag(kCanOverflow); |
| 1837 } | 1830 } |
| 1838 if (!CheckFlag(kAllUsesTruncatingToInt32)) { | 1831 res->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32) && |
| 1839 res->set_can_be_minus_zero(a->CanBeMinusZero() && b->CanBeZero()); | 1832 a->CanBeMinusZero() && b->CanBeZero()); |
| 1840 } | |
| 1841 return res; | 1833 return res; |
| 1842 } else { | 1834 } else { |
| 1843 return HValue::InferRange(zone); | 1835 return HValue::InferRange(zone); |
| 1844 } | 1836 } |
| 1845 } | 1837 } |
| 1846 | 1838 |
| 1847 | 1839 |
| 1848 Range* HMul::InferRange(Zone* zone) { | 1840 Range* HMul::InferRange(Zone* zone) { |
| 1849 if (representation().IsInteger32()) { | 1841 if (representation().IsInteger32()) { |
| 1850 Range* a = left()->range(); | 1842 Range* a = left()->range(); |
| 1851 Range* b = right()->range(); | 1843 Range* b = right()->range(); |
| 1852 Range* res = a->Copy(zone); | 1844 Range* res = a->Copy(zone); |
| 1853 if (!res->MulAndCheckOverflow(b)) { | 1845 if (!res->MulAndCheckOverflow(b)) { |
| 1854 // Clearing the kCanOverflow flag when kAllUsesAreTruncatingToInt32 | 1846 // Clearing the kCanOverflow flag when kAllUsesAreTruncatingToInt32 |
| 1855 // would be wrong, because truncated integer multiplication is too | 1847 // would be wrong, because truncated integer multiplication is too |
| 1856 // precise and therefore not the same as converting to Double and back. | 1848 // precise and therefore not the same as converting to Double and back. |
| 1857 ClearFlag(kCanOverflow); | 1849 ClearFlag(kCanOverflow); |
| 1858 } | 1850 } |
| 1859 if (!CheckFlag(kAllUsesTruncatingToInt32)) { | 1851 res->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32) && |
| 1860 bool m0 = (a->CanBeZero() && b->CanBeNegative()) || | 1852 ((a->CanBeZero() && b->CanBeNegative()) || |
| 1861 (a->CanBeNegative() && b->CanBeZero()); | 1853 (a->CanBeNegative() && b->CanBeZero()))); |
| 1862 res->set_can_be_minus_zero(m0); | |
| 1863 } | |
| 1864 return res; | 1854 return res; |
| 1865 } else { | 1855 } else { |
| 1866 return HValue::InferRange(zone); | 1856 return HValue::InferRange(zone); |
| 1867 } | 1857 } |
| 1868 } | 1858 } |
| 1869 | 1859 |
| 1870 | 1860 |
| 1871 Range* HDiv::InferRange(Zone* zone) { | 1861 Range* HDiv::InferRange(Zone* zone) { |
| 1872 if (representation().IsInteger32()) { | 1862 if (representation().IsInteger32()) { |
| 1873 Range* a = left()->range(); | 1863 Range* a = left()->range(); |
| 1874 Range* b = right()->range(); | 1864 Range* b = right()->range(); |
| 1875 Range* result = new(zone) Range(); | 1865 Range* result = new(zone) Range(); |
| 1876 if (!CheckFlag(kAllUsesTruncatingToInt32)) { | 1866 result->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32) && |
| 1877 if (a->CanBeMinusZero()) { | 1867 (a->CanBeMinusZero() || |
| 1878 result->set_can_be_minus_zero(true); | 1868 (a->CanBeZero() && b->CanBeNegative()))); |
| 1879 } | |
| 1880 | |
| 1881 if (a->CanBeZero() && b->CanBeNegative()) { | |
| 1882 result->set_can_be_minus_zero(true); | |
| 1883 } | |
| 1884 } | |
| 1885 | |
| 1886 if (!a->Includes(kMinInt) || !b->Includes(-1)) { | 1869 if (!a->Includes(kMinInt) || !b->Includes(-1)) { |
| 1887 ClearFlag(HValue::kCanOverflow); | 1870 ClearFlag(HValue::kCanOverflow); |
| 1888 } | 1871 } |
| 1889 | 1872 |
| 1890 if (!b->CanBeZero()) { | 1873 if (!b->CanBeZero()) { |
| 1891 ClearFlag(HValue::kCanBeDivByZero); | 1874 ClearFlag(HValue::kCanBeDivByZero); |
| 1892 } | 1875 } |
| 1893 return result; | 1876 return result; |
| 1894 } else { | 1877 } else { |
| 1895 return HValue::InferRange(zone); | 1878 return HValue::InferRange(zone); |
| 1896 } | 1879 } |
| 1897 } | 1880 } |
| 1898 | 1881 |
| 1899 | 1882 |
| 1900 Range* HMod::InferRange(Zone* zone) { | 1883 Range* HMod::InferRange(Zone* zone) { |
| 1901 if (representation().IsInteger32()) { | 1884 if (representation().IsInteger32()) { |
| 1902 Range* a = left()->range(); | 1885 Range* a = left()->range(); |
| 1903 Range* b = right()->range(); | 1886 Range* b = right()->range(); |
| 1904 | 1887 |
| 1905 // The magnitude of the modulus is bounded by the right operand. Note that | 1888 // The magnitude of the modulus is bounded by the right operand. Note that |
| 1906 // apart for the cases involving kMinInt, the calculation below is the same | 1889 // apart for the cases involving kMinInt, the calculation below is the same |
| 1907 // as Max(Abs(b->lower()), Abs(b->upper())) - 1. | 1890 // as Max(Abs(b->lower()), Abs(b->upper())) - 1. |
| 1908 int32_t positive_bound = -(Min(NegAbs(b->lower()), NegAbs(b->upper())) + 1); | 1891 int32_t positive_bound = -(Min(NegAbs(b->lower()), NegAbs(b->upper())) + 1); |
| 1909 | 1892 |
| 1910 // The result of the modulo operation has the sign of its left operand. | 1893 // The result of the modulo operation has the sign of its left operand. |
| 1911 bool left_can_be_negative = a->CanBeMinusZero() || a->CanBeNegative(); | 1894 bool left_can_be_negative = a->CanBeMinusZero() || a->CanBeNegative(); |
| 1912 Range* result = new(zone) Range(left_can_be_negative ? -positive_bound : 0, | 1895 Range* result = new(zone) Range(left_can_be_negative ? -positive_bound : 0, |
| 1913 a->CanBePositive() ? positive_bound : 0); | 1896 a->CanBePositive() ? positive_bound : 0); |
| 1914 | 1897 |
| 1915 if (left_can_be_negative && !CheckFlag(kAllUsesTruncatingToInt32)) { | 1898 result->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32) && |
| 1916 result->set_can_be_minus_zero(true); | 1899 left_can_be_negative); |
| 1917 } | |
| 1918 | 1900 |
| 1919 if (!a->Includes(kMinInt) || !b->Includes(-1)) { | 1901 if (!a->Includes(kMinInt) || !b->Includes(-1)) { |
| 1920 ClearFlag(HValue::kCanOverflow); | 1902 ClearFlag(HValue::kCanOverflow); |
| 1921 } | 1903 } |
| 1922 | 1904 |
| 1923 if (!b->CanBeZero()) { | 1905 if (!b->CanBeZero()) { |
| 1924 ClearFlag(HValue::kCanBeDivByZero); | 1906 ClearFlag(HValue::kCanBeDivByZero); |
| 1925 } | 1907 } |
| 1926 return result; | 1908 return result; |
| 1927 } else { | 1909 } else { |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2457 static_cast<uint32_t>( | 2439 static_cast<uint32_t>( |
| 2458 left_upper | left_lower | right_upper | right_lower)); | 2440 left_upper | left_lower | right_upper | right_lower)); |
| 2459 | 2441 |
| 2460 int64_t limit = 1; | 2442 int64_t limit = 1; |
| 2461 limit <<= high; | 2443 limit <<= high; |
| 2462 int32_t min = (left()->range()->CanBeNegative() || | 2444 int32_t min = (left()->range()->CanBeNegative() || |
| 2463 right()->range()->CanBeNegative()) | 2445 right()->range()->CanBeNegative()) |
| 2464 ? static_cast<int32_t>(-limit) : 0; | 2446 ? static_cast<int32_t>(-limit) : 0; |
| 2465 return new(zone) Range(min, static_cast<int32_t>(limit - 1)); | 2447 return new(zone) Range(min, static_cast<int32_t>(limit - 1)); |
| 2466 } | 2448 } |
| 2467 return HValue::InferRange(zone); | 2449 Range* result = HValue::InferRange(zone); |
| 2450 result->set_can_be_minus_zero(false); |
| 2451 return result; |
| 2468 } | 2452 } |
| 2469 const int32_t kDefaultMask = static_cast<int32_t>(0xffffffff); | 2453 const int32_t kDefaultMask = static_cast<int32_t>(0xffffffff); |
| 2470 int32_t left_mask = (left()->range() != NULL) | 2454 int32_t left_mask = (left()->range() != NULL) |
| 2471 ? left()->range()->Mask() | 2455 ? left()->range()->Mask() |
| 2472 : kDefaultMask; | 2456 : kDefaultMask; |
| 2473 int32_t right_mask = (right()->range() != NULL) | 2457 int32_t right_mask = (right()->range() != NULL) |
| 2474 ? right()->range()->Mask() | 2458 ? right()->range()->Mask() |
| 2475 : kDefaultMask; | 2459 : kDefaultMask; |
| 2476 int32_t result_mask = (op() == Token::BIT_AND) | 2460 int32_t result_mask = (op() == Token::BIT_AND) |
| 2477 ? left_mask & right_mask | 2461 ? left_mask & right_mask |
| 2478 : left_mask | right_mask; | 2462 : left_mask | right_mask; |
| 2479 return (result_mask >= 0) | 2463 if (result_mask >= 0) return new(zone) Range(0, result_mask); |
| 2480 ? new(zone) Range(0, result_mask) | 2464 |
| 2481 : HValue::InferRange(zone); | 2465 Range* result = HValue::InferRange(zone); |
| 2466 result->set_can_be_minus_zero(false); |
| 2467 return result; |
| 2482 } | 2468 } |
| 2483 | 2469 |
| 2484 | 2470 |
| 2485 Range* HSar::InferRange(Zone* zone) { | 2471 Range* HSar::InferRange(Zone* zone) { |
| 2486 if (right()->IsConstant()) { | 2472 if (right()->IsConstant()) { |
| 2487 HConstant* c = HConstant::cast(right()); | 2473 HConstant* c = HConstant::cast(right()); |
| 2488 if (c->HasInteger32Value()) { | 2474 if (c->HasInteger32Value()) { |
| 2489 Range* result = (left()->range() != NULL) | 2475 Range* result = (left()->range() != NULL) |
| 2490 ? left()->range()->Copy(zone) | 2476 ? left()->range()->Copy(zone) |
| 2491 : new(zone) Range(); | 2477 : new(zone) Range(); |
| 2492 result->Sar(c->Integer32Value()); | 2478 result->Sar(c->Integer32Value()); |
| 2493 result->set_can_be_minus_zero(false); | |
| 2494 return result; | 2479 return result; |
| 2495 } | 2480 } |
| 2496 } | 2481 } |
| 2497 return HValue::InferRange(zone); | 2482 return HValue::InferRange(zone); |
| 2498 } | 2483 } |
| 2499 | 2484 |
| 2500 | 2485 |
| 2501 Range* HShr::InferRange(Zone* zone) { | 2486 Range* HShr::InferRange(Zone* zone) { |
| 2502 if (right()->IsConstant()) { | 2487 if (right()->IsConstant()) { |
| 2503 HConstant* c = HConstant::cast(right()); | 2488 HConstant* c = HConstant::cast(right()); |
| 2504 if (c->HasInteger32Value()) { | 2489 if (c->HasInteger32Value()) { |
| 2505 int shift_count = c->Integer32Value() & 0x1f; | 2490 int shift_count = c->Integer32Value() & 0x1f; |
| 2506 if (left()->range()->CanBeNegative()) { | 2491 if (left()->range()->CanBeNegative()) { |
| 2507 // Only compute bounds if the result always fits into an int32. | 2492 // Only compute bounds if the result always fits into an int32. |
| 2508 return (shift_count >= 1) | 2493 return (shift_count >= 1) |
| 2509 ? new(zone) Range(0, | 2494 ? new(zone) Range(0, |
| 2510 static_cast<uint32_t>(0xffffffff) >> shift_count) | 2495 static_cast<uint32_t>(0xffffffff) >> shift_count) |
| 2511 : new(zone) Range(); | 2496 : new(zone) Range(); |
| 2512 } else { | 2497 } else { |
| 2513 // For positive inputs we can use the >> operator. | 2498 // For positive inputs we can use the >> operator. |
| 2514 Range* result = (left()->range() != NULL) | 2499 Range* result = (left()->range() != NULL) |
| 2515 ? left()->range()->Copy(zone) | 2500 ? left()->range()->Copy(zone) |
| 2516 : new(zone) Range(); | 2501 : new(zone) Range(); |
| 2517 result->Sar(c->Integer32Value()); | 2502 result->Sar(c->Integer32Value()); |
| 2518 result->set_can_be_minus_zero(false); | |
| 2519 return result; | 2503 return result; |
| 2520 } | 2504 } |
| 2521 } | 2505 } |
| 2522 } | 2506 } |
| 2523 return HValue::InferRange(zone); | 2507 return HValue::InferRange(zone); |
| 2524 } | 2508 } |
| 2525 | 2509 |
| 2526 | 2510 |
| 2527 Range* HShl::InferRange(Zone* zone) { | 2511 Range* HShl::InferRange(Zone* zone) { |
| 2528 if (right()->IsConstant()) { | 2512 if (right()->IsConstant()) { |
| 2529 HConstant* c = HConstant::cast(right()); | 2513 HConstant* c = HConstant::cast(right()); |
| 2530 if (c->HasInteger32Value()) { | 2514 if (c->HasInteger32Value()) { |
| 2531 Range* result = (left()->range() != NULL) | 2515 Range* result = (left()->range() != NULL) |
| 2532 ? left()->range()->Copy(zone) | 2516 ? left()->range()->Copy(zone) |
| 2533 : new(zone) Range(); | 2517 : new(zone) Range(); |
| 2534 result->Shl(c->Integer32Value()); | 2518 result->Shl(c->Integer32Value()); |
| 2535 result->set_can_be_minus_zero(false); | |
| 2536 return result; | 2519 return result; |
| 2537 } | 2520 } |
| 2538 } | 2521 } |
| 2539 return HValue::InferRange(zone); | 2522 return HValue::InferRange(zone); |
| 2540 } | 2523 } |
| 2541 | 2524 |
| 2542 | 2525 |
| 2543 Range* HLoadKeyed::InferRange(Zone* zone) { | 2526 Range* HLoadKeyed::InferRange(Zone* zone) { |
| 2544 switch (elements_kind()) { | 2527 switch (elements_kind()) { |
| 2545 case EXTERNAL_PIXEL_ELEMENTS: | 2528 case EXTERNAL_PIXEL_ELEMENTS: |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3138 HType HCompareGeneric::CalculateInferredType() { | 3121 HType HCompareGeneric::CalculateInferredType() { |
| 3139 return HType::Boolean(); | 3122 return HType::Boolean(); |
| 3140 } | 3123 } |
| 3141 | 3124 |
| 3142 | 3125 |
| 3143 HType HInstanceOf::CalculateInferredType() { | 3126 HType HInstanceOf::CalculateInferredType() { |
| 3144 return HType::Boolean(); | 3127 return HType::Boolean(); |
| 3145 } | 3128 } |
| 3146 | 3129 |
| 3147 | 3130 |
| 3148 HType HDeleteProperty::CalculateInferredType() { | |
| 3149 return HType::Boolean(); | |
| 3150 } | |
| 3151 | |
| 3152 | |
| 3153 HType HInstanceOfKnownGlobal::CalculateInferredType() { | 3131 HType HInstanceOfKnownGlobal::CalculateInferredType() { |
| 3154 return HType::Boolean(); | 3132 return HType::Boolean(); |
| 3155 } | 3133 } |
| 3156 | 3134 |
| 3157 | 3135 |
| 3158 HType HChange::CalculateInferredType() { | 3136 HType HChange::CalculateInferredType() { |
| 3159 if (from().IsDouble() && to().IsTagged()) return HType::HeapNumber(); | 3137 if (from().IsDouble() && to().IsTagged()) return HType::HeapNumber(); |
| 3160 return type(); | 3138 return type(); |
| 3161 } | 3139 } |
| 3162 | 3140 |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3659 } | 3637 } |
| 3660 } | 3638 } |
| 3661 return new(zone) HShr(context, left, right); | 3639 return new(zone) HShr(context, left, right); |
| 3662 } | 3640 } |
| 3663 | 3641 |
| 3664 | 3642 |
| 3665 #undef H_CONSTANT_INT32 | 3643 #undef H_CONSTANT_INT32 |
| 3666 #undef H_CONSTANT_DOUBLE | 3644 #undef H_CONSTANT_DOUBLE |
| 3667 | 3645 |
| 3668 | 3646 |
| 3669 void HIn::PrintDataTo(StringStream* stream) { | |
| 3670 key()->PrintNameTo(stream); | |
| 3671 stream->Add(" "); | |
| 3672 object()->PrintNameTo(stream); | |
| 3673 } | |
| 3674 | |
| 3675 | |
| 3676 void HBitwise::PrintDataTo(StringStream* stream) { | 3647 void HBitwise::PrintDataTo(StringStream* stream) { |
| 3677 stream->Add(Token::Name(op_)); | 3648 stream->Add(Token::Name(op_)); |
| 3678 stream->Add(" "); | 3649 stream->Add(" "); |
| 3679 HBitwiseBinaryOperation::PrintDataTo(stream); | 3650 HBitwiseBinaryOperation::PrintDataTo(stream); |
| 3680 } | 3651 } |
| 3681 | 3652 |
| 3682 | 3653 |
| 3683 void HPhi::SimplifyConstantInputs() { | 3654 void HPhi::SimplifyConstantInputs() { |
| 3684 // Convert constant inputs to integers when all uses are truncating. | 3655 // Convert constant inputs to integers when all uses are truncating. |
| 3685 // This must happen before representation inference takes place. | 3656 // This must happen before representation inference takes place. |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3930 case kBackingStore: | 3901 case kBackingStore: |
| 3931 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); | 3902 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); |
| 3932 stream->Add("[backing-store]"); | 3903 stream->Add("[backing-store]"); |
| 3933 break; | 3904 break; |
| 3934 } | 3905 } |
| 3935 | 3906 |
| 3936 stream->Add("@%d", offset()); | 3907 stream->Add("@%d", offset()); |
| 3937 } | 3908 } |
| 3938 | 3909 |
| 3939 } } // namespace v8::internal | 3910 } } // namespace v8::internal |
| OLD | NEW |