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

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: ia32 working 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
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 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 return DefineAsRegister(new LJSArrayLength(array)); 1530 return DefineAsRegister(new LJSArrayLength(array));
1531 } 1531 }
1532 1532
1533 1533
1534 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { 1534 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
1535 LOperand* array = UseRegisterAtStart(instr->value()); 1535 LOperand* array = UseRegisterAtStart(instr->value());
1536 return DefineAsRegister(new LFixedArrayLength(array)); 1536 return DefineAsRegister(new LFixedArrayLength(array));
1537 } 1537 }
1538 1538
1539 1539
1540 LInstruction* LChunkBuilder::DoPixelArrayLength(HPixelArrayLength* instr) {
1541 LOperand* array = UseRegisterAtStart(instr->value());
1542 return DefineAsRegister(new LPixelArrayLength(array));
1543 }
1544
1545
1540 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { 1546 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
1541 LOperand* object = UseRegister(instr->value()); 1547 LOperand* object = UseRegister(instr->value());
1542 LValueOf* result = new LValueOf(object, TempRegister()); 1548 LValueOf* result = new LValueOf(object, TempRegister());
1543 return AssignEnvironment(DefineSameAsFirst(result)); 1549 return AssignEnvironment(DefineSameAsFirst(result));
1544 } 1550 }
1545 1551
1546 1552
1547 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { 1553 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
1548 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()), 1554 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()),
1549 Use(instr->length()))); 1555 Use(instr->length())));
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1744 TempRegister()))); 1750 TempRegister())));
1745 } 1751 }
1746 1752
1747 1753
1748 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { 1754 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) {
1749 LOperand* input = UseRegisterAtStart(instr->value()); 1755 LOperand* input = UseRegisterAtStart(instr->value());
1750 return DefineSameAsFirst(new LLoadElements(input)); 1756 return DefineSameAsFirst(new LLoadElements(input));
1751 } 1757 }
1752 1758
1753 1759
1760 LInstruction* LChunkBuilder::DoLoadPixelArrayExternalPointer(
1761 HLoadPixelArrayExternalPointer* instr) {
1762 LOperand* input = UseRegisterAtStart(instr->value());
1763 return DefineSameAsFirst(new LLoadPixelArrayExternalPointer(input));
Kevin Millikin (Chromium) 2011/02/07 12:39:08 It's not obvious why this is DefineSameAsFirst and
danno 2011/02/08 09:25:57 Done.
1764 }
1765
1766
1754 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( 1767 LInstruction* LChunkBuilder::DoLoadKeyedFastElement(
1755 HLoadKeyedFastElement* instr) { 1768 HLoadKeyedFastElement* instr) {
1756 ASSERT(instr->representation().IsTagged()); 1769 ASSERT(instr->representation().IsTagged());
1757 ASSERT(instr->key()->representation().IsInteger32()); 1770 ASSERT(instr->key()->representation().IsInteger32());
1758 LOperand* obj = UseRegisterAtStart(instr->object()); 1771 LOperand* obj = UseRegisterAtStart(instr->object());
1759 LOperand* key = UseRegisterAtStart(instr->key()); 1772 LOperand* key = UseRegisterAtStart(instr->key());
1760 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); 1773 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
1761 return AssignEnvironment(DefineSameAsFirst(result)); 1774 return AssignEnvironment(DefineSameAsFirst(result));
1762 } 1775 }
1763 1776
1764 1777
1778 LInstruction* LChunkBuilder::DoLoadPixelArrayElement(
1779 HLoadPixelArrayElement* instr) {
1780 ASSERT(instr->representation().IsInteger32());
1781 ASSERT(instr->key()->representation().IsInteger32());
1782 LOperand* pa = UseRegisterAtStart(instr->external_pointer());
Mads Ager (chromium) 2011/02/07 11:36:06 pa -> external_pointer?
danno 2011/02/08 09:25:57 Done.
1783 LOperand* key = UseRegisterAtStart(instr->key());
1784 LLoadPixelArrayElement* result = new LLoadPixelArrayElement(pa, key);
1785 return AssignEnvironment(DefineSameAsFirst(result));
Kevin Millikin (Chromium) 2011/02/07 12:39:08 Does this need the environment?
danno 2011/02/08 09:25:57 Done.
1786 }
1787
1788
1765 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 1789 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
1766 LOperand* object = UseFixed(instr->object(), edx); 1790 LOperand* object = UseFixed(instr->object(), edx);
1767 LOperand* key = UseFixed(instr->key(), eax); 1791 LOperand* key = UseFixed(instr->key(), eax);
1768 1792
1769 LLoadKeyedGeneric* result = new LLoadKeyedGeneric(object, key); 1793 LLoadKeyedGeneric* result = new LLoadKeyedGeneric(object, key);
1770 return MarkAsCall(DefineFixed(result, eax), instr); 1794 return MarkAsCall(DefineFixed(result, eax), instr);
1771 } 1795 }
1772 1796
1773 1797
1774 LInstruction* LChunkBuilder::DoStoreKeyedFastElement( 1798 LInstruction* LChunkBuilder::DoStoreKeyedFastElement(
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2003 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1980 HEnvironment* outer = current_block_->last_environment()->outer(); 2004 HEnvironment* outer = current_block_->last_environment()->outer();
1981 current_block_->UpdateEnvironment(outer); 2005 current_block_->UpdateEnvironment(outer);
1982 return NULL; 2006 return NULL;
1983 } 2007 }
1984 2008
1985 2009
1986 } } // namespace v8::internal 2010 } } // namespace v8::internal
1987 2011
1988 #endif // V8_TARGET_ARCH_IA32 2012 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/hydrogen-instructions.h ('K') | « src/ia32/lithium-ia32.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698