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 158723006: Fix environment of the optimized version of the _SetValueOf intrinsic. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/setvalueof-deopt.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 46e1b18aa6afe466a94cbc6d8aca7532bfe36168..c2656f3b52e8522d32b086eb6cbe41717f8856bb 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -10374,14 +10374,23 @@ void HOptimizedGraphBuilder::GenerateSetValueOf(CallRuntime* call) {
Add<HStoreNamedField>(object,
HObjectAccess::ForObservableJSObjectOffset(JSValue::kValueOffset),
value);
+ if (!ast_context()->IsEffect()) {
+ Push(value);
+ }
Add<HSimulate>(call->id(), FIXED_SIMULATE);
}
if_objectisvalue.Else();
{
// Nothing to do in this case.
+ if (!ast_context()->IsEffect()) {
+ Push(value);
+ }
Add<HSimulate>(call->id(), FIXED_SIMULATE);
}
if_objectisvalue.End();
+ if (!ast_context()->IsEffect()) {
+ Drop(1);
+ }
return ast_context()->ReturnValue(value);
}
« no previous file with comments | « no previous file | test/mjsunit/regress/setvalueof-deopt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698