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

Side by Side Diff: runtime/vm/intermediate_language_arm.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, 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
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_arm64.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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/cpu.h" 11 #include "vm/cpu.h"
12 #include "vm/dart_entry.h" 12 #include "vm/dart_entry.h"
13 #include "vm/flow_graph.h" 13 #include "vm/flow_graph.h"
14 #include "vm/flow_graph_compiler.h" 14 #include "vm/flow_graph_compiler.h"
15 #include "vm/flow_graph_range_analysis.h" 15 #include "vm/flow_graph_range_analysis.h"
16 #include "vm/locations.h" 16 #include "vm/locations.h"
17 #include "vm/object_store.h" 17 #include "vm/object_store.h"
18 #include "vm/parser.h" 18 #include "vm/parser.h"
19 #include "vm/simulator.h" 19 #include "vm/simulator.h"
20 #include "vm/stack_frame.h" 20 #include "vm/stack_frame.h"
21 #include "vm/stub_code.h" 21 #include "vm/stub_code.h"
22 #include "vm/symbols.h" 22 #include "vm/symbols.h"
23 23
24 #define __ compiler->assembler()-> 24 #define __ compiler->assembler()->
25 25
26 namespace dart { 26 namespace dart {
27 27
28 DECLARE_FLAG(bool, allow_absolute_addresses);
29 DECLARE_FLAG(bool, emit_edge_counters);
30 DECLARE_FLAG(int, optimization_counter_threshold);
31 DECLARE_FLAG(bool, precompilation);
32 DECLARE_FLAG(bool, use_osr);
33
34 // Generic summary for call instructions that have all arguments pushed 28 // Generic summary for call instructions that have all arguments pushed
35 // on the stack and return the result in a fixed register R0. 29 // on the stack and return the result in a fixed register R0.
36 LocationSummary* Instruction::MakeCallSummary(Zone* zone) { 30 LocationSummary* Instruction::MakeCallSummary(Zone* zone) {
37 LocationSummary* result = new(zone) LocationSummary( 31 LocationSummary* result = new(zone) LocationSummary(
38 zone, 0, 0, LocationSummary::kCall); 32 zone, 0, 0, LocationSummary::kCall);
39 result->set_out(0, Location::RegisterLocation(R0)); 33 result->set_out(0, Location::RegisterLocation(R0));
40 return result; 34 return result;
41 } 35 }
42 36
43 37
(...skipping 2327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2371 2365
2372 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2366 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2373 const Register kLengthReg = R2; 2367 const Register kLengthReg = R2;
2374 const Register kElemTypeReg = R1; 2368 const Register kElemTypeReg = R1;
2375 const Register kResultReg = R0; 2369 const Register kResultReg = R0;
2376 2370
2377 ASSERT(locs()->in(kElementTypePos).reg() == kElemTypeReg); 2371 ASSERT(locs()->in(kElementTypePos).reg() == kElemTypeReg);
2378 ASSERT(locs()->in(kLengthPos).reg() == kLengthReg); 2372 ASSERT(locs()->in(kLengthPos).reg() == kLengthReg);
2379 2373
2380 if (compiler->is_optimizing() && 2374 if (compiler->is_optimizing() &&
2381 !FLAG_precompilation && 2375 !FLAG_precompiled_mode &&
2382 num_elements()->BindsToConstant() && 2376 num_elements()->BindsToConstant() &&
2383 num_elements()->BoundConstant().IsSmi()) { 2377 num_elements()->BoundConstant().IsSmi()) {
2384 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value(); 2378 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value();
2385 if ((length >= 0) && (length <= Array::kMaxElements)) { 2379 if ((length >= 0) && (length <= Array::kMaxElements)) {
2386 Label slow_path, done; 2380 Label slow_path, done;
2387 InlineArrayAllocation(compiler, length, &slow_path, &done); 2381 InlineArrayAllocation(compiler, length, &slow_path, &done);
2388 __ Bind(&slow_path); 2382 __ Bind(&slow_path);
2389 __ PushObject(Object::null_object()); // Make room for the result. 2383 __ PushObject(Object::null_object()); // Make room for the result.
2390 __ Push(kLengthReg); // length. 2384 __ Push(kLengthReg); // length.
2391 __ Push(kElemTypeReg); 2385 __ Push(kElemTypeReg);
(...skipping 4437 matching lines...) Expand 10 before | Expand all | Expand 10 after
6829 1, 6823 1,
6830 locs()); 6824 locs());
6831 __ Drop(1); 6825 __ Drop(1);
6832 __ Pop(result); 6826 __ Pop(result);
6833 } 6827 }
6834 6828
6835 6829
6836 } // namespace dart 6830 } // namespace dart
6837 6831
6838 #endif // defined TARGET_ARCH_ARM 6832 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698