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; |