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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2187823002: [interpreter] Don't keep postfix result if only visited for effect (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: regen all golden files Created 4 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/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index ba0db0c9e4c81455dc9d080285da9154f926a5aa..3cf25b982d7865ef5724d9856728e0fa9cc89f92 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -2782,8 +2782,7 @@ void BytecodeGenerator::VisitCountOperation(CountOperation* expr) {
Property* property = expr->expression()->AsProperty();
LhsKind assign_type = Property::GetAssignType(property);
- // TODO(rmcilroy): Set is_postfix to false if visiting for effect.
- bool is_postfix = expr->is_postfix();
+ bool is_postfix = expr->is_postfix() && !execution_result()->IsEffect();
// Evaluate LHS expression and get old value.
Register object, home_object, key, old_value, value;
« no previous file with comments | « no previous file | test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698