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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 10979004: Emit kDeoptBefore only in unoptimzied code (target when switching from optimized to unoptimized cod… (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 12803)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -1468,9 +1468,11 @@
void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
// Add deoptimization descriptor for deoptimizing instructions
// that may be inserted before this instruction.
- compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
- GetDeoptId(),
- 0); // No token position.
+ if (!compiler->is_optimizing()) {
+ compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
+ GetDeoptId(),
+ 0); // No token position.
+ }
if (HasParallelMove()) {
compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
@@ -1619,9 +1621,11 @@
void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
- deopt_id(),
- token_pos());
+ if (!compiler->is_optimizing()) {
+ compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
+ deopt_id(),
+ token_pos());
+ }
compiler->GenerateInstanceCall(deopt_id(),
token_pos(),
function_name(),
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698