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

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

Issue 10170030: Implement tracking and optimizations of packed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 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') | src/ia32/builtins-ia32.cc » ('j') | 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 // 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 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 stream->Add("."); 1678 stream->Add(".");
1679 stream->Add(*String::cast(*name())->ToCString()); 1679 stream->Add(*String::cast(*name())->ToCString());
1680 } 1680 }
1681 1681
1682 1682
1683 void HLoadKeyedFastElement::PrintDataTo(StringStream* stream) { 1683 void HLoadKeyedFastElement::PrintDataTo(StringStream* stream) {
1684 object()->PrintNameTo(stream); 1684 object()->PrintNameTo(stream);
1685 stream->Add("["); 1685 stream->Add("[");
1686 key()->PrintNameTo(stream); 1686 key()->PrintNameTo(stream);
1687 stream->Add("]"); 1687 stream->Add("]");
1688 if (hole_check_mode_ == PERFORM_HOLE_CHECK) {
1689 stream->Add(" check_hole");
1690 }
1688 } 1691 }
1689 1692
1690 1693
1691 bool HLoadKeyedFastElement::RequiresHoleCheck() { 1694 bool HLoadKeyedFastElement::RequiresHoleCheck() {
1692 if (hole_check_mode_ == OMIT_HOLE_CHECK) { 1695 if (hole_check_mode_ == OMIT_HOLE_CHECK) {
1693 return false; 1696 return false;
1694 } 1697 }
1695 1698
1696 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { 1699 for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
1697 HValue* use = it.value(); 1700 HValue* use = it.value();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 HForInCacheArray::cast(key_load->object()); 1732 HForInCacheArray::cast(key_load->object());
1730 1733
1731 if (names_cache->enumerable() == object()) { 1734 if (names_cache->enumerable() == object()) {
1732 HForInCacheArray* index_cache = 1735 HForInCacheArray* index_cache =
1733 names_cache->index_cache(); 1736 names_cache->index_cache();
1734 HCheckMapValue* map_check = 1737 HCheckMapValue* map_check =
1735 new(block()->zone()) HCheckMapValue(object(), names_cache->map()); 1738 new(block()->zone()) HCheckMapValue(object(), names_cache->map());
1736 HInstruction* index = new(block()->zone()) HLoadKeyedFastElement( 1739 HInstruction* index = new(block()->zone()) HLoadKeyedFastElement(
1737 index_cache, 1740 index_cache,
1738 key_load->key(), 1741 key_load->key(),
1739 HLoadKeyedFastElement::OMIT_HOLE_CHECK); 1742 OMIT_HOLE_CHECK);
1740 HLoadFieldByIndex* load = new(block()->zone()) HLoadFieldByIndex( 1743 HLoadFieldByIndex* load = new(block()->zone()) HLoadFieldByIndex(
1741 object(), index); 1744 object(), index);
1742 map_check->InsertBefore(this); 1745 map_check->InsertBefore(this);
1743 index->InsertBefore(this); 1746 index->InsertBefore(this);
1744 load->InsertBefore(this); 1747 load->InsertBefore(this);
1745 return load; 1748 return load;
1746 } 1749 }
1747 } 1750 }
1748 } 1751 }
1749 1752
(...skipping 27 matching lines...) Expand all
1777 case EXTERNAL_FLOAT_ELEMENTS: 1780 case EXTERNAL_FLOAT_ELEMENTS:
1778 stream->Add("float"); 1781 stream->Add("float");
1779 break; 1782 break;
1780 case EXTERNAL_DOUBLE_ELEMENTS: 1783 case EXTERNAL_DOUBLE_ELEMENTS:
1781 stream->Add("double"); 1784 stream->Add("double");
1782 break; 1785 break;
1783 case EXTERNAL_PIXEL_ELEMENTS: 1786 case EXTERNAL_PIXEL_ELEMENTS:
1784 stream->Add("pixel"); 1787 stream->Add("pixel");
1785 break; 1788 break;
1786 case FAST_ELEMENTS: 1789 case FAST_ELEMENTS:
1787 case FAST_SMI_ONLY_ELEMENTS: 1790 case FAST_SMI_ELEMENTS:
1788 case FAST_DOUBLE_ELEMENTS: 1791 case FAST_DOUBLE_ELEMENTS:
1792 case FAST_HOLEY_ELEMENTS:
1793 case FAST_HOLEY_SMI_ELEMENTS:
1794 case FAST_HOLEY_DOUBLE_ELEMENTS:
1789 case DICTIONARY_ELEMENTS: 1795 case DICTIONARY_ELEMENTS:
1790 case NON_STRICT_ARGUMENTS_ELEMENTS: 1796 case NON_STRICT_ARGUMENTS_ELEMENTS:
1791 UNREACHABLE(); 1797 UNREACHABLE();
1792 break; 1798 break;
1793 } 1799 }
1794 stream->Add("["); 1800 stream->Add("[");
1795 key()->PrintNameTo(stream); 1801 key()->PrintNameTo(stream);
1796 stream->Add("]"); 1802 stream->Add("]");
1797 } 1803 }
1798 1804
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 break; 1881 break;
1876 case EXTERNAL_FLOAT_ELEMENTS: 1882 case EXTERNAL_FLOAT_ELEMENTS:
1877 stream->Add("float"); 1883 stream->Add("float");
1878 break; 1884 break;
1879 case EXTERNAL_DOUBLE_ELEMENTS: 1885 case EXTERNAL_DOUBLE_ELEMENTS:
1880 stream->Add("double"); 1886 stream->Add("double");
1881 break; 1887 break;
1882 case EXTERNAL_PIXEL_ELEMENTS: 1888 case EXTERNAL_PIXEL_ELEMENTS:
1883 stream->Add("pixel"); 1889 stream->Add("pixel");
1884 break; 1890 break;
1885 case FAST_SMI_ONLY_ELEMENTS: 1891 case FAST_SMI_ELEMENTS:
1886 case FAST_ELEMENTS: 1892 case FAST_ELEMENTS:
1887 case FAST_DOUBLE_ELEMENTS: 1893 case FAST_DOUBLE_ELEMENTS:
1894 case FAST_HOLEY_SMI_ELEMENTS:
1895 case FAST_HOLEY_ELEMENTS:
1896 case FAST_HOLEY_DOUBLE_ELEMENTS:
1888 case DICTIONARY_ELEMENTS: 1897 case DICTIONARY_ELEMENTS:
1889 case NON_STRICT_ARGUMENTS_ELEMENTS: 1898 case NON_STRICT_ARGUMENTS_ELEMENTS:
1890 UNREACHABLE(); 1899 UNREACHABLE();
1891 break; 1900 break;
1892 } 1901 }
1893 stream->Add("["); 1902 stream->Add("[");
1894 key()->PrintNameTo(stream); 1903 key()->PrintNameTo(stream);
1895 stream->Add("] = "); 1904 stream->Add("] = ");
1896 value()->PrintNameTo(stream); 1905 value()->PrintNameTo(stream);
1897 } 1906 }
1898 1907
1899 1908
1900 void HTransitionElementsKind::PrintDataTo(StringStream* stream) { 1909 void HTransitionElementsKind::PrintDataTo(StringStream* stream) {
1901 object()->PrintNameTo(stream); 1910 object()->PrintNameTo(stream);
1902 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); 1911 ElementsKind from_kind = original_map()->elements_kind();
1912 ElementsKind to_kind = transitioned_map()->elements_kind();
1913 stream->Add(" %p [%s] -> %p [%s]",
1914 *original_map(),
1915 ElementsAccessor::ForKind(from_kind)->name(),
1916 *transitioned_map(),
1917 ElementsAccessor::ForKind(to_kind)->name());
1903 } 1918 }
1904 1919
1905 1920
1906 void HLoadGlobalCell::PrintDataTo(StringStream* stream) { 1921 void HLoadGlobalCell::PrintDataTo(StringStream* stream) {
1907 stream->Add("[%p]", *cell()); 1922 stream->Add("[%p]", *cell());
1908 if (!details_.IsDontDelete()) stream->Add(" (deleteable)"); 1923 if (!details_.IsDontDelete()) stream->Add(" (deleteable)");
1909 if (details_.IsReadOnly()) stream->Add(" (read-only)"); 1924 if (details_.IsReadOnly()) stream->Add(" (read-only)");
1910 } 1925 }
1911 1926
1912 1927
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 2451
2437 2452
2438 void HCheckPrototypeMaps::Verify() { 2453 void HCheckPrototypeMaps::Verify() {
2439 HInstruction::Verify(); 2454 HInstruction::Verify();
2440 ASSERT(HasNoUses()); 2455 ASSERT(HasNoUses());
2441 } 2456 }
2442 2457
2443 #endif 2458 #endif
2444 2459
2445 } } // namespace v8::internal 2460 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698