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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 1499593002: [Interpreter] Adds support for Increment and Decrement to BytecodeGraphBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/compiler/test-run-bytecode-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 7ae16258e3be0e5fff4b2cd26e6da161fa1441f9..17f918e84bd9d7c339c1c6be3f731b51e84375b8 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -947,13 +947,25 @@ void BytecodeGraphBuilder::VisitShiftRightLogical(
void BytecodeGraphBuilder::VisitInc(
const interpreter::BytecodeArrayIterator& iterator) {
- UNIMPLEMENTED();
+ const Operator* js_op =
+ javascript()->Add(language_mode(), BinaryOperationHints::Any());
+ Node* node = NewNode(js_op, environment()->LookupAccumulator(),
+ jsgraph()->OneConstant());
+
+ AddEmptyFrameStateInputs(node);
+ environment()->BindAccumulator(node);
}
void BytecodeGraphBuilder::VisitDec(
const interpreter::BytecodeArrayIterator& iterator) {
- UNIMPLEMENTED();
+ const Operator* js_op =
+ javascript()->Subtract(language_mode(), BinaryOperationHints::Any());
+ Node* node = NewNode(js_op, environment()->LookupAccumulator(),
+ jsgraph()->OneConstant());
+
+ AddEmptyFrameStateInputs(node);
+ environment()->BindAccumulator(node);
}
« no previous file with comments | « no previous file | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698