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

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

Issue 1311403003: dart2js cps: Track existence of try statements in resolution instead of traversing AST/IR nodes to … (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index f9d87f94304cfb42add3c17338ba54c19881a5c1..2154da41cfae809840add72d7e6fbba4bc901f57 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -8449,6 +8449,8 @@ class InlineWeeder extends ast.Visitor {
int maxInliningNodes,
bool useMaxInliningNodes,
{bool allowLoops: false}) {
+ if (function.resolvedAst.elements.containsTryStatement) return false;
+
InlineWeeder weeder =
new InlineWeeder(maxInliningNodes, useMaxInliningNodes, allowLoops);
ast.FunctionExpression functionExpression = function.node;
@@ -8531,11 +8533,6 @@ class InlineWeeder extends ast.Visitor {
seenReturn = true;
}
- void visitTryStatement(ast.Node node) {
- if (!registerNode()) return;
- tooDifficult = true;
- }
-
void visitThrow(ast.Throw node) {
if (!registerNode()) return;
// For now, we don't want to handle throw after a return even if

Powered by Google App Engine
This is Rietveld 408576698