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

Side by Side Diff: runtime/vm/flow_graph_compiler_x64.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_mips.cc ('k') | runtime/vm/flow_graph_inliner.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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 #include "vm/verified_memory.h" 22 #include "vm/verified_memory.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 DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic."); 27 DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic.");
28 DECLARE_FLAG(bool, enable_simd_inline); 28 DECLARE_FLAG(bool, enable_simd_inline);
29 DECLARE_FLAG(bool, use_megamorphic_stub); 29 DECLARE_FLAG(bool, use_megamorphic_stub);
30 DECLARE_FLAG(bool, precompilation);
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 __ jmp(exit_label()); 39 __ jmp(exit_label());
39 #undef __ 40 #undef __
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 1139
1139 ASSERT(!block_order().is_empty()); 1140 ASSERT(!block_order().is_empty());
1140 VisitBlocks(); 1141 VisitBlocks();
1141 1142
1142 __ int3(); 1143 __ int3();
1143 ASSERT(assembler()->constant_pool_allowed()); 1144 ASSERT(assembler()->constant_pool_allowed());
1144 GenerateDeferredCode(); 1145 GenerateDeferredCode();
1145 // Emit function patching code. This will be swapped with the first 13 bytes 1146 // Emit function patching code. This will be swapped with the first 13 bytes
1146 // at entry point. 1147 // at entry point.
1147 1148
1148 if (is_optimizing() && !FLAG_precompiled_mode) { 1149 if (is_optimizing() && !FLAG_precompilation) {
1149 // Leave enough space for patching in case of lazy deoptimization from 1150 // Leave enough space for patching in case of lazy deoptimization from
1150 // deferred code. 1151 // deferred code.
1151 __ nop(ShortCallPattern::pattern_length_in_bytes()); 1152 __ nop(ShortCallPattern::pattern_length_in_bytes());
1152 lazy_deopt_pc_offset_ = assembler()->CodeSize(); 1153 lazy_deopt_pc_offset_ = assembler()->CodeSize();
1153 __ Jmp(*StubCode::DeoptimizeLazy_entry(), PP); 1154 __ Jmp(*StubCode::DeoptimizeLazy_entry(), PP);
1154 } 1155 }
1155 } 1156 }
1156 1157
1157 1158
1158 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, 1159 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos,
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 __ LoadObject(RBX, cache); 1331 __ LoadObject(RBX, cache);
1331 if (FLAG_use_megamorphic_stub) { 1332 if (FLAG_use_megamorphic_stub) {
1332 __ Call(*StubCode::MegamorphicLookup_entry()); 1333 __ Call(*StubCode::MegamorphicLookup_entry());
1333 } else { 1334 } else {
1334 StubCode::EmitMegamorphicLookup(assembler()); 1335 StubCode::EmitMegamorphicLookup(assembler());
1335 } 1336 }
1336 __ call(RCX); 1337 __ call(RCX);
1337 1338
1338 RecordSafepoint(locs); 1339 RecordSafepoint(locs);
1339 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1340 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1340 if (FLAG_precompiled_mode) { 1341 if (FLAG_precompilation) {
1341 // Megamorphic calls may occur in slow path stubs. 1342 // Megamorphic calls may occur in slow path stubs.
1342 // If valid use try_index argument. 1343 // If valid use try_index argument.
1343 if (try_index == CatchClauseNode::kInvalidTryIndex) { 1344 if (try_index == CatchClauseNode::kInvalidTryIndex) {
1344 try_index = CurrentTryIndex(); 1345 try_index = CurrentTryIndex();
1345 } 1346 }
1346 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther, 1347 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther,
1347 assembler()->CodeSize(), 1348 assembler()->CodeSize(),
1348 Thread::kNoDeoptId, 1349 Thread::kNoDeoptId,
1349 token_pos, 1350 token_pos,
1350 try_index); 1351 try_index);
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1847 __ movups(reg, Address(RSP, 0)); 1848 __ movups(reg, Address(RSP, 0));
1848 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); 1849 __ AddImmediate(RSP, Immediate(kFpuRegisterSize));
1849 } 1850 }
1850 1851
1851 1852
1852 #undef __ 1853 #undef __
1853 1854
1854 } // namespace dart 1855 } // namespace dart
1855 1856
1856 #endif // defined TARGET_ARCH_X64 1857 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698