Reviewers: danno, Michael Starzinger,
Message:
PTAL. I will not land it before getting benchmark results.
Description:
Visit return statement of inlined function in value context.
BUG=354357
LOG=N
TEST=mjsunit/regress/regress-354357.js
Please review this at https://codereview.chromium.org/206413005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+5, -1 lines):
M src/hydrogen.cc
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index
f6e22d873f2e894593a0fbf25d7ed9fbb7176469..730df551f253b79e27c7f3f6794f3ccfaa1ab55c
100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4366,7 +4366,11 @@ void
HOptimizedGraphBuilder::VisitReturnStatement(ReturnStatement* stmt) {
TestContext* test = TestContext::cast(context);
VisitForControl(stmt->expression(), test->if_true(),
test->if_false());
} else if (context->IsEffect()) {
- CHECK_ALIVE(VisitForEffect(stmt->expression()));
+ // Visit in value context and ignore the result. This is needed to
keep
+ // environment in sync with full-codegen since some visitors
+ // (e.g. VisitCountOperation) change the environment depending on
context.
+ CHECK_ALIVE(VisitForValue(stmt->expression()));
+ Pop();
Goto(function_return(), state);
} else {
ASSERT(context->IsValue());
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.