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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart

Issue 13947004: dart2js: Allow 'throw' when inlining (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
Index: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
index c1b9796ec9cbe58f70e8ea5889df11e536d25935..f77aa993e765799e2c6f82456526b7aae3e44227 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
@@ -64,6 +64,7 @@ abstract class HVisitor<R> {
R visitSwitch(HSwitch node);
R visitThis(HThis node);
R visitThrow(HThrow node);
+ R visitThrowExpression(HThrowExpression node);
R visitTry(HTry node);
R visitTypeGuard(HTypeGuard node);
R visitTypeConversion(HTypeConversion node);
@@ -339,6 +340,7 @@ class HBaseVisitor extends HGraphVisitor implements HVisitor {
visitStringify(HStringify node) => visitInstruction(node);
visitThis(HThis node) => visitParameterValue(node);
visitThrow(HThrow node) => visitControlFlow(node);
+ visitThrowExpression(HThrowExpression node) => visitInstruction(node);
visitTry(HTry node) => visitControlFlow(node);
visitTypeGuard(HTypeGuard node) => visitCheck(node);
visitIs(HIs node) => visitInstruction(node);
@@ -2018,6 +2020,13 @@ class HReturn extends HControlFlow {
accept(HVisitor visitor) => visitor.visitReturn(this);
}
+class HThrowExpression extends HInstruction {
karlklose 2013/04/09 11:58:46 Shouldn't this extends HControlFlow?
ngeoffray 2013/04/10 12:06:39 Wouldn't it be simpler to have HTrow be treated as
erikcorry 2013/04/10 12:52:32 I don't think so.
erikcorry 2013/04/10 12:52:32 No, we can't do control flow (closing the block wi
+ HThrowExpression(value) : super(<HInstruction>[value]);
+ toString() => 'throwexpression';
+ accept(HVisitor visitor) => visitor.visitThrowExpression(this);
+ bool canThrow() => true;
+}
+
class HThrow extends HControlFlow {
final bool isRethrow;
HThrow(value, {this.isRethrow: false}) : super(<HInstruction>[value]);

Powered by Google App Engine
This is Rietveld 408576698