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

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

Issue 1731743003: Move precompilation-related flags to flags list. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: make print_stop_message default false to fix build Created 4 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
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
11 #include "vm/dart_entry.h" 11 #include "vm/dart_entry.h"
12 #include "vm/flow_graph.h" 12 #include "vm/flow_graph.h"
13 #include "vm/flow_graph_compiler.h" 13 #include "vm/flow_graph_compiler.h"
14 #include "vm/flow_graph_range_analysis.h" 14 #include "vm/flow_graph_range_analysis.h"
15 #include "vm/locations.h" 15 #include "vm/locations.h"
16 #include "vm/object_store.h" 16 #include "vm/object_store.h"
17 #include "vm/parser.h" 17 #include "vm/parser.h"
18 #include "vm/simulator.h" 18 #include "vm/simulator.h"
19 #include "vm/stack_frame.h" 19 #include "vm/stack_frame.h"
20 #include "vm/stub_code.h" 20 #include "vm/stub_code.h"
21 #include "vm/symbols.h" 21 #include "vm/symbols.h"
22 22
23 #define __ compiler->assembler()-> 23 #define __ compiler->assembler()->
24 24
25 namespace dart { 25 namespace dart {
26 26
27 DECLARE_FLAG(bool, allow_absolute_addresses);
28 DECLARE_FLAG(bool, emit_edge_counters);
29 DECLARE_FLAG(int, optimization_counter_threshold);
30 DECLARE_FLAG(bool, precompilation);
31 DECLARE_FLAG(bool, use_osr);
32
33 // Generic summary for call instructions that have all arguments pushed 27 // Generic summary for call instructions that have all arguments pushed
34 // on the stack and return the result in a fixed register R0. 28 // on the stack and return the result in a fixed register R0.
35 LocationSummary* Instruction::MakeCallSummary(Zone* zone) { 29 LocationSummary* Instruction::MakeCallSummary(Zone* zone) {
36 LocationSummary* result = new(zone) LocationSummary( 30 LocationSummary* result = new(zone) LocationSummary(
37 zone, 0, 0, LocationSummary::kCall); 31 zone, 0, 0, LocationSummary::kCall);
38 result->set_out(0, Location::RegisterLocation(R0)); 32 result->set_out(0, Location::RegisterLocation(R0));
39 return result; 33 return result;
40 } 34 }
41 35
42 36
(...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 2088
2095 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2089 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2096 const Register kLengthReg = R2; 2090 const Register kLengthReg = R2;
2097 const Register kElemTypeReg = R1; 2091 const Register kElemTypeReg = R1;
2098 const Register kResultReg = R0; 2092 const Register kResultReg = R0;
2099 2093
2100 ASSERT(locs()->in(kElementTypePos).reg() == kElemTypeReg); 2094 ASSERT(locs()->in(kElementTypePos).reg() == kElemTypeReg);
2101 ASSERT(locs()->in(kLengthPos).reg() == kLengthReg); 2095 ASSERT(locs()->in(kLengthPos).reg() == kLengthReg);
2102 2096
2103 if (compiler->is_optimizing() && 2097 if (compiler->is_optimizing() &&
2104 !FLAG_precompilation && 2098 !FLAG_precompiled_mode &&
2105 num_elements()->BindsToConstant() && 2099 num_elements()->BindsToConstant() &&
2106 num_elements()->BoundConstant().IsSmi()) { 2100 num_elements()->BoundConstant().IsSmi()) {
2107 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value(); 2101 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value();
2108 if ((length >= 0) && (length <= Array::kMaxElements)) { 2102 if ((length >= 0) && (length <= Array::kMaxElements)) {
2109 Label slow_path, done; 2103 Label slow_path, done;
2110 InlineArrayAllocation(compiler, length, &slow_path, &done); 2104 InlineArrayAllocation(compiler, length, &slow_path, &done);
2111 __ Bind(&slow_path); 2105 __ Bind(&slow_path);
2112 __ PushObject(Object::null_object()); // Make room for the result. 2106 __ PushObject(Object::null_object()); // Make room for the result.
2113 __ Push(kLengthReg); // length. 2107 __ Push(kLengthReg); // length.
2114 __ Push(kElemTypeReg); 2108 __ Push(kElemTypeReg);
(...skipping 3472 matching lines...) Expand 10 before | Expand all | Expand 10 after
5587 1, 5581 1,
5588 locs()); 5582 locs());
5589 __ Drop(1); 5583 __ Drop(1);
5590 __ Pop(result); 5584 __ Pop(result);
5591 } 5585 }
5592 5586
5593 5587
5594 } // namespace dart 5588 } // namespace dart
5595 5589
5596 #endif // defined TARGET_ARCH_ARM64 5590 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698