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

Unified Diff: src/compiler/interpreter-assembler.cc

Issue 1410863002: [Interpreter] Add support for Throw. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 9173fedc27ff7dd637869ec1db59013c77d49526..51ce47fc104920594bf46f802fb04732ebb25cfe 100644
--- a/src/compiler/interpreter-assembler.cc
+++ b/src/compiler/interpreter-assembler.cc
@@ -557,15 +557,20 @@ void InterpreterAssembler::DispatchTo(Node* new_bytecode_offset) {
}
+void InterpreterAssembler::Abort(BailoutReason bailout_reason) {
+ Node* abort_id = SmiTag(Int32Constant(bailout_reason));
+ CallRuntime(Runtime::kAbort, abort_id);
+ Return();
+}
+
+
void InterpreterAssembler::AbortIfWordNotEqual(Node* lhs, Node* rhs,
BailoutReason bailout_reason) {
RawMachineAssembler::Label match, no_match;
Node* condition = raw_assembler_->WordEqual(lhs, rhs);
raw_assembler_->Branch(condition, &match, &no_match);
raw_assembler_->Bind(&no_match);
- Node* abort_id = SmiTag(Int32Constant(bailout_reason));
- CallRuntime(Runtime::kAbort, abort_id);
- Return();
+ Abort(bailout_reason);
raw_assembler_->Bind(&match);
}
« 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