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

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

Issue 1481763002: [Interpreter] Adds support for throw to bytecode graph builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 47a22df239854b4ef2568736d4c8bcaa87a2a32a..2a80992f8e8b3e4e324a047d831c783cebcda70e 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -816,7 +816,11 @@ void BytecodeGraphBuilder::VisitNew(
void BytecodeGraphBuilder::VisitThrow(
const interpreter::BytecodeArrayIterator& iterator) {
- UNIMPLEMENTED();
+ Node* value = environment()->LookupAccumulator();
+ NewNode(javascript()->CallRuntime(Runtime::kReThrow, 1), value);
Michael Starzinger 2015/11/26 17:27:45 This should be Runtime::kThrow, not Runtime::kReTh
Michael Starzinger 2015/11/27 09:28:46 I realized later that creating the exception messa
mythria 2015/11/27 14:54:47 Thanks for pointing this. We should use Runtime::k
Michael Starzinger 2015/11/27 15:09:18 Acknowledged. Yep, correct, TODO sounds good to me
+ Node* control = NewNode(common()->Throw(), value);
+ UpdateControlDependencyToLeaveFunction(control);
+ environment()->BindAccumulator(value);
}

Powered by Google App Engine
This is Rietveld 408576698