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

Side by Side Diff: src/ia32/lithium-ia32.cc

Issue 6410112: Implement crankshaft support for pixel array loads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: merge with latest Created 9 years, 10 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/ia32/lithium-ia32.h ('k') | src/objects.h » ('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 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 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 return DefineAsRegister(new LJSArrayLength(array)); 1543 return DefineAsRegister(new LJSArrayLength(array));
1544 } 1544 }
1545 1545
1546 1546
1547 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { 1547 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
1548 LOperand* array = UseRegisterAtStart(instr->value()); 1548 LOperand* array = UseRegisterAtStart(instr->value());
1549 return DefineAsRegister(new LFixedArrayLength(array)); 1549 return DefineAsRegister(new LFixedArrayLength(array));
1550 } 1550 }
1551 1551
1552 1552
1553 LInstruction* LChunkBuilder::DoPixelArrayLength(HPixelArrayLength* instr) {
1554 LOperand* array = UseRegisterAtStart(instr->value());
1555 return DefineAsRegister(new LPixelArrayLength(array));
1556 }
1557
1558
1553 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { 1559 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
1554 LOperand* object = UseRegister(instr->value()); 1560 LOperand* object = UseRegister(instr->value());
1555 LValueOf* result = new LValueOf(object, TempRegister()); 1561 LValueOf* result = new LValueOf(object, TempRegister());
1556 return AssignEnvironment(DefineSameAsFirst(result)); 1562 return AssignEnvironment(DefineSameAsFirst(result));
1557 } 1563 }
1558 1564
1559 1565
1560 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { 1566 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
1561 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()), 1567 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()),
1562 Use(instr->length()))); 1568 Use(instr->length())));
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 1762 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
1757 HLoadFunctionPrototype* instr) { 1763 HLoadFunctionPrototype* instr) {
1758 return AssignEnvironment(DefineAsRegister( 1764 return AssignEnvironment(DefineAsRegister(
1759 new LLoadFunctionPrototype(UseRegister(instr->function()), 1765 new LLoadFunctionPrototype(UseRegister(instr->function()),
1760 TempRegister()))); 1766 TempRegister())));
1761 } 1767 }
1762 1768
1763 1769
1764 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { 1770 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) {
1765 LOperand* input = UseRegisterAtStart(instr->value()); 1771 LOperand* input = UseRegisterAtStart(instr->value());
1766 return DefineSameAsFirst(new LLoadElements(input)); 1772 return DefineAsRegister(new LLoadElements(input));
1767 } 1773 }
1768 1774
1769 1775
1776 LInstruction* LChunkBuilder::DoLoadPixelArrayExternalPointer(
1777 HLoadPixelArrayExternalPointer* instr) {
1778 LOperand* input = UseRegisterAtStart(instr->value());
1779 return DefineAsRegister(new LLoadPixelArrayExternalPointer(input));
1780 }
1781
1782
1770 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( 1783 LInstruction* LChunkBuilder::DoLoadKeyedFastElement(
1771 HLoadKeyedFastElement* instr) { 1784 HLoadKeyedFastElement* instr) {
1772 ASSERT(instr->representation().IsTagged()); 1785 ASSERT(instr->representation().IsTagged());
1773 ASSERT(instr->key()->representation().IsInteger32()); 1786 ASSERT(instr->key()->representation().IsInteger32());
1774 LOperand* obj = UseRegisterAtStart(instr->object()); 1787 LOperand* obj = UseRegisterAtStart(instr->object());
1775 LOperand* key = UseRegisterAtStart(instr->key()); 1788 LOperand* key = UseRegisterAtStart(instr->key());
1776 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); 1789 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
1777 return AssignEnvironment(DefineSameAsFirst(result)); 1790 return AssignEnvironment(DefineSameAsFirst(result));
1778 } 1791 }
1779 1792
1780 1793
1794 LInstruction* LChunkBuilder::DoLoadPixelArrayElement(
1795 HLoadPixelArrayElement* instr) {
1796 ASSERT(instr->representation().IsInteger32());
1797 ASSERT(instr->key()->representation().IsInteger32());
1798 LOperand* external_pointer =
1799 UseRegisterAtStart(instr->external_pointer());
1800 LOperand* key = UseRegisterAtStart(instr->key());
1801 LLoadPixelArrayElement* result =
1802 new LLoadPixelArrayElement(external_pointer, key);
1803 return DefineSameAsFirst(result);
1804 }
1805
1806
1781 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 1807 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
1782 LOperand* context = UseFixed(instr->context(), esi); 1808 LOperand* context = UseFixed(instr->context(), esi);
1783 LOperand* object = UseFixed(instr->object(), edx); 1809 LOperand* object = UseFixed(instr->object(), edx);
1784 LOperand* key = UseFixed(instr->key(), eax); 1810 LOperand* key = UseFixed(instr->key(), eax);
1785 1811
1786 LLoadKeyedGeneric* result = new LLoadKeyedGeneric(context, object, key); 1812 LLoadKeyedGeneric* result = new LLoadKeyedGeneric(context, object, key);
1787 return MarkAsCall(DefineFixed(result, eax), instr); 1813 return MarkAsCall(DefineFixed(result, eax), instr);
1788 } 1814 }
1789 1815
1790 1816
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
2009 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2035 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2010 HEnvironment* outer = current_block_->last_environment()->outer(); 2036 HEnvironment* outer = current_block_->last_environment()->outer();
2011 current_block_->UpdateEnvironment(outer); 2037 current_block_->UpdateEnvironment(outer);
2012 return NULL; 2038 return NULL;
2013 } 2039 }
2014 2040
2015 2041
2016 } } // namespace v8::internal 2042 } } // namespace v8::internal
2017 2043
2018 #endif // V8_TARGET_ARCH_IA32 2044 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698