Chromium Code Reviews| Index: src/interpreter/bytecode-generator.cc |
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
| index 417873f47665cb2add328976e2ac7cc7fb23cc24..8093514343ae9ed5e63e4eb88c68dfc165a00db5 100644 |
| --- a/src/interpreter/bytecode-generator.cc |
| +++ b/src/interpreter/bytecode-generator.cc |
| @@ -2976,17 +2976,17 @@ void BytecodeGenerator::VisitCountOperation(CountOperation* expr) { |
| } |
| // Save result for postfix expressions. |
| + FeedbackSlot count_slot = expr->CountBinaryOpFeedbackSlot(); |
|
rmcilroy
2017/04/06 11:21:31
Hmm, we are now recording this type feedback twice
Benedikt Meurer
2017/04/06 11:30:00
I'd be in favor of that long-/middle-term. I'll pu
|
| if (is_postfix) { |
| // Convert old value into a number before saving it. |
| old_value = register_allocator()->NewRegister(); |
| builder() |
| - ->ConvertAccumulatorToNumber(old_value) |
| + ->ConvertAccumulatorToNumber(old_value, feedback_index(count_slot)) |
| .LoadAccumulatorWithRegister(old_value); |
| } |
| // Perform +1/-1 operation. |
| - FeedbackSlot slot = expr->CountBinaryOpFeedbackSlot(); |
| - builder()->CountOperation(expr->binary_op(), feedback_index(slot)); |
| + builder()->CountOperation(expr->binary_op(), feedback_index(count_slot)); |
| // Store the value. |
| builder()->SetExpressionPosition(expr); |