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

Side by Side Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 12775009: Optimize TypedData operators [] and []= in the same way as ScalarList. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: ARM/MIPS build, comments, rebased Created 7 years, 9 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 | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/flow_graph_optimizer.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 Register array, 1535 Register array,
1536 Register index) { 1536 Register index) {
1537 return FieldAddress(array, 1537 return FieldAddress(array,
1538 index, 1538 index,
1539 ToScaleFactor(index_scale), 1539 ToScaleFactor(index_scale),
1540 DataOffsetFor(cid)); 1540 DataOffsetFor(cid));
1541 } 1541 }
1542 1542
1543 1543
1544 Address FlowGraphCompiler::ExternalElementAddressForIntIndex( 1544 Address FlowGraphCompiler::ExternalElementAddressForIntIndex(
1545 intptr_t cid,
1546 intptr_t index_scale, 1545 intptr_t index_scale,
1547 Register array, 1546 Register array,
1548 intptr_t index) { 1547 intptr_t index) {
1549 return Address(array, index * index_scale); 1548 return Address(array, index * index_scale);
1550 } 1549 }
1551 1550
1552 1551
1553 Address FlowGraphCompiler::ExternalElementAddressForRegIndex( 1552 Address FlowGraphCompiler::ExternalElementAddressForRegIndex(
1554 intptr_t cid,
1555 intptr_t index_scale, 1553 intptr_t index_scale,
1556 Register array, 1554 Register array,
1557 Register index) { 1555 Register index) {
1558 switch (cid) { 1556 return Address(array, index, ToScaleFactor(index_scale), 0);
1559 case kExternalUint8ArrayCid:
1560 case kExternalUint8ClampedArrayCid:
1561 return Address(array, index, ToScaleFactor(index_scale), 0);
1562 default:
1563 UNIMPLEMENTED();
1564 return Address(SPREG, 0);
1565 }
1566 } 1557 }
1567 1558
1568 1559
1569 #undef __ 1560 #undef __
1570 #define __ compiler_->assembler()-> 1561 #define __ compiler_->assembler()->
1571 1562
1572 1563
1573 void ParallelMoveResolver::EmitMove(int index) { 1564 void ParallelMoveResolver::EmitMove(int index) {
1574 MoveOperands* move = moves_[index]; 1565 MoveOperands* move = moves_[index];
1575 const Location source = move->src(); 1566 const Location source = move->src();
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1686 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1696 __ Exchange(mem1, mem2); 1687 __ Exchange(mem1, mem2);
1697 } 1688 }
1698 1689
1699 1690
1700 #undef __ 1691 #undef __
1701 1692
1702 } // namespace dart 1693 } // namespace dart
1703 1694
1704 #endif // defined TARGET_ARCH_X64 1695 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698