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

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

Issue 1731743003: Move precompilation-related flags to flags list. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: make print_stop_message default false to fix build 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/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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"
11 #include "vm/compiler.h" 11 #include "vm/compiler.h"
12 #include "vm/dart_entry.h" 12 #include "vm/dart_entry.h"
13 #include "vm/deopt_instructions.h" 13 #include "vm/deopt_instructions.h"
14 #include "vm/il_printer.h" 14 #include "vm/il_printer.h"
15 #include "vm/instructions.h" 15 #include "vm/instructions.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/stack_frame.h" 19 #include "vm/stack_frame.h"
20 #include "vm/stub_code.h" 20 #include "vm/stub_code.h"
21 #include "vm/symbols.h" 21 #include "vm/symbols.h"
22 22
23 namespace dart { 23 namespace dart {
24 24
25 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization."); 25 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization.");
26 DECLARE_FLAG(bool, use_megamorphic_stub); 26 DECLARE_FLAG(bool, use_megamorphic_stub);
27 DECLARE_FLAG(bool, precompilation);
28 27
29 28
30 void MegamorphicSlowPath::EmitNativeCode(FlowGraphCompiler* compiler) { 29 void MegamorphicSlowPath::EmitNativeCode(FlowGraphCompiler* compiler) {
31 Assembler* assembler = compiler->assembler(); 30 Assembler* assembler = compiler->assembler();
32 #define __ assembler-> 31 #define __ assembler->
33 __ Bind(entry_label()); 32 __ Bind(entry_label());
34 __ Comment("MegamorphicSlowPath"); 33 __ Comment("MegamorphicSlowPath");
35 compiler->EmitMegamorphicInstanceCall(ic_data_, argument_count_, deopt_id_, 34 compiler->EmitMegamorphicInstanceCall(ic_data_, argument_count_, deopt_id_,
36 token_pos_, locs_, try_index_); 35 token_pos_, locs_, try_index_);
37 __ b(exit_label()); 36 __ b(exit_label());
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 __ sw(V0, Address(FP, (slot_base - i) * kWordSize)); 1139 __ sw(V0, Address(FP, (slot_base - i) * kWordSize));
1141 } 1140 }
1142 } 1141 }
1143 } 1142 }
1144 1143
1145 VisitBlocks(); 1144 VisitBlocks();
1146 1145
1147 __ break_(0); 1146 __ break_(0);
1148 GenerateDeferredCode(); 1147 GenerateDeferredCode();
1149 1148
1150 if (is_optimizing() && !FLAG_precompilation) { 1149 if (is_optimizing() && !FLAG_precompiled_mode) {
1151 // Leave enough space for patching in case of lazy deoptimization from 1150 // Leave enough space for patching in case of lazy deoptimization from
1152 // deferred code. 1151 // deferred code.
1153 for (intptr_t i = 0; 1152 for (intptr_t i = 0;
1154 i < CallPattern::kDeoptCallLengthInInstructions; 1153 i < CallPattern::kDeoptCallLengthInInstructions;
1155 ++i) { 1154 ++i) {
1156 __ nop(); 1155 __ nop();
1157 } 1156 }
1158 lazy_deopt_pc_offset_ = assembler()->CodeSize(); 1157 lazy_deopt_pc_offset_ = assembler()->CodeSize();
1159 __ Branch(*StubCode::DeoptimizeLazy_entry()); 1158 __ Branch(*StubCode::DeoptimizeLazy_entry());
1160 } 1159 }
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 __ LoadObject(S5, cache); 1327 __ LoadObject(S5, cache);
1329 if (FLAG_use_megamorphic_stub) { 1328 if (FLAG_use_megamorphic_stub) {
1330 __ BranchLink(*StubCode::MegamorphicLookup_entry()); 1329 __ BranchLink(*StubCode::MegamorphicLookup_entry());
1331 } else { 1330 } else {
1332 StubCode::EmitMegamorphicLookup(assembler()); 1331 StubCode::EmitMegamorphicLookup(assembler());
1333 } 1332 }
1334 __ jalr(T1); 1333 __ jalr(T1);
1335 1334
1336 RecordSafepoint(locs); 1335 RecordSafepoint(locs);
1337 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1336 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1338 if (FLAG_precompilation) { 1337 if (FLAG_precompiled_mode) {
1339 // Megamorphic calls may occur in slow path stubs. 1338 // Megamorphic calls may occur in slow path stubs.
1340 // If valid use try_index argument. 1339 // If valid use try_index argument.
1341 if (try_index == CatchClauseNode::kInvalidTryIndex) { 1340 if (try_index == CatchClauseNode::kInvalidTryIndex) {
1342 try_index = CurrentTryIndex(); 1341 try_index = CurrentTryIndex();
1343 } 1342 }
1344 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther, 1343 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther,
1345 assembler()->CodeSize(), 1344 assembler()->CodeSize(),
1346 Thread::kNoDeoptId, 1345 Thread::kNoDeoptId,
1347 token_pos, 1346 token_pos,
1348 try_index); 1347 try_index);
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1939 __ AddImmediate(SP, kDoubleSize); 1938 __ AddImmediate(SP, kDoubleSize);
1940 } 1939 }
1941 1940
1942 1941
1943 #undef __ 1942 #undef __
1944 1943
1945 1944
1946 } // namespace dart 1945 } // namespace dart
1947 1946
1948 #endif // defined TARGET_ARCH_MIPS 1947 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698