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

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

Issue 1901083002: [Interpreter] Introduce IncStub and DecStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 8 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 | « src/interface-descriptors.h ('k') | src/interpreter/interpreter.h » ('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 ba5b97d254e84a06e2757fa5d2840467737c7818..ac6873af182ab10d97324fea74cd060f653de510 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -2796,13 +2796,12 @@ void BytecodeGenerator::VisitCountOperation(CountOperation* expr) {
}
}
- // Convert old value into a number.
- builder()->CastAccumulatorToNumber();
-
// Save result for postfix expressions.
if (is_postfix) {
old_value = register_allocator()->outer()->NewRegister();
- builder()->StoreAccumulatorInRegister(old_value);
+
+ // Convert old value into a number before saving it.
+ builder()->CastAccumulatorToNumber().StoreAccumulatorInRegister(old_value);
}
// Perform +1/-1 operation.
« no previous file with comments | « src/interface-descriptors.h ('k') | src/interpreter/interpreter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698