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

Unified Diff: pkg/compiler/lib/src/ssa/builder_kernel.dart

Issue 2616263002: dart2js-kernel: implement rethrow (Closed)
Patch Set: format Created 3 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 | « no previous file | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder_kernel.dart
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index d978338f5ea3b9a04ef3b261c0b045f16cec3aad..31f38f3cee49fbc166233f1e5fe541bcffa7c9a6 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -2214,6 +2214,21 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
}
@override
+ void visitRethrow(ir.Rethrow rethrowNode) {
+ HInstruction exception = rethrowableException;
+ if (exception == null) {
+ exception = graph.addConstantNull(closedWorld);
+ compiler.reporter.internalError(astAdapter.getNode(rethrowNode),
+ 'rethrowableException should not be null.');
+ }
+ SourceInformation sourceInformation = null;
Siggi Cherem (dart-lang) 2017/01/11 19:13:04 what do we generally want to do for with source-in
Emily Fortuna 2017/01/11 21:19:54 I had been avoiding them and adding TODOs, but it'
+ closeAndGotoExit(new HThrow(exception, sourceInformation, isRethrow: true));
+ // ir.Rethrow is an expression so we need to push a value - a constant with
+ // no type.
+ stack.add(graph.addConstantUnreachable(closedWorld));
+ }
+
+ @override
void visitThisExpression(ir.ThisExpression thisExpression) {
stack.add(localsHandler.readThis());
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698