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

Side by Side Diff: runtime/vm/flow_graph_compiler_ia32.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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 isolate()->object_store()->empty_context())); 1132 isolate()->object_store()->empty_context()));
1133 __ movl(Address(EBP, (slot_base - i) * kWordSize), raw_empty_context); 1133 __ movl(Address(EBP, (slot_base - i) * kWordSize), raw_empty_context);
1134 } 1134 }
1135 } else { 1135 } else {
1136 ASSERT(num_locals > 1); 1136 ASSERT(num_locals > 1);
1137 __ movl(Address(EBP, (slot_base - i) * kWordSize), EAX); 1137 __ movl(Address(EBP, (slot_base - i) * kWordSize), EAX);
1138 } 1138 }
1139 } 1139 }
1140 } 1140 }
1141 1141
1142 MaybeEmitCodeSourceMapEntry(TokenPosition::kDartCodePrologue);
1142 ASSERT(!block_order().is_empty()); 1143 ASSERT(!block_order().is_empty());
1143 VisitBlocks(); 1144 VisitBlocks();
1144 1145
1145 __ int3(); 1146 __ int3();
1146 GenerateDeferredCode(); 1147 GenerateDeferredCode();
1147 1148
1149 SaveCodeSize();
1148 if (is_optimizing() && !FLAG_precompilation) { 1150 if (is_optimizing() && !FLAG_precompilation) {
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(CallPattern::pattern_length_in_bytes()); 1153 __ nop(CallPattern::pattern_length_in_bytes());
1152 lazy_deopt_pc_offset_ = assembler()->CodeSize(); 1154 lazy_deopt_pc_offset_ = assembler()->CodeSize();
1153 __ Jmp(*StubCode::DeoptimizeLazy_entry()); 1155 __ Jmp(*StubCode::DeoptimizeLazy_entry());
1154 } 1156 }
1157 MaybeEmitCodeSourceMapEntry(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(ESP, 0)); 1850 __ movups(reg, Address(ESP, 0));
1848 __ addl(ESP, Immediate(kFpuRegisterSize)); 1851 __ addl(ESP, 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_IA32 1859 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698