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

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

Issue 1654833002: [interpreter] Fix re-throw to not have frame-state. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/compiler/bytecode-graph-builder.h ('k') | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('j') | no next file with comments »
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 a6aae174a51a433aaf76ec12ce4ce499fc8c7b4a..44b0d39d7f9740461630f7251fce1621ea8de3eb 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -1238,24 +1238,24 @@ void BytecodeGraphBuilder::VisitNew() { BuildCallConstruct(); }
void BytecodeGraphBuilder::VisitNewWide() { BuildCallConstruct(); }
-void BytecodeGraphBuilder::BuildThrowOp(const Operator* call_op) {
+void BytecodeGraphBuilder::BuildThrow() {
FrameStateBeforeAndAfter states(this);
Node* value = environment()->LookupAccumulator();
- Node* call = NewNode(call_op, value);
- environment()->RecordAfterState(call, &states);
+ Node* call = NewNode(javascript()->CallRuntime(Runtime::kThrow), value);
+ environment()->BindAccumulator(call, &states);
}
void BytecodeGraphBuilder::VisitThrow() {
- BuildThrowOp(javascript()->CallRuntime(Runtime::kThrow));
- Node* control =
- NewNode(common()->Throw(), environment()->LookupAccumulator());
+ BuildThrow();
+ Node* call = environment()->LookupAccumulator();
+ Node* control = NewNode(common()->Throw(), call);
MergeControlToLeaveFunction(control);
}
void BytecodeGraphBuilder::VisitReThrow() {
- BuildThrowOp(javascript()->CallRuntime(Runtime::kReThrow));
- Node* control =
- NewNode(common()->Throw(), environment()->LookupAccumulator());
+ Node* value = environment()->LookupAccumulator();
+ Node* call = NewNode(javascript()->CallRuntime(Runtime::kReThrow), value);
+ Node* control = NewNode(common()->Throw(), call);
MergeControlToLeaveFunction(control);
}
« no previous file with comments | « src/compiler/bytecode-graph-builder.h ('k') | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698