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

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

Issue 1657153002: Clean up global variables related to precompilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed unnecessary includes 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_arm.cc ('k') | runtime/vm/intermediate_language_mips.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"
11 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
12 #include "vm/flow_graph.h" 11 #include "vm/flow_graph.h"
13 #include "vm/flow_graph_compiler.h" 12 #include "vm/flow_graph_compiler.h"
14 #include "vm/flow_graph_range_analysis.h" 13 #include "vm/flow_graph_range_analysis.h"
15 #include "vm/locations.h" 14 #include "vm/locations.h"
16 #include "vm/object_store.h" 15 #include "vm/object_store.h"
17 #include "vm/parser.h" 16 #include "vm/parser.h"
18 #include "vm/simulator.h" 17 #include "vm/simulator.h"
19 #include "vm/stack_frame.h" 18 #include "vm/stack_frame.h"
20 #include "vm/stub_code.h" 19 #include "vm/stub_code.h"
21 #include "vm/symbols.h" 20 #include "vm/symbols.h"
22 21
23 #define __ compiler->assembler()-> 22 #define __ compiler->assembler()->
24 23
25 namespace dart { 24 namespace dart {
26 25
27 DECLARE_FLAG(bool, allow_absolute_addresses); 26 DECLARE_FLAG(bool, allow_absolute_addresses);
28 DECLARE_FLAG(bool, emit_edge_counters); 27 DECLARE_FLAG(bool, emit_edge_counters);
29 DECLARE_FLAG(int, optimization_counter_threshold); 28 DECLARE_FLAG(int, optimization_counter_threshold);
29 DECLARE_FLAG(bool, precompilation);
30 DECLARE_FLAG(bool, use_osr); 30 DECLARE_FLAG(bool, use_osr);
31 31
32 // Generic summary for call instructions that have all arguments pushed 32 // Generic summary for call instructions that have all arguments pushed
33 // on the stack and return the result in a fixed register R0. 33 // on the stack and return the result in a fixed register R0.
34 LocationSummary* Instruction::MakeCallSummary(Zone* zone) { 34 LocationSummary* Instruction::MakeCallSummary(Zone* zone) {
35 LocationSummary* result = new(zone) LocationSummary( 35 LocationSummary* result = new(zone) LocationSummary(
36 zone, 0, 0, LocationSummary::kCall); 36 zone, 0, 0, LocationSummary::kCall);
37 result->set_out(0, Location::RegisterLocation(R0)); 37 result->set_out(0, Location::RegisterLocation(R0));
38 return result; 38 return result;
39 } 39 }
(...skipping 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after
2093 2093
2094 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2094 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2095 const Register kLengthReg = R2; 2095 const Register kLengthReg = R2;
2096 const Register kElemTypeReg = R1; 2096 const Register kElemTypeReg = R1;
2097 const Register kResultReg = R0; 2097 const Register kResultReg = R0;
2098 2098
2099 ASSERT(locs()->in(kElementTypePos).reg() == kElemTypeReg); 2099 ASSERT(locs()->in(kElementTypePos).reg() == kElemTypeReg);
2100 ASSERT(locs()->in(kLengthPos).reg() == kLengthReg); 2100 ASSERT(locs()->in(kLengthPos).reg() == kLengthReg);
2101 2101
2102 if (compiler->is_optimizing() && 2102 if (compiler->is_optimizing() &&
2103 !Compiler::always_optimize() && 2103 !FLAG_precompilation &&
2104 num_elements()->BindsToConstant() && 2104 num_elements()->BindsToConstant() &&
2105 num_elements()->BoundConstant().IsSmi()) { 2105 num_elements()->BoundConstant().IsSmi()) {
2106 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value(); 2106 const intptr_t length = Smi::Cast(num_elements()->BoundConstant()).Value();
2107 if ((length >= 0) && (length <= Array::kMaxElements)) { 2107 if ((length >= 0) && (length <= Array::kMaxElements)) {
2108 Label slow_path, done; 2108 Label slow_path, done;
2109 InlineArrayAllocation(compiler, length, &slow_path, &done); 2109 InlineArrayAllocation(compiler, length, &slow_path, &done);
2110 __ Bind(&slow_path); 2110 __ Bind(&slow_path);
2111 __ PushObject(Object::null_object()); // Make room for the result. 2111 __ PushObject(Object::null_object()); // Make room for the result.
2112 __ Push(kLengthReg); // length. 2112 __ Push(kLengthReg); // length.
2113 __ Push(kElemTypeReg); 2113 __ Push(kElemTypeReg);
(...skipping 3508 matching lines...) Expand 10 before | Expand all | Expand 10 after
5622 1, 5622 1,
5623 locs()); 5623 locs());
5624 __ Drop(1); 5624 __ Drop(1);
5625 __ Pop(result); 5625 __ Pop(result);
5626 } 5626 }
5627 5627
5628 5628
5629 } // namespace dart 5629 } // namespace dart
5630 5630
5631 #endif // defined TARGET_ARCH_ARM64 5631 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698