Chromium Code Reviews| 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 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1615 : new(zone) Range(); | 1615 : new(zone) Range(); |
| 1616 result->Shl(c->Integer32Value()); | 1616 result->Shl(c->Integer32Value()); |
| 1617 result->set_can_be_minus_zero(false); | 1617 result->set_can_be_minus_zero(false); |
| 1618 return result; | 1618 return result; |
| 1619 } | 1619 } |
| 1620 } | 1620 } |
| 1621 return HValue::InferRange(zone); | 1621 return HValue::InferRange(zone); |
| 1622 } | 1622 } |
| 1623 | 1623 |
| 1624 | 1624 |
| 1625 Range* HLoadKeyedSpecializedArrayElement::InferRange(Zone* zone) { | 1625 Range* HLoadKeyed::InferRange(Zone* zone) { |
| 1626 switch (elements_kind()) { | 1626 switch (elements_kind()) { |
| 1627 case EXTERNAL_PIXEL_ELEMENTS: | 1627 case EXTERNAL_PIXEL_ELEMENTS: |
| 1628 return new(zone) Range(0, 255); | 1628 return new(zone) Range(0, 255); |
| 1629 case EXTERNAL_BYTE_ELEMENTS: | 1629 case EXTERNAL_BYTE_ELEMENTS: |
| 1630 return new(zone) Range(-128, 127); | 1630 return new(zone) Range(-128, 127); |
| 1631 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 1631 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
| 1632 return new(zone) Range(0, 255); | 1632 return new(zone) Range(0, 255); |
| 1633 case EXTERNAL_SHORT_ELEMENTS: | 1633 case EXTERNAL_SHORT_ELEMENTS: |
| 1634 return new(zone) Range(-32768, 32767); | 1634 return new(zone) Range(-32768, 32767); |
| 1635 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 1635 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1842 } | 1842 } |
| 1843 | 1843 |
| 1844 | 1844 |
| 1845 void HLoadNamedGeneric::PrintDataTo(StringStream* stream) { | 1845 void HLoadNamedGeneric::PrintDataTo(StringStream* stream) { |
| 1846 object()->PrintNameTo(stream); | 1846 object()->PrintNameTo(stream); |
| 1847 stream->Add("."); | 1847 stream->Add("."); |
| 1848 stream->Add(*String::cast(*name())->ToCString()); | 1848 stream->Add(*String::cast(*name())->ToCString()); |
| 1849 } | 1849 } |
| 1850 | 1850 |
| 1851 | 1851 |
| 1852 void HLoadKeyedFastElement::PrintDataTo(StringStream* stream) { | 1852 void HLoadKeyed::PrintDataTo(StringStream* stream) { |
| 1853 object()->PrintNameTo(stream); | 1853 if (!is_external()) { |
| 1854 stream->Add("["); | 1854 object()->PrintNameTo(stream); |
| 1855 key()->PrintNameTo(stream); | 1855 stream->Add("["); |
|
danno
2012/10/21 20:44:41
From the above line
mvstanton
2012/10/23 23:44:20
Done.
| |
| 1856 stream->Add("] "); | 1856 key()->PrintNameTo(stream); |
| 1857 dependency()->PrintNameTo(stream); | 1857 stream->Add("] "); |
| 1858 if (RequiresHoleCheck()) { | 1858 dependency()->PrintNameTo(stream); |
| 1859 stream->Add(" check_hole"); | 1859 if (RequiresHoleCheck()) { |
| 1860 stream->Add(" check_hole"); | |
| 1861 } | |
|
danno
2012/10/21 20:44:41
To here can be shared at the end of the routine. R
mvstanton
2012/10/23 23:44:20
Done.
| |
| 1862 } else { | |
| 1863 external_pointer()->PrintNameTo(stream); | |
| 1864 stream->Add("."); | |
| 1865 switch (elements_kind()) { | |
|
Sven Panne
2012/10/22 06:14:18
DBC: Add a new function ElementsKind2String and us
mvstanton
2012/10/23 23:44:20
Good idea, thanks Sven. Now, the string will be di
| |
| 1866 case EXTERNAL_BYTE_ELEMENTS: | |
| 1867 stream->Add("byte"); | |
| 1868 break; | |
| 1869 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | |
| 1870 stream->Add("u_byte"); | |
| 1871 break; | |
| 1872 case EXTERNAL_SHORT_ELEMENTS: | |
| 1873 stream->Add("short"); | |
| 1874 break; | |
| 1875 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | |
| 1876 stream->Add("u_short"); | |
| 1877 break; | |
| 1878 case EXTERNAL_INT_ELEMENTS: | |
| 1879 stream->Add("int"); | |
| 1880 break; | |
| 1881 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | |
| 1882 stream->Add("u_int"); | |
| 1883 break; | |
| 1884 case EXTERNAL_FLOAT_ELEMENTS: | |
| 1885 stream->Add("float"); | |
| 1886 break; | |
| 1887 case EXTERNAL_DOUBLE_ELEMENTS: | |
| 1888 stream->Add("double"); | |
| 1889 break; | |
| 1890 case EXTERNAL_PIXEL_ELEMENTS: | |
| 1891 stream->Add("pixel"); | |
| 1892 break; | |
| 1893 case FAST_ELEMENTS: | |
| 1894 case FAST_SMI_ELEMENTS: | |
| 1895 case FAST_DOUBLE_ELEMENTS: | |
| 1896 case FAST_HOLEY_ELEMENTS: | |
| 1897 case FAST_HOLEY_SMI_ELEMENTS: | |
| 1898 case FAST_HOLEY_DOUBLE_ELEMENTS: | |
| 1899 case DICTIONARY_ELEMENTS: | |
| 1900 case NON_STRICT_ARGUMENTS_ELEMENTS: | |
| 1901 UNREACHABLE(); | |
| 1902 break; | |
| 1903 } | |
| 1904 stream->Add("["); | |
| 1905 key()->PrintNameTo(stream); | |
| 1906 stream->Add("] "); | |
| 1907 dependency()->PrintNameTo(stream); | |
| 1860 } | 1908 } |
| 1861 } | 1909 } |
| 1862 | 1910 |
| 1863 | 1911 |
| 1864 bool HLoadKeyedFastElement::RequiresHoleCheck() const { | 1912 bool HLoadKeyed::RequiresHoleCheck() const { |
| 1865 if (IsFastPackedElementsKind(elements_kind())) { | 1913 if (IsFastPackedElementsKind(elements_kind())) { |
| 1866 return false; | 1914 return false; |
| 1867 } | 1915 } |
| 1868 | 1916 |
| 1917 if (IsFastDoubleElementsKind(elements_kind())) { | |
| 1918 return true; | |
| 1919 } | |
| 1920 | |
| 1869 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { | 1921 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { |
| 1870 HValue* use = it.value(); | 1922 HValue* use = it.value(); |
| 1871 if (!use->IsChange()) return true; | 1923 if (!use->IsChange()) { |
| 1924 return true; | |
| 1925 } | |
| 1872 } | 1926 } |
| 1873 | 1927 |
| 1874 return false; | 1928 return false; |
| 1875 } | 1929 } |
| 1876 | 1930 |
| 1877 | 1931 |
| 1878 void HLoadKeyedFastDoubleElement::PrintDataTo(StringStream* stream) { | |
| 1879 elements()->PrintNameTo(stream); | |
| 1880 stream->Add("["); | |
| 1881 key()->PrintNameTo(stream); | |
| 1882 stream->Add("] "); | |
| 1883 dependency()->PrintNameTo(stream); | |
| 1884 } | |
| 1885 | |
| 1886 | |
| 1887 void HLoadKeyedGeneric::PrintDataTo(StringStream* stream) { | 1932 void HLoadKeyedGeneric::PrintDataTo(StringStream* stream) { |
| 1888 object()->PrintNameTo(stream); | 1933 object()->PrintNameTo(stream); |
| 1889 stream->Add("["); | 1934 stream->Add("["); |
| 1890 key()->PrintNameTo(stream); | 1935 key()->PrintNameTo(stream); |
| 1891 stream->Add("]"); | 1936 stream->Add("]"); |
| 1892 } | 1937 } |
| 1893 | 1938 |
| 1894 | 1939 |
| 1895 HValue* HLoadKeyedGeneric::Canonicalize() { | 1940 HValue* HLoadKeyedGeneric::Canonicalize() { |
| 1896 // Recognize generic keyed loads that use property name generated | 1941 // Recognize generic keyed loads that use property name generated |
| 1897 // by for-in statement as a key and rewrite them into fast property load | 1942 // by for-in statement as a key and rewrite them into fast property load |
| 1898 // by index. | 1943 // by index. |
| 1899 if (key()->IsLoadKeyedFastElement()) { | 1944 if (key()->IsLoadKeyed()) { |
| 1900 HLoadKeyedFastElement* key_load = HLoadKeyedFastElement::cast(key()); | 1945 HLoadKeyed* key_load = HLoadKeyed::cast(key()); |
| 1946 // TODO(mvstanton): before this didn't recognize the fast double case, | |
| 1947 // now it does. Is that okay? Do a test that calls Canonicalize on a | |
| 1948 // fast double HLoadKeyed. | |
|
danno
2012/10/21 20:44:41
Yes, this should be OK
mvstanton
2012/10/23 23:44:20
Done.
| |
| 1901 if (key_load->object()->IsForInCacheArray()) { | 1949 if (key_load->object()->IsForInCacheArray()) { |
| 1902 HForInCacheArray* names_cache = | 1950 HForInCacheArray* names_cache = |
| 1903 HForInCacheArray::cast(key_load->object()); | 1951 HForInCacheArray::cast(key_load->object()); |
| 1904 | 1952 |
| 1905 if (names_cache->enumerable() == object()) { | 1953 if (names_cache->enumerable() == object()) { |
| 1906 HForInCacheArray* index_cache = | 1954 HForInCacheArray* index_cache = |
| 1907 names_cache->index_cache(); | 1955 names_cache->index_cache(); |
| 1908 HCheckMapValue* map_check = | 1956 HCheckMapValue* map_check = |
| 1909 new(block()->zone()) HCheckMapValue(object(), names_cache->map()); | 1957 new(block()->zone()) HCheckMapValue(object(), names_cache->map()); |
| 1910 HInstruction* index = new(block()->zone()) HLoadKeyedFastElement( | 1958 HInstruction* index = new(block()->zone()) HLoadKeyed( |
| 1911 index_cache, | 1959 index_cache, |
| 1912 key_load->key(), | 1960 key_load->key(), |
| 1913 key_load->key()); | 1961 key_load->key(), |
| 1962 key_load->elements_kind(), | |
| 1963 false); | |
| 1914 map_check->InsertBefore(this); | 1964 map_check->InsertBefore(this); |
| 1915 index->InsertBefore(this); | 1965 index->InsertBefore(this); |
| 1916 HLoadFieldByIndex* load = new(block()->zone()) HLoadFieldByIndex( | 1966 HLoadFieldByIndex* load = new(block()->zone()) HLoadFieldByIndex( |
| 1917 object(), index); | 1967 object(), index); |
| 1918 load->InsertBefore(this); | 1968 load->InsertBefore(this); |
| 1919 return load; | 1969 return load; |
| 1920 } | 1970 } |
| 1921 } | 1971 } |
| 1922 } | 1972 } |
| 1923 | 1973 |
| 1924 return this; | 1974 return this; |
| 1925 } | 1975 } |
| 1926 | 1976 |
| 1927 | 1977 |
| 1928 void HLoadKeyedSpecializedArrayElement::PrintDataTo( | |
| 1929 StringStream* stream) { | |
| 1930 external_pointer()->PrintNameTo(stream); | |
| 1931 stream->Add("."); | |
| 1932 switch (elements_kind()) { | |
| 1933 case EXTERNAL_BYTE_ELEMENTS: | |
| 1934 stream->Add("byte"); | |
| 1935 break; | |
| 1936 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | |
| 1937 stream->Add("u_byte"); | |
| 1938 break; | |
| 1939 case EXTERNAL_SHORT_ELEMENTS: | |
| 1940 stream->Add("short"); | |
| 1941 break; | |
| 1942 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | |
| 1943 stream->Add("u_short"); | |
| 1944 break; | |
| 1945 case EXTERNAL_INT_ELEMENTS: | |
| 1946 stream->Add("int"); | |
| 1947 break; | |
| 1948 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | |
| 1949 stream->Add("u_int"); | |
| 1950 break; | |
| 1951 case EXTERNAL_FLOAT_ELEMENTS: | |
| 1952 stream->Add("float"); | |
| 1953 break; | |
| 1954 case EXTERNAL_DOUBLE_ELEMENTS: | |
| 1955 stream->Add("double"); | |
| 1956 break; | |
| 1957 case EXTERNAL_PIXEL_ELEMENTS: | |
| 1958 stream->Add("pixel"); | |
| 1959 break; | |
| 1960 case FAST_ELEMENTS: | |
| 1961 case FAST_SMI_ELEMENTS: | |
| 1962 case FAST_DOUBLE_ELEMENTS: | |
| 1963 case FAST_HOLEY_ELEMENTS: | |
| 1964 case FAST_HOLEY_SMI_ELEMENTS: | |
| 1965 case FAST_HOLEY_DOUBLE_ELEMENTS: | |
| 1966 case DICTIONARY_ELEMENTS: | |
| 1967 case NON_STRICT_ARGUMENTS_ELEMENTS: | |
| 1968 UNREACHABLE(); | |
| 1969 break; | |
| 1970 } | |
| 1971 stream->Add("["); | |
| 1972 key()->PrintNameTo(stream); | |
| 1973 stream->Add("] "); | |
| 1974 dependency()->PrintNameTo(stream); | |
| 1975 } | |
| 1976 | |
| 1977 | |
| 1978 void HStoreNamedGeneric::PrintDataTo(StringStream* stream) { | 1978 void HStoreNamedGeneric::PrintDataTo(StringStream* stream) { |
| 1979 object()->PrintNameTo(stream); | 1979 object()->PrintNameTo(stream); |
| 1980 stream->Add("."); | 1980 stream->Add("."); |
| 1981 ASSERT(name()->IsString()); | 1981 ASSERT(name()->IsString()); |
| 1982 stream->Add(*String::cast(*name())->ToCString()); | 1982 stream->Add(*String::cast(*name())->ToCString()); |
| 1983 stream->Add(" = "); | 1983 stream->Add(" = "); |
| 1984 value()->PrintNameTo(stream); | 1984 value()->PrintNameTo(stream); |
| 1985 } | 1985 } |
| 1986 | 1986 |
| 1987 | 1987 |
| 1988 void HStoreNamedField::PrintDataTo(StringStream* stream) { | 1988 void HStoreNamedField::PrintDataTo(StringStream* stream) { |
| 1989 object()->PrintNameTo(stream); | 1989 object()->PrintNameTo(stream); |
| 1990 stream->Add("."); | 1990 stream->Add("."); |
| 1991 stream->Add(*String::cast(*name())->ToCString()); | 1991 stream->Add(*String::cast(*name())->ToCString()); |
| 1992 stream->Add(" = "); | 1992 stream->Add(" = "); |
| 1993 value()->PrintNameTo(stream); | 1993 value()->PrintNameTo(stream); |
| 1994 stream->Add(" @%d%s", offset(), is_in_object() ? "[in-object]" : ""); | 1994 stream->Add(" @%d%s", offset(), is_in_object() ? "[in-object]" : ""); |
| 1995 if (NeedsWriteBarrier()) { | 1995 if (NeedsWriteBarrier()) { |
| 1996 stream->Add(" (write-barrier)"); | 1996 stream->Add(" (write-barrier)"); |
| 1997 } | 1997 } |
| 1998 if (!transition().is_null()) { | 1998 if (!transition().is_null()) { |
| 1999 stream->Add(" (transition map %p)", *transition()); | 1999 stream->Add(" (transition map %p)", *transition()); |
| 2000 } | 2000 } |
| 2001 } | 2001 } |
| 2002 | 2002 |
| 2003 | 2003 |
| 2004 void HStoreKeyedFastElement::PrintDataTo(StringStream* stream) { | 2004 void HStoreKeyed::PrintDataTo(StringStream* stream) { |
| 2005 object()->PrintNameTo(stream); | 2005 object()->PrintNameTo(stream); |
| 2006 stream->Add("["); | 2006 stream->Add("["); |
| 2007 key()->PrintNameTo(stream); | 2007 key()->PrintNameTo(stream); |
| 2008 stream->Add("] = "); | 2008 stream->Add("] = "); |
| 2009 value()->PrintNameTo(stream); | 2009 value()->PrintNameTo(stream); |
| 2010 | |
| 2011 | |
| 2012 if (!is_external()) { | |
| 2013 object()->PrintNameTo(stream); | |
| 2014 stream->Add("["); | |
|
danno
2012/10/21 20:44:41
Can share from above line...
mvstanton
2012/10/23 23:44:20
Done.
| |
| 2015 key()->PrintNameTo(stream); | |
| 2016 stream->Add("] = "); | |
| 2017 value()->PrintNameTo(stream); | |
|
danno
2012/10/21 20:44:41
...to line above between both external and non-ext
mvstanton
2012/10/23 23:44:20
Done, also fixed duplicate code issue at line 2005
| |
| 2018 } else { | |
| 2019 external_pointer()->PrintNameTo(stream); | |
| 2020 stream->Add("."); | |
| 2021 switch (elements_kind()) { | |
|
Sven Panne
2012/10/22 06:14:18
See my comment above...
mvstanton
2012/10/23 23:44:20
Done.
| |
| 2022 case EXTERNAL_BYTE_ELEMENTS: | |
| 2023 stream->Add("byte"); | |
| 2024 break; | |
| 2025 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | |
| 2026 stream->Add("u_byte"); | |
| 2027 break; | |
| 2028 case EXTERNAL_SHORT_ELEMENTS: | |
| 2029 stream->Add("short"); | |
| 2030 break; | |
| 2031 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | |
| 2032 stream->Add("u_short"); | |
| 2033 break; | |
| 2034 case EXTERNAL_INT_ELEMENTS: | |
| 2035 stream->Add("int"); | |
| 2036 break; | |
| 2037 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | |
| 2038 stream->Add("u_int"); | |
| 2039 break; | |
| 2040 case EXTERNAL_FLOAT_ELEMENTS: | |
| 2041 stream->Add("float"); | |
| 2042 break; | |
| 2043 case EXTERNAL_DOUBLE_ELEMENTS: | |
| 2044 stream->Add("double"); | |
| 2045 break; | |
| 2046 case EXTERNAL_PIXEL_ELEMENTS: | |
| 2047 stream->Add("pixel"); | |
| 2048 break; | |
| 2049 case FAST_SMI_ELEMENTS: | |
| 2050 case FAST_ELEMENTS: | |
| 2051 case FAST_DOUBLE_ELEMENTS: | |
| 2052 case FAST_HOLEY_SMI_ELEMENTS: | |
| 2053 case FAST_HOLEY_ELEMENTS: | |
| 2054 case FAST_HOLEY_DOUBLE_ELEMENTS: | |
| 2055 case DICTIONARY_ELEMENTS: | |
| 2056 case NON_STRICT_ARGUMENTS_ELEMENTS: | |
| 2057 UNREACHABLE(); | |
| 2058 break; | |
| 2059 } | |
| 2060 stream->Add("["); | |
| 2061 key()->PrintNameTo(stream); | |
| 2062 stream->Add("] = "); | |
| 2063 value()->PrintNameTo(stream); | |
| 2064 } | |
| 2010 } | 2065 } |
| 2011 | 2066 |
| 2012 | 2067 |
| 2013 void HStoreKeyedFastDoubleElement::PrintDataTo(StringStream* stream) { | |
| 2014 elements()->PrintNameTo(stream); | |
| 2015 stream->Add("["); | |
| 2016 key()->PrintNameTo(stream); | |
| 2017 stream->Add("] = "); | |
| 2018 value()->PrintNameTo(stream); | |
| 2019 } | |
| 2020 | |
| 2021 | |
| 2022 void HStoreKeyedGeneric::PrintDataTo(StringStream* stream) { | 2068 void HStoreKeyedGeneric::PrintDataTo(StringStream* stream) { |
| 2023 object()->PrintNameTo(stream); | 2069 object()->PrintNameTo(stream); |
| 2024 stream->Add("["); | 2070 stream->Add("["); |
| 2025 key()->PrintNameTo(stream); | 2071 key()->PrintNameTo(stream); |
| 2026 stream->Add("] = "); | 2072 stream->Add("] = "); |
| 2027 value()->PrintNameTo(stream); | 2073 value()->PrintNameTo(stream); |
| 2028 } | 2074 } |
| 2029 | 2075 |
| 2030 | 2076 |
| 2031 void HStoreKeyedSpecializedArrayElement::PrintDataTo( | |
| 2032 StringStream* stream) { | |
| 2033 external_pointer()->PrintNameTo(stream); | |
| 2034 stream->Add("."); | |
| 2035 switch (elements_kind()) { | |
| 2036 case EXTERNAL_BYTE_ELEMENTS: | |
| 2037 stream->Add("byte"); | |
| 2038 break; | |
| 2039 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | |
| 2040 stream->Add("u_byte"); | |
| 2041 break; | |
| 2042 case EXTERNAL_SHORT_ELEMENTS: | |
| 2043 stream->Add("short"); | |
| 2044 break; | |
| 2045 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | |
| 2046 stream->Add("u_short"); | |
| 2047 break; | |
| 2048 case EXTERNAL_INT_ELEMENTS: | |
| 2049 stream->Add("int"); | |
| 2050 break; | |
| 2051 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | |
| 2052 stream->Add("u_int"); | |
| 2053 break; | |
| 2054 case EXTERNAL_FLOAT_ELEMENTS: | |
| 2055 stream->Add("float"); | |
| 2056 break; | |
| 2057 case EXTERNAL_DOUBLE_ELEMENTS: | |
| 2058 stream->Add("double"); | |
| 2059 break; | |
| 2060 case EXTERNAL_PIXEL_ELEMENTS: | |
| 2061 stream->Add("pixel"); | |
| 2062 break; | |
| 2063 case FAST_SMI_ELEMENTS: | |
| 2064 case FAST_ELEMENTS: | |
| 2065 case FAST_DOUBLE_ELEMENTS: | |
| 2066 case FAST_HOLEY_SMI_ELEMENTS: | |
| 2067 case FAST_HOLEY_ELEMENTS: | |
| 2068 case FAST_HOLEY_DOUBLE_ELEMENTS: | |
| 2069 case DICTIONARY_ELEMENTS: | |
| 2070 case NON_STRICT_ARGUMENTS_ELEMENTS: | |
| 2071 UNREACHABLE(); | |
| 2072 break; | |
| 2073 } | |
| 2074 stream->Add("["); | |
| 2075 key()->PrintNameTo(stream); | |
| 2076 stream->Add("] = "); | |
| 2077 value()->PrintNameTo(stream); | |
| 2078 } | |
| 2079 | |
| 2080 | |
| 2081 void HTransitionElementsKind::PrintDataTo(StringStream* stream) { | 2077 void HTransitionElementsKind::PrintDataTo(StringStream* stream) { |
| 2082 object()->PrintNameTo(stream); | 2078 object()->PrintNameTo(stream); |
| 2083 ElementsKind from_kind = original_map()->elements_kind(); | 2079 ElementsKind from_kind = original_map()->elements_kind(); |
| 2084 ElementsKind to_kind = transitioned_map()->elements_kind(); | 2080 ElementsKind to_kind = transitioned_map()->elements_kind(); |
| 2085 stream->Add(" %p [%s] -> %p [%s]", | 2081 stream->Add(" %p [%s] -> %p [%s]", |
| 2086 *original_map(), | 2082 *original_map(), |
| 2087 ElementsAccessor::ForKind(from_kind)->name(), | 2083 ElementsAccessor::ForKind(from_kind)->name(), |
| 2088 *transitioned_map(), | 2084 *transitioned_map(), |
| 2089 ElementsAccessor::ForKind(to_kind)->name()); | 2085 ElementsAccessor::ForKind(to_kind)->name()); |
| 2090 } | 2086 } |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2361 visited->Add(id()); | 2357 visited->Add(id()); |
| 2362 // Propagate to the left argument. If the left argument cannot be -0, then | 2358 // Propagate to the left argument. If the left argument cannot be -0, then |
| 2363 // the result of the sub operation cannot be either. | 2359 // the result of the sub operation cannot be either. |
| 2364 if (range() == NULL || range()->CanBeMinusZero()) { | 2360 if (range() == NULL || range()->CanBeMinusZero()) { |
| 2365 return left(); | 2361 return left(); |
| 2366 } | 2362 } |
| 2367 return NULL; | 2363 return NULL; |
| 2368 } | 2364 } |
| 2369 | 2365 |
| 2370 | 2366 |
| 2371 bool HStoreKeyedFastDoubleElement::NeedsCanonicalization() { | 2367 bool HStoreKeyed::NeedsCanonicalization() { |
| 2372 // If value was loaded from unboxed double backing store or | 2368 // If value was loaded from unboxed double backing store or |
| 2373 // converted from an integer then we don't have to canonicalize it. | 2369 // converted from an integer then we don't have to canonicalize it. |
| 2374 if (value()->IsLoadKeyedFastDoubleElement() || | 2370 if (value()->IsLoadKeyed() || |
| 2375 (value()->IsChange() && HChange::cast(value())->from().IsInteger32())) { | 2371 (value()->IsChange() && HChange::cast(value())->from().IsInteger32())) { |
| 2376 return false; | 2372 return false; |
| 2377 } | 2373 } |
| 2378 return true; | 2374 return true; |
| 2379 } | 2375 } |
| 2380 | 2376 |
| 2381 | 2377 |
| 2382 #define H_CONSTANT_INT32(val) \ | 2378 #define H_CONSTANT_INT32(val) \ |
| 2383 new(zone) HConstant(FACTORY->NewNumberFromInt(val, TENURED), \ | 2379 new(zone) HConstant(FACTORY->NewNumberFromInt(val, TENURED), \ |
| 2384 Representation::Integer32()) | 2380 Representation::Integer32()) |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2634 | 2630 |
| 2635 | 2631 |
| 2636 void HCheckPrototypeMaps::Verify() { | 2632 void HCheckPrototypeMaps::Verify() { |
| 2637 HInstruction::Verify(); | 2633 HInstruction::Verify(); |
| 2638 ASSERT(HasNoUses()); | 2634 ASSERT(HasNoUses()); |
| 2639 } | 2635 } |
| 2640 | 2636 |
| 2641 #endif | 2637 #endif |
| 2642 | 2638 |
| 2643 } } // namespace v8::internal | 2639 } } // namespace v8::internal |
| OLD | NEW |