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

Unified Diff: src/hydrogen.cc

Issue 19693004: Fix deopt in store with effect context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | test/mjsunit/regress/regress-deopt-store-effect.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index ddd47c10b60b63476d14922b3bc8ccb40b7945e1..6a28ff0cf3d4fb6d6de74b9f7500b816dc4aeb17 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4829,11 +4829,12 @@ bool HOptimizedGraphBuilder::TryStorePolymorphicAsMonomorphic(
store = BuildStoreNamedField(
object, name, store_value, types->at(count - 1), &lookup),
true);
- Push(result_value);
+ if (!ast_context()->IsEffect()) Push(result_value);
store->set_position(position);
AddInstruction(store);
AddSimulate(assignment_id);
- ast_context()->ReturnValue(Pop());
+ if (!ast_context()->IsEffect()) Drop(1);
+ ast_context()->ReturnValue(result_value);
return true;
}
@@ -5059,13 +5060,14 @@ void HOptimizedGraphBuilder::BuildStoreNamed(Expression* expr,
instr = BuildStoreNamedGeneric(object, name, store_value);
}
- Push(result_value);
+ if (!ast_context()->IsEffect()) Push(result_value);
instr->set_position(position);
AddInstruction(instr);
if (instr->HasObservableSideEffects()) {
AddSimulate(id, REMOVABLE_SIMULATE);
}
- return ast_context()->ReturnValue(Pop());
+ if (!ast_context()->IsEffect()) Drop(1);
+ return ast_context()->ReturnValue(result_value);
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-deopt-store-effect.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698