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

Side by Side Diff: runtime/vm/flow_graph_compiler_arm.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/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_compiler_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/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 11 matching lines...) Expand all
22 #include "vm/symbols.h" 22 #include "vm/symbols.h"
23 #include "vm/verified_memory.h" 23 #include "vm/verified_memory.h"
24 24
25 namespace dart { 25 namespace dart {
26 26
27 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization."); 27 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization.");
28 DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic."); 28 DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic.");
29 DEFINE_FLAG(bool, unbox_doubles, true, "Optimize double arithmetic."); 29 DEFINE_FLAG(bool, unbox_doubles, true, "Optimize double arithmetic.");
30 DECLARE_FLAG(bool, enable_simd_inline); 30 DECLARE_FLAG(bool, enable_simd_inline);
31 DECLARE_FLAG(bool, use_megamorphic_stub); 31 DECLARE_FLAG(bool, use_megamorphic_stub);
32 DECLARE_FLAG(bool, precompilation);
32 33
33 34
34 void MegamorphicSlowPath::EmitNativeCode(FlowGraphCompiler* compiler) { 35 void MegamorphicSlowPath::EmitNativeCode(FlowGraphCompiler* compiler) {
35 Assembler* assembler = compiler->assembler(); 36 Assembler* assembler = compiler->assembler();
36 #define __ assembler-> 37 #define __ assembler->
37 __ Bind(entry_label()); 38 __ Bind(entry_label());
38 __ Comment("MegamorphicSlowPath"); 39 __ Comment("MegamorphicSlowPath");
39 compiler->EmitMegamorphicInstanceCall(ic_data_, argument_count_, deopt_id_, 40 compiler->EmitMegamorphicInstanceCall(ic_data_, argument_count_, deopt_id_,
40 token_pos_, locs_, try_index_); 41 token_pos_, locs_, try_index_);
41 __ b(exit_label()); 42 __ b(exit_label());
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 } 1118 }
1118 } 1119 }
1119 } 1120 }
1120 1121
1121 VisitBlocks(); 1122 VisitBlocks();
1122 1123
1123 __ bkpt(0); 1124 __ bkpt(0);
1124 ASSERT(assembler()->constant_pool_allowed()); 1125 ASSERT(assembler()->constant_pool_allowed());
1125 GenerateDeferredCode(); 1126 GenerateDeferredCode();
1126 1127
1127 if (is_optimizing() && Compiler::allow_recompilation()) { 1128 if (is_optimizing() && !FLAG_precompilation) {
1128 // Leave enough space for patching in case of lazy deoptimization from 1129 // Leave enough space for patching in case of lazy deoptimization from
1129 // deferred code. 1130 // deferred code.
1130 for (intptr_t i = 0; 1131 for (intptr_t i = 0;
1131 i < CallPattern::DeoptCallPatternLengthInInstructions(); 1132 i < CallPattern::DeoptCallPatternLengthInInstructions();
1132 ++i) { 1133 ++i) {
1133 __ nop(); 1134 __ nop();
1134 } 1135 }
1135 lazy_deopt_pc_offset_ = assembler()->CodeSize(); 1136 lazy_deopt_pc_offset_ = assembler()->CodeSize();
1136 __ Branch(*StubCode::DeoptimizeLazy_entry()); 1137 __ Branch(*StubCode::DeoptimizeLazy_entry());
1137 } 1138 }
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 __ LoadObject(R9, cache); 1282 __ LoadObject(R9, cache);
1282 if (FLAG_use_megamorphic_stub) { 1283 if (FLAG_use_megamorphic_stub) {
1283 __ BranchLink(*StubCode::MegamorphicLookup_entry()); 1284 __ BranchLink(*StubCode::MegamorphicLookup_entry());
1284 } else { 1285 } else {
1285 StubCode::EmitMegamorphicLookup(assembler()); 1286 StubCode::EmitMegamorphicLookup(assembler());
1286 } 1287 }
1287 __ blx(R1); 1288 __ blx(R1);
1288 1289
1289 RecordSafepoint(locs); 1290 RecordSafepoint(locs);
1290 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1291 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1291 if (Compiler::always_optimize()) { 1292 if (FLAG_precompilation) {
1292 // Megamorphic calls may occur in slow path stubs. 1293 // Megamorphic calls may occur in slow path stubs.
1293 // If valid use try_index argument. 1294 // If valid use try_index argument.
1294 if (try_index == CatchClauseNode::kInvalidTryIndex) { 1295 if (try_index == CatchClauseNode::kInvalidTryIndex) {
1295 try_index = CurrentTryIndex(); 1296 try_index = CurrentTryIndex();
1296 } 1297 }
1297 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther, 1298 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther,
1298 assembler()->CodeSize(), 1299 assembler()->CodeSize(),
1299 Thread::kNoDeoptId, 1300 Thread::kNoDeoptId,
1300 token_pos, 1301 token_pos,
1301 try_index); 1302 try_index);
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1934 DRegister dreg = EvenDRegisterOf(reg); 1935 DRegister dreg = EvenDRegisterOf(reg);
1935 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1936 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1936 } 1937 }
1937 1938
1938 1939
1939 #undef __ 1940 #undef __
1940 1941
1941 } // namespace dart 1942 } // namespace dart
1942 1943
1943 #endif // defined TARGET_ARCH_ARM 1944 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_compiler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698