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

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

Issue 1740503002: Build CodeSourceMap for each code object (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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_mips.cc ('k') | runtime/vm/object.h » ('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"
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 __ StoreObject( 1129 __ StoreObject(
1130 Address(RBP, (slot_base - i) * kWordSize), empty_context); 1130 Address(RBP, (slot_base - i) * kWordSize), empty_context);
1131 } 1131 }
1132 } else { 1132 } else {
1133 ASSERT(num_locals > 1); 1133 ASSERT(num_locals > 1);
1134 __ movq(Address(RBP, (slot_base - i) * kWordSize), RAX); 1134 __ movq(Address(RBP, (slot_base - i) * kWordSize), RAX);
1135 } 1135 }
1136 } 1136 }
1137 } 1137 }
1138 1138
1139 EndCodeSourceRange(TokenPosition::kDartCodePrologue);
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
1149 BeginCodeSourceRange();
1148 if (is_optimizing() && !FLAG_precompiled_mode) { 1150 if (is_optimizing() && !FLAG_precompiled_mode) {
1149 // Leave enough space for patching in case of lazy deoptimization from 1151 // Leave enough space for patching in case of lazy deoptimization from
1150 // deferred code. 1152 // deferred code.
1151 __ nop(ShortCallPattern::pattern_length_in_bytes()); 1153 __ nop(ShortCallPattern::pattern_length_in_bytes());
1152 lazy_deopt_pc_offset_ = assembler()->CodeSize(); 1154 lazy_deopt_pc_offset_ = assembler()->CodeSize();
1153 __ Jmp(*StubCode::DeoptimizeLazy_entry(), PP); 1155 __ Jmp(*StubCode::DeoptimizeLazy_entry(), PP);
1154 } 1156 }
1157 EndCodeSourceRange(TokenPosition::kDartCodeEpilogue);
1155 } 1158 }
1156 1159
1157 1160
1158 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, 1161 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos,
1159 const StubEntry& stub_entry, 1162 const StubEntry& stub_entry,
1160 RawPcDescriptors::Kind kind, 1163 RawPcDescriptors::Kind kind,
1161 LocationSummary* locs) { 1164 LocationSummary* locs) {
1162 __ Call(stub_entry); 1165 __ Call(stub_entry);
1163 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); 1166 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos);
1164 RecordSafepoint(locs); 1167 RecordSafepoint(locs);
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1847 __ movups(reg, Address(RSP, 0)); 1850 __ movups(reg, Address(RSP, 0));
1848 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); 1851 __ AddImmediate(RSP, Immediate(kFpuRegisterSize));
1849 } 1852 }
1850 1853
1851 1854
1852 #undef __ 1855 #undef __
1853 1856
1854 } // namespace dart 1857 } // namespace dart
1855 1858
1856 #endif // defined TARGET_ARCH_X64 1859 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698