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

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

Issue 11092090: Inline indexed load and store of typed array float64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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_x64.h ('k') | runtime/vm/flow_graph_optimizer.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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"
11 #include "vm/ast_printer.h" 11 #include "vm/ast_printer.h"
12 #include "vm/il_printer.h" 12 #include "vm/il_printer.h"
13 #include "vm/locations.h" 13 #include "vm/locations.h"
14 #include "vm/object_store.h" 14 #include "vm/object_store.h"
15 #include "vm/parser.h" 15 #include "vm/parser.h"
16 #include "vm/stub_code.h" 16 #include "vm/stub_code.h"
17 #include "vm/symbols.h" 17 #include "vm/symbols.h"
18 18
19 namespace dart { 19 namespace dart {
20 20
21 DECLARE_FLAG(bool, print_ast); 21 DECLARE_FLAG(bool, print_ast);
22 DECLARE_FLAG(bool, print_scopes); 22 DECLARE_FLAG(bool, print_scopes);
23 DECLARE_FLAG(bool, reject_named_argument_as_positional); 23 DECLARE_FLAG(bool, reject_named_argument_as_positional);
24 DECLARE_FLAG(bool, trace_functions); 24 DECLARE_FLAG(bool, trace_functions);
25 DECLARE_FLAG(bool, use_sse41); 25 DECLARE_FLAG(bool, use_sse41);
26 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization."); 26 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization.");
27 27
28 28
29 FieldAddress FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
30 Register array,
31 Register index) {
32 // Note that index is Smi, i.e, times 2.
33 ASSERT(kSmiTagShift == 1);
34 switch (cid) {
35 case kArrayCid:
36 case kImmutableArrayCid:
37 return FieldAddress(array, index, TIMES_4, sizeof(RawArray));
38 case kFloat64ArrayCid:
39 return FieldAddress(array, index, TIMES_4, Float64Array::data_offset());
40 default:
41 UNIMPLEMENTED();
42 return FieldAddress(SPREG, 0);
43 }
44 }
45
46
29 bool FlowGraphCompiler::SupportsUnboxedMints() { 47 bool FlowGraphCompiler::SupportsUnboxedMints() {
30 return false; 48 return false;
31 } 49 }
32 50
33 51
34 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, 52 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler,
35 intptr_t stub_ix) { 53 intptr_t stub_ix) {
36 // Calls do not need stubs, they share a deoptimization trampoline. 54 // Calls do not need stubs, they share a deoptimization trampoline.
37 ASSERT(reason() != kDeoptAtCall); 55 ASSERT(reason() != kDeoptAtCall);
38 Assembler* assem = compiler->assembler(); 56 Assembler* assem = compiler->assembler();
(...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1356 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1339 __ Exchange(mem1, mem2); 1357 __ Exchange(mem1, mem2);
1340 } 1358 }
1341 1359
1342 1360
1343 #undef __ 1361 #undef __
1344 1362
1345 } // namespace dart 1363 } // namespace dart
1346 1364
1347 #endif // defined TARGET_ARCH_X64 1365 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698