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

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

Issue 2473223004: [Interpreter] Ensure ValueOf is only called once for post-increment operations. (Closed)
Patch Set: Fix golden files Created 4 years, 1 month 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 404b9d3b59e92c9140e03d2df7abbcfa3f984f0e..43035eb3744602554fb7861a9e32b33ed80210a3 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -2750,7 +2750,9 @@ void BytecodeGenerator::VisitCountOperation(CountOperation* expr) {
if (is_postfix) {
// Convert old value into a number before saving it.
old_value = register_allocator()->NewRegister();
- builder()->ConvertAccumulatorToNumber(old_value);
+ builder()
+ ->ConvertAccumulatorToNumber(old_value)
+ .LoadAccumulatorWithRegister(old_value);
Jarin 2016/11/08 14:39:28 Does not this mean that the feedback for the binop
}
// Perform +1/-1 operation.
« 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