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

Side by Side Diff: runtime/vm/flow_graph_compiler_arm64.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_arm.cc ('k') | runtime/vm/flow_graph_compiler_ia32.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/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/cpu.h" 12 #include "vm/cpu.h"
13 #include "vm/dart_entry.h" 13 #include "vm/dart_entry.h"
14 #include "vm/deopt_instructions.h" 14 #include "vm/deopt_instructions.h"
15 #include "vm/il_printer.h" 15 #include "vm/il_printer.h"
16 #include "vm/instructions.h" 16 #include "vm/instructions.h"
17 #include "vm/locations.h" 17 #include "vm/locations.h"
18 #include "vm/object_store.h" 18 #include "vm/object_store.h"
19 #include "vm/parser.h" 19 #include "vm/parser.h"
20 #include "vm/stack_frame.h" 20 #include "vm/stack_frame.h"
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 namespace dart { 24 namespace dart {
25 25
26 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization."); 26 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization.");
27 DECLARE_FLAG(bool, enable_simd_inline); 27 DECLARE_FLAG(bool, enable_simd_inline);
28 DECLARE_FLAG(bool, use_megamorphic_stub); 28 DECLARE_FLAG(bool, use_megamorphic_stub);
29 DECLARE_FLAG(bool, precompilation);
29 30
30 31
31 void MegamorphicSlowPath::EmitNativeCode(FlowGraphCompiler* compiler) { 32 void MegamorphicSlowPath::EmitNativeCode(FlowGraphCompiler* compiler) {
32 Assembler* assembler = compiler->assembler(); 33 Assembler* assembler = compiler->assembler();
33 #define __ assembler-> 34 #define __ assembler->
34 __ Bind(entry_label()); 35 __ Bind(entry_label());
35 __ Comment("MegamorphicSlowPath"); 36 __ Comment("MegamorphicSlowPath");
36 compiler->EmitMegamorphicInstanceCall(ic_data_, argument_count_, deopt_id_, 37 compiler->EmitMegamorphicInstanceCall(ic_data_, argument_count_, deopt_id_,
37 token_pos_, locs_, try_index_); 38 token_pos_, locs_, try_index_);
38 __ b(exit_label()); 39 __ b(exit_label());
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 } 1120 }
1120 } 1121 }
1121 } 1122 }
1122 1123
1123 VisitBlocks(); 1124 VisitBlocks();
1124 1125
1125 __ brk(0); 1126 __ brk(0);
1126 ASSERT(assembler()->constant_pool_allowed()); 1127 ASSERT(assembler()->constant_pool_allowed());
1127 GenerateDeferredCode(); 1128 GenerateDeferredCode();
1128 1129
1129 if (is_optimizing() && !FLAG_precompiled_mode) { 1130 if (is_optimizing() && !FLAG_precompilation) {
1130 // Leave enough space for patching in case of lazy deoptimization from 1131 // Leave enough space for patching in case of lazy deoptimization from
1131 // deferred code. 1132 // deferred code.
1132 for (intptr_t i = 0; 1133 for (intptr_t i = 0;
1133 i < CallPattern::kDeoptCallLengthInInstructions; 1134 i < CallPattern::kDeoptCallLengthInInstructions;
1134 ++i) { 1135 ++i) {
1135 __ orr(R0, ZR, Operand(R0)); // nop 1136 __ orr(R0, ZR, Operand(R0)); // nop
1136 } 1137 }
1137 lazy_deopt_pc_offset_ = assembler()->CodeSize(); 1138 lazy_deopt_pc_offset_ = assembler()->CodeSize();
1138 __ BranchPatchable(*StubCode::DeoptimizeLazy_entry()); 1139 __ BranchPatchable(*StubCode::DeoptimizeLazy_entry());
1139 } 1140 }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 __ LoadObject(R5, cache); 1301 __ LoadObject(R5, cache);
1301 if (FLAG_use_megamorphic_stub) { 1302 if (FLAG_use_megamorphic_stub) {
1302 __ BranchLink(*StubCode::MegamorphicLookup_entry()); 1303 __ BranchLink(*StubCode::MegamorphicLookup_entry());
1303 } else { 1304 } else {
1304 StubCode::EmitMegamorphicLookup(assembler()); 1305 StubCode::EmitMegamorphicLookup(assembler());
1305 } 1306 }
1306 __ blr(R1); 1307 __ blr(R1);
1307 1308
1308 RecordSafepoint(locs); 1309 RecordSafepoint(locs);
1309 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1310 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1310 if (FLAG_precompiled_mode) { 1311 if (FLAG_precompilation) {
1311 // Megamorphic calls may occur in slow path stubs. 1312 // Megamorphic calls may occur in slow path stubs.
1312 // If valid use try_index argument. 1313 // If valid use try_index argument.
1313 if (try_index == CatchClauseNode::kInvalidTryIndex) { 1314 if (try_index == CatchClauseNode::kInvalidTryIndex) {
1314 try_index = CurrentTryIndex(); 1315 try_index = CurrentTryIndex();
1315 } 1316 }
1316 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther, 1317 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther,
1317 assembler()->CodeSize(), 1318 assembler()->CodeSize(),
1318 Thread::kNoDeoptId, 1319 Thread::kNoDeoptId,
1319 token_pos, 1320 token_pos,
1320 try_index); 1321 try_index);
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 1911 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
1911 __ PopDouble(reg); 1912 __ PopDouble(reg);
1912 } 1913 }
1913 1914
1914 1915
1915 #undef __ 1916 #undef __
1916 1917
1917 } // namespace dart 1918 } // namespace dart
1918 1919
1919 #endif // defined TARGET_ARCH_ARM64 1920 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698