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

Side by Side Diff: runtime/vm/flow_graph_compiler_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, 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 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 } 1127 }
1127 } 1128 }
1128 } 1129 }
1129 1130
1130 VisitBlocks(); 1131 VisitBlocks();
1131 1132
1132 __ bkpt(0); 1133 __ bkpt(0);
1133 ASSERT(assembler()->constant_pool_allowed()); 1134 ASSERT(assembler()->constant_pool_allowed());
1134 GenerateDeferredCode(); 1135 GenerateDeferredCode();
1135 1136
1136 if (is_optimizing() && !FLAG_precompiled_mode) { 1137 if (is_optimizing() && !FLAG_precompilation) {
1137 // Leave enough space for patching in case of lazy deoptimization from 1138 // Leave enough space for patching in case of lazy deoptimization from
1138 // deferred code. 1139 // deferred code.
1139 for (intptr_t i = 0; 1140 for (intptr_t i = 0;
1140 i < CallPattern::DeoptCallPatternLengthInInstructions(); 1141 i < CallPattern::DeoptCallPatternLengthInInstructions();
1141 ++i) { 1142 ++i) {
1142 __ nop(); 1143 __ nop();
1143 } 1144 }
1144 lazy_deopt_pc_offset_ = assembler()->CodeSize(); 1145 lazy_deopt_pc_offset_ = assembler()->CodeSize();
1145 __ Branch(*StubCode::DeoptimizeLazy_entry()); 1146 __ Branch(*StubCode::DeoptimizeLazy_entry());
1146 } 1147 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 __ LoadObject(R9, cache); 1320 __ LoadObject(R9, cache);
1320 if (FLAG_use_megamorphic_stub) { 1321 if (FLAG_use_megamorphic_stub) {
1321 __ BranchLink(*StubCode::MegamorphicLookup_entry()); 1322 __ BranchLink(*StubCode::MegamorphicLookup_entry());
1322 } else { 1323 } else {
1323 StubCode::EmitMegamorphicLookup(assembler()); 1324 StubCode::EmitMegamorphicLookup(assembler());
1324 } 1325 }
1325 __ blx(R1); 1326 __ blx(R1);
1326 1327
1327 RecordSafepoint(locs); 1328 RecordSafepoint(locs);
1328 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1329 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1329 if (FLAG_precompiled_mode) { 1330 if (FLAG_precompilation) {
1330 // Megamorphic calls may occur in slow path stubs. 1331 // Megamorphic calls may occur in slow path stubs.
1331 // If valid use try_index argument. 1332 // If valid use try_index argument.
1332 if (try_index == CatchClauseNode::kInvalidTryIndex) { 1333 if (try_index == CatchClauseNode::kInvalidTryIndex) {
1333 try_index = CurrentTryIndex(); 1334 try_index = CurrentTryIndex();
1334 } 1335 }
1335 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther, 1336 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther,
1336 assembler()->CodeSize(), 1337 assembler()->CodeSize(),
1337 Thread::kNoDeoptId, 1338 Thread::kNoDeoptId,
1338 token_pos, 1339 token_pos,
1339 try_index); 1340 try_index);
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 DRegister dreg = EvenDRegisterOf(reg); 1974 DRegister dreg = EvenDRegisterOf(reg);
1974 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1975 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1975 } 1976 }
1976 1977
1977 1978
1978 #undef __ 1979 #undef __
1979 1980
1980 } // namespace dart 1981 } // namespace dart
1981 1982
1982 #endif // defined TARGET_ARCH_ARM 1983 #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