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

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

Issue 10885039: Deoptimization can occur at Dart calls (includes native calls to C) but not at runtime calls. This … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 233
234 234
235 void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id, 235 void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id,
236 intptr_t token_pos) { 236 intptr_t token_pos) {
237 // TODO(srdjan): Temporary use deopt stubs to maintain deopt-indexes. 237 // TODO(srdjan): Temporary use deopt stubs to maintain deopt-indexes.
238 // kDeoptAtCall will not emit code, but will only generate deoptimization 238 // kDeoptAtCall will not emit code, but will only generate deoptimization
239 // information. 239 // information.
240 const intptr_t deopt_index = deopt_stubs_.length(); 240 const intptr_t deopt_index = deopt_stubs_.length();
241 AddDeoptStub(deopt_id, kDeoptAtCall); 241 AddDeoptStub(deopt_id, kDeoptAtCall);
242 pc_descriptors_list()->AddDescriptor(PcDescriptors::kDeoptIndex, 242 pc_descriptors_list()->AddDeoptIndex(assembler()->CodeSize(),
243 assembler()->CodeSize(),
244 deopt_id, 243 deopt_id,
245 token_pos, 244 kDeoptAtCall,
246 deopt_index); 245 deopt_index);
247 } 246 }
248 247
249 248
250 void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) { 249 void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) {
251 if (is_optimizing()) { 250 if (is_optimizing()) {
252 BitmapBuilder* bitmap = locs->stack_bitmap(); 251 BitmapBuilder* bitmap = locs->stack_bitmap();
253 ASSERT(bitmap != NULL); 252 ASSERT(bitmap != NULL);
254 bitmap->SetLength(StackSize()); 253 bitmap->SetLength(StackSize());
255 stackmap_table_builder_->AddEntry(assembler()->CodeSize(), bitmap); 254 stackmap_table_builder_->AddEntry(assembler()->CodeSize(), bitmap);
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 return; 741 return;
743 } 742 }
744 } 743 }
745 744
746 // This move is not blocked. 745 // This move is not blocked.
747 EmitMove(index); 746 EmitMove(index);
748 } 747 }
749 748
750 749
751 } // namespace dart 750 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698