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

Side by Side Diff: src/x64/lithium-x64.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/x64/lithium-x64.h ('k') | test/cctest/test-api.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 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 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 return DefineAsRegister(new LJSArrayLength(array)); 1435 return DefineAsRegister(new LJSArrayLength(array));
1436 } 1436 }
1437 1437
1438 1438
1439 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { 1439 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
1440 LOperand* array = UseRegisterAtStart(instr->value()); 1440 LOperand* array = UseRegisterAtStart(instr->value());
1441 return DefineAsRegister(new LFixedArrayLength(array)); 1441 return DefineAsRegister(new LFixedArrayLength(array));
1442 } 1442 }
1443 1443
1444 1444
1445 LInstruction* LChunkBuilder::DoPixelArrayLength(HPixelArrayLength* instr) {
1446 LOperand* array = UseRegisterAtStart(instr->value());
1447 return DefineAsRegister(new LPixelArrayLength(array));
1448 }
1449
1450
1445 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { 1451 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
1446 Abort("Unimplemented: %s", "DoValueOf"); 1452 Abort("Unimplemented: %s", "DoValueOf");
1447 return NULL; 1453 return NULL;
1448 } 1454 }
1449 1455
1450 1456
1451 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { 1457 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
1452 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()), 1458 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()),
1453 Use(instr->length()))); 1459 Use(instr->length())));
1454 } 1460 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 1637
1632 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 1638 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
1633 HLoadFunctionPrototype* instr) { 1639 HLoadFunctionPrototype* instr) {
1634 Abort("Unimplemented: %s", "DoLoadFunctionPrototype"); 1640 Abort("Unimplemented: %s", "DoLoadFunctionPrototype");
1635 return NULL; 1641 return NULL;
1636 } 1642 }
1637 1643
1638 1644
1639 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { 1645 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) {
1640 LOperand* input = UseRegisterAtStart(instr->value()); 1646 LOperand* input = UseRegisterAtStart(instr->value());
1641 return DefineSameAsFirst(new LLoadElements(input)); 1647 return DefineAsRegister(new LLoadElements(input));
1642 } 1648 }
1643 1649
1644 1650
1651 LInstruction* LChunkBuilder::DoLoadPixelArrayExternalPointer(
1652 HLoadPixelArrayExternalPointer* instr) {
1653 LOperand* input = UseRegisterAtStart(instr->value());
1654 return DefineAsRegister(new LLoadPixelArrayExternalPointer(input));
1655 }
1656
1657
1645 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( 1658 LInstruction* LChunkBuilder::DoLoadKeyedFastElement(
1646 HLoadKeyedFastElement* instr) { 1659 HLoadKeyedFastElement* instr) {
1647 ASSERT(instr->representation().IsTagged()); 1660 ASSERT(instr->representation().IsTagged());
1648 ASSERT(instr->key()->representation().IsInteger32()); 1661 ASSERT(instr->key()->representation().IsInteger32());
1649 LOperand* obj = UseRegisterAtStart(instr->object()); 1662 LOperand* obj = UseRegisterAtStart(instr->object());
1650 LOperand* key = UseRegisterAtStart(instr->key()); 1663 LOperand* key = UseRegisterAtStart(instr->key());
1651 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); 1664 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
1652 return AssignEnvironment(DefineSameAsFirst(result)); 1665 return AssignEnvironment(DefineSameAsFirst(result));
1653 } 1666 }
1654 1667
1655 1668
1669 LInstruction* LChunkBuilder::DoLoadPixelArrayElement(
1670 HLoadPixelArrayElement* instr) {
1671 ASSERT(instr->representation().IsInteger32());
1672 ASSERT(instr->key()->representation().IsInteger32());
1673 LOperand* external_pointer =
1674 UseRegisterAtStart(instr->external_pointer());
1675 LOperand* key = UseRegisterAtStart(instr->key());
1676 LLoadPixelArrayElement* result =
1677 new LLoadPixelArrayElement(external_pointer, key);
1678 return DefineSameAsFirst(result);
1679 }
1680
1681
1656 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 1682 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
1657 Abort("Unimplemented: %s", "DoLoadKeyedGeneric"); 1683 Abort("Unimplemented: %s", "DoLoadKeyedGeneric");
1658 return NULL; 1684 return NULL;
1659 } 1685 }
1660 1686
1661 1687
1662 LInstruction* LChunkBuilder::DoStoreKeyedFastElement( 1688 LInstruction* LChunkBuilder::DoStoreKeyedFastElement(
1663 HStoreKeyedFastElement* instr) { 1689 HStoreKeyedFastElement* instr) {
1664 bool needs_write_barrier = instr->NeedsWriteBarrier(); 1690 bool needs_write_barrier = instr->NeedsWriteBarrier();
1665 ASSERT(instr->value()->representation().IsTagged()); 1691 ASSERT(instr->value()->representation().IsTagged());
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1854 1880
1855 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1881 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1856 HEnvironment* outer = current_block_->last_environment()->outer(); 1882 HEnvironment* outer = current_block_->last_environment()->outer();
1857 current_block_->UpdateEnvironment(outer); 1883 current_block_->UpdateEnvironment(outer);
1858 return NULL; 1884 return NULL;
1859 } 1885 }
1860 1886
1861 } } // namespace v8::internal 1887 } } // namespace v8::internal
1862 1888
1863 #endif // V8_TARGET_ARCH_X64 1889 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698