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

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

Issue 1634153002: [Interpreter] Adds support for const/let variables to interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased the patch Created 4 years, 11 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 | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | src/interpreter/bytecode-generator.cc » ('J')
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 ba2247f120c55752d7e484e330f4dff596c85174..56976fda0406665eceac4a088c097ed659924906 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -1765,6 +1765,21 @@ void BytecodeGraphBuilder::VisitJumpIfUndefinedConstantWide(
BuildJumpIfEqual(jsgraph()->UndefinedConstant());
}
+void BytecodeGraphBuilder::VisitJumpIfHole(
+ const interpreter::BytecodeArrayIterator& iterator) {
+ BuildJumpIfEqual(jsgraph()->TheHoleConstant());
+}
+
+void BytecodeGraphBuilder::VisitJumpIfNotHole(
+ const interpreter::BytecodeArrayIterator& iterator) {
+ Node* accumulator = environment()->LookupAccumulator();
+ Node* condition = NewNode(javascript()->StrictEqual(), accumulator,
+ jsgraph()->TheHoleConstant());
+ Node* node =
+ NewNode(common()->Select(MachineRepresentation::kTagged), condition,
+ jsgraph()->FalseConstant(), jsgraph()->TrueConstant());
+ BuildConditionalJump(node);
+}
void BytecodeGraphBuilder::VisitReturn(
const interpreter::BytecodeArrayIterator& iterator) {
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | src/interpreter/bytecode-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698