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

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
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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 __ StoreObject( 1130 __ StoreObject(
1131 Address(RBP, (slot_base - i) * kWordSize), empty_context); 1131 Address(RBP, (slot_base - i) * kWordSize), empty_context);
1132 } 1132 }
1133 } else { 1133 } else {
1134 ASSERT(num_locals > 1); 1134 ASSERT(num_locals > 1);
1135 __ movq(Address(RBP, (slot_base - i) * kWordSize), RAX); 1135 __ movq(Address(RBP, (slot_base - i) * kWordSize), RAX);
1136 } 1136 }
1137 } 1137 }
1138 } 1138 }
1139 1139
1140 MaybeEmitCodeSourceMapEntry(TokenPosition::kDartCodePrologue);
1140 ASSERT(!block_order().is_empty()); 1141 ASSERT(!block_order().is_empty());
1141 VisitBlocks(); 1142 VisitBlocks();
1142 1143
1143 __ int3(); 1144 __ int3();
1144 ASSERT(assembler()->constant_pool_allowed()); 1145 ASSERT(assembler()->constant_pool_allowed());
1145 GenerateDeferredCode(); 1146 GenerateDeferredCode();
1146 // Emit function patching code. This will be swapped with the first 13 bytes 1147 // Emit function patching code. This will be swapped with the first 13 bytes
1147 // at entry point. 1148 // at entry point.
1148 1149
1150 SaveCodeSize();
1149 if (is_optimizing() && !FLAG_precompilation) { 1151 if (is_optimizing() && !FLAG_precompilation) {
1150 // Leave enough space for patching in case of lazy deoptimization from 1152 // Leave enough space for patching in case of lazy deoptimization from
1151 // deferred code. 1153 // deferred code.
1152 __ nop(ShortCallPattern::pattern_length_in_bytes()); 1154 __ nop(ShortCallPattern::pattern_length_in_bytes());
1153 lazy_deopt_pc_offset_ = assembler()->CodeSize(); 1155 lazy_deopt_pc_offset_ = assembler()->CodeSize();
1154 __ Jmp(*StubCode::DeoptimizeLazy_entry(), PP); 1156 __ Jmp(*StubCode::DeoptimizeLazy_entry(), PP);
1155 } 1157 }
1158 MaybeEmitCodeSourceMapEntry(TokenPosition::kDartCodeEpilogue);
1156 } 1159 }
1157 1160
1158 1161
1159 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, 1162 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos,
1160 const StubEntry& stub_entry, 1163 const StubEntry& stub_entry,
1161 RawPcDescriptors::Kind kind, 1164 RawPcDescriptors::Kind kind,
1162 LocationSummary* locs) { 1165 LocationSummary* locs) {
1163 __ Call(stub_entry); 1166 __ Call(stub_entry);
1164 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); 1167 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos);
1165 RecordSafepoint(locs); 1168 RecordSafepoint(locs);
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 __ movups(reg, Address(RSP, 0)); 1823 __ movups(reg, Address(RSP, 0));
1821 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); 1824 __ AddImmediate(RSP, Immediate(kFpuRegisterSize));
1822 } 1825 }
1823 1826
1824 1827
1825 #undef __ 1828 #undef __
1826 1829
1827 } // namespace dart 1830 } // namespace dart
1828 1831
1829 #endif // defined TARGET_ARCH_X64 1832 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698