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

Side by Side Diff: runtime/vm/flow_graph_compiler_mips.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, 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
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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 __ LoadObject(V1, empty_context); 1135 __ LoadObject(V1, empty_context);
1136 __ sw(V1, Address(FP, (slot_base - i) * kWordSize)); 1136 __ sw(V1, Address(FP, (slot_base - i) * kWordSize));
1137 } 1137 }
1138 } else { 1138 } else {
1139 ASSERT(num_locals > 1); 1139 ASSERT(num_locals > 1);
1140 __ sw(V0, Address(FP, (slot_base - i) * kWordSize)); 1140 __ sw(V0, Address(FP, (slot_base - i) * kWordSize));
1141 } 1141 }
1142 } 1142 }
1143 } 1143 }
1144 1144
1145 MaybeEmitCodeSourceMapEntry(TokenPosition::kDartCodePrologue);
1145 VisitBlocks(); 1146 VisitBlocks();
1146 1147
1147 __ break_(0); 1148 __ break_(0);
1148 GenerateDeferredCode(); 1149 GenerateDeferredCode();
1149 1150
1151 SaveCodeSize();
1150 if (is_optimizing() && !FLAG_precompilation) { 1152 if (is_optimizing() && !FLAG_precompilation) {
1151 // Leave enough space for patching in case of lazy deoptimization from 1153 // Leave enough space for patching in case of lazy deoptimization from
1152 // deferred code. 1154 // deferred code.
1153 for (intptr_t i = 0; 1155 for (intptr_t i = 0;
1154 i < CallPattern::kDeoptCallLengthInInstructions; 1156 i < CallPattern::kDeoptCallLengthInInstructions;
1155 ++i) { 1157 ++i) {
1156 __ nop(); 1158 __ nop();
1157 } 1159 }
1158 lazy_deopt_pc_offset_ = assembler()->CodeSize(); 1160 lazy_deopt_pc_offset_ = assembler()->CodeSize();
1159 __ Branch(*StubCode::DeoptimizeLazy_entry()); 1161 __ Branch(*StubCode::DeoptimizeLazy_entry());
1160 } 1162 }
1163 MaybeEmitCodeSourceMapEntry(TokenPosition::kDartCodeEpilogue);
1161 } 1164 }
1162 1165
1163 1166
1164 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, 1167 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos,
1165 const StubEntry& stub_entry, 1168 const StubEntry& stub_entry,
1166 RawPcDescriptors::Kind kind, 1169 RawPcDescriptors::Kind kind,
1167 LocationSummary* locs) { 1170 LocationSummary* locs) {
1168 __ BranchLinkPatchable(stub_entry); 1171 __ BranchLinkPatchable(stub_entry);
1169 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); 1172 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos);
1170 RecordSafepoint(locs); 1173 RecordSafepoint(locs);
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1909 __ AddImmediate(SP, kDoubleSize); 1912 __ AddImmediate(SP, kDoubleSize);
1910 } 1913 }
1911 1914
1912 1915
1913 #undef __ 1916 #undef __
1914 1917
1915 1918
1916 } // namespace dart 1919 } // namespace dart
1917 1920
1918 #endif // defined TARGET_ARCH_MIPS 1921 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698