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

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

Issue 1621673002: [interpreter] Add ReThrow bytecode for try-finally support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_int-6
Patch Set: Rebased. 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 | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.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 b588950309a682f94d61d5ae6481c61069396c9f..02b84d1ada27cac4a1e4dfdbd6e0fe0cef65120e 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -209,8 +209,7 @@ class BytecodeGenerator::ControlScopeForTopLevel final
generator()->builder()->Return();
return true;
case CMD_RETHROW:
- // TODO(mstarzinger): Should be a ReThrow instead.
- generator()->builder()->Throw();
+ generator()->builder()->ReThrow();
return true;
}
return false;
@@ -291,7 +290,7 @@ class BytecodeGenerator::ControlScopeForTryCatch final
public:
ControlScopeForTryCatch(BytecodeGenerator* generator,
TryCatchBuilder* try_catch_builder)
- : ControlScope(generator), try_catch_builder_(try_catch_builder) {}
+ : ControlScope(generator) {}
protected:
bool Execute(Command command, Statement* statement) override {
@@ -301,16 +300,11 @@ class BytecodeGenerator::ControlScopeForTryCatch final
case CMD_RETURN:
break;
case CMD_RETHROW:
- // TODO(mstarzinger): Test and implement this!
- USE(try_catch_builder_);
- UNIMPLEMENTED();
+ generator()->builder()->ReThrow();
return true;
}
return false;
}
-
- private:
- TryCatchBuilder* try_catch_builder_;
};
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698