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

Unified Diff: src/compiler/interpreter-assembler.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, 10 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/compiler/interpreter-assembler.h ('k') | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/interpreter-assembler.cc
diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc
index 14fa9609db6c2dc2df6d8b24547bd745bc6b784f..a06ab646d293a7e385b081557fc706ad016cd5e7 100644
--- a/src/compiler/interpreter-assembler.cc
+++ b/src/compiler/interpreter-assembler.cc
@@ -661,9 +661,8 @@ Node* InterpreterAssembler::Advance(Node* delta) {
void InterpreterAssembler::Jump(Node* delta) { DispatchTo(Advance(delta)); }
-void InterpreterAssembler::JumpIfWordEqual(Node* lhs, Node* rhs, Node* delta) {
+void InterpreterAssembler::JumpConditional(Node* condition, Node* delta) {
RawMachineLabel match, no_match;
- Node* condition = raw_assembler_->WordEqual(lhs, rhs);
raw_assembler_->Branch(condition, &match, &no_match);
raw_assembler_->Bind(&match);
DispatchTo(Advance(delta));
@@ -671,6 +670,14 @@ void InterpreterAssembler::JumpIfWordEqual(Node* lhs, Node* rhs, Node* delta) {
Dispatch();
}
+void InterpreterAssembler::JumpIfWordEqual(Node* lhs, Node* rhs, Node* delta) {
+ JumpConditional(raw_assembler_->WordEqual(lhs, rhs), delta);
+}
+
+void InterpreterAssembler::JumpIfWordNotEqual(Node* lhs, Node* rhs,
+ Node* delta) {
+ JumpConditional(raw_assembler_->WordNotEqual(lhs, rhs), delta);
+}
void InterpreterAssembler::Dispatch() {
DispatchTo(Advance(interpreter::Bytecodes::Size(bytecode_)));
« no previous file with comments | « src/compiler/interpreter-assembler.h ('k') | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698