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

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

Issue 1739593002: Revert "Move precompilation-related flags to flags list." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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.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
28 // Generic summary for call instructions that have all arguments pushed 34 // Generic summary for call instructions that have all arguments pushed
29 // on the stack and return the result in a fixed register R0. 35 // on the stack and return the result in a fixed register R0.
30 LocationSummary* Instruction::MakeCallSummary(Zone* zone) { 36 LocationSummary* Instruction::MakeCallSummary(Zone* zone) {
31 LocationSummary* result = new(zone) LocationSummary( 37 LocationSummary* result = new(zone) LocationSummary(
32 zone, 0, 0, LocationSummary::kCall); 38 zone, 0, 0, LocationSummary::kCall);
33 result->set_out(0, Location::RegisterLocation(R0)); 39 result->set_out(0, Location::RegisterLocation(R0));
34 return result; 40 return result;
35 } 41 }
36 42
37 43
(...skipping 2327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2365 2371
2366 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2372 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2367 const Register kLengthReg = R2; 2373 const Register kLengthReg = R2;
2368 const Register kElemTypeReg = R1; 2374 const Register kElemTypeReg = R1;
2369 const Register kResultReg = R0; 2375 const Register kResultReg = R0;
2370 2376
2371 ASSERT(locs()->in(kElementTypePos).reg() == kElemTypeReg); 2377 ASSERT(locs()->in(kElementTypePos).reg() == kElemTypeReg);
2372 ASSERT(locs()->in(kLengthPos).reg() == kLengthReg); 2378 ASSERT(locs()->in(kLengthPos).reg() == kLengthReg);
2373 2379
2374 if (compiler->is_optimizing() && 2380 if (compiler->is_optimizing() &&
2375 !FLAG_precompiled_mode && 2381 !FLAG_precompilation &&
2376 num_elements()->BindsToConstant() && 2382 num_elements()->BindsToConstant() &&
2377 num_elements()->BoundConstant().IsSmi()) { 2383 num_elements()->BoundConstant().IsSmi()) {
2378 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value(); 2384 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value();
2379 if ((length >= 0) && (length <= Array::kMaxElements)) { 2385 if ((length >= 0) && (length <= Array::kMaxElements)) {
2380 Label slow_path, done; 2386 Label slow_path, done;
2381 InlineArrayAllocation(compiler, length, &slow_path, &done); 2387 InlineArrayAllocation(compiler, length, &slow_path, &done);
2382 __ Bind(&slow_path); 2388 __ Bind(&slow_path);
2383 __ PushObject(Object::null_object()); // Make room for the result. 2389 __ PushObject(Object::null_object()); // Make room for the result.
2384 __ Push(kLengthReg); // length. 2390 __ Push(kLengthReg); // length.
2385 __ Push(kElemTypeReg); 2391 __ Push(kElemTypeReg);
(...skipping 4437 matching lines...) Expand 10 before | Expand all | Expand 10 after
6823 1, 6829 1,
6824 locs()); 6830 locs());
6825 __ Drop(1); 6831 __ Drop(1);
6826 __ Pop(result); 6832 __ Pop(result);
6827 } 6833 }
6828 6834
6829 6835
6830 } // namespace dart 6836 } // namespace dart
6831 6837
6832 #endif // defined TARGET_ARCH_ARM 6838 #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