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

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

Issue 1657153002: Clean up global variables related to precompilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
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/cpu.h" 10 #include "vm/cpu.h"
(...skipping 10 matching lines...) Expand all
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); 28 DECLARE_FLAG(bool, allow_absolute_addresses);
29 DECLARE_FLAG(bool, emit_edge_counters); 29 DECLARE_FLAG(bool, emit_edge_counters);
30 DECLARE_FLAG(int, optimization_counter_threshold); 30 DECLARE_FLAG(int, optimization_counter_threshold);
31 DECLARE_FLAG(bool, precompilation);
31 DECLARE_FLAG(bool, use_osr); 32 DECLARE_FLAG(bool, use_osr);
32 33
33 // Generic summary for call instructions that have all arguments pushed 34 // Generic summary for call instructions that have all arguments pushed
34 // 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.
35 LocationSummary* Instruction::MakeCallSummary(Zone* zone) { 36 LocationSummary* Instruction::MakeCallSummary(Zone* zone) {
36 LocationSummary* result = new(zone) LocationSummary( 37 LocationSummary* result = new(zone) LocationSummary(
37 zone, 0, 0, LocationSummary::kCall); 38 zone, 0, 0, LocationSummary::kCall);
38 result->set_out(0, Location::RegisterLocation(R0)); 39 result->set_out(0, Location::RegisterLocation(R0));
39 return result; 40 return result;
40 } 41 }
(...skipping 2329 matching lines...) Expand 10 before | Expand all | Expand 10 after
2370 2371
2371 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2372 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2372 const Register kLengthReg = R2; 2373 const Register kLengthReg = R2;
2373 const Register kElemTypeReg = R1; 2374 const Register kElemTypeReg = R1;
2374 const Register kResultReg = R0; 2375 const Register kResultReg = R0;
2375 2376
2376 ASSERT(locs()->in(kElementTypePos).reg() == kElemTypeReg); 2377 ASSERT(locs()->in(kElementTypePos).reg() == kElemTypeReg);
2377 ASSERT(locs()->in(kLengthPos).reg() == kLengthReg); 2378 ASSERT(locs()->in(kLengthPos).reg() == kLengthReg);
2378 2379
2379 if (compiler->is_optimizing() && 2380 if (compiler->is_optimizing() &&
2380 !Compiler::always_optimize() && 2381 !FLAG_precompilation &&
2381 num_elements()->BindsToConstant() && 2382 num_elements()->BindsToConstant() &&
2382 num_elements()->BoundConstant().IsSmi()) { 2383 num_elements()->BoundConstant().IsSmi()) {
2383 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value(); 2384 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value();
2384 if ((length >= 0) && (length <= Array::kMaxElements)) { 2385 if ((length >= 0) && (length <= Array::kMaxElements)) {
2385 Label slow_path, done; 2386 Label slow_path, done;
2386 InlineArrayAllocation(compiler, length, &slow_path, &done); 2387 InlineArrayAllocation(compiler, length, &slow_path, &done);
2387 __ Bind(&slow_path); 2388 __ Bind(&slow_path);
2388 __ PushObject(Object::null_object()); // Make room for the result. 2389 __ PushObject(Object::null_object()); // Make room for the result.
2389 __ Push(kLengthReg); // length. 2390 __ Push(kLengthReg); // length.
2390 __ Push(kElemTypeReg); 2391 __ Push(kElemTypeReg);
(...skipping 4469 matching lines...) Expand 10 before | Expand all | Expand 10 after
6860 1, 6861 1,
6861 locs()); 6862 locs());
6862 __ Drop(1); 6863 __ Drop(1);
6863 __ Pop(result); 6864 __ Pop(result);
6864 } 6865 }
6865 6866
6866 6867
6867 } // namespace dart 6868 } // namespace dart
6868 6869
6869 #endif // defined TARGET_ARCH_ARM 6870 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698