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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 223403003: Use closure tracer to identify closures that are not passed to Function.apply (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixed issue with failing test Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library elements.modelx; 5 library elements.modelx;
6 6
7 import 'elements.dart'; 7 import 'elements.dart';
8 import '../tree/tree.dart'; 8 import '../tree/tree.dart';
9 import '../util/util.dart'; 9 import '../util/util.dart';
10 import '../resolution/resolution.dart'; 10 import '../resolution/resolution.dart';
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 hasNoBody); 1522 hasNoBody);
1523 1523
1524 FunctionElementX.fromNode(String name, 1524 FunctionElementX.fromNode(String name,
1525 FunctionExpression node, 1525 FunctionExpression node,
1526 ElementKind kind, 1526 ElementKind kind,
1527 Modifiers modifiers, 1527 Modifiers modifiers,
1528 Element enclosing) 1528 Element enclosing)
1529 : this.tooMuchOverloading(name, node, kind, modifiers, enclosing, null, 1529 : this.tooMuchOverloading(name, node, kind, modifiers, enclosing, null,
1530 false); 1530 false);
1531 1531
1532 FunctionElementX.from(String name,
1533 FunctionElement other,
1534 Element enclosing)
1535 : this.tooMuchOverloading(name, other.node, other.kind,
1536 other.modifiers, enclosing,
1537 other.functionSignature,
1538 false);
1539
1540 FunctionElementX.tooMuchOverloading(String name, 1532 FunctionElementX.tooMuchOverloading(String name,
1541 FunctionExpression this.cachedNode, 1533 FunctionExpression this.cachedNode,
1542 ElementKind kind, 1534 ElementKind kind,
1543 this.modifiers, 1535 this.modifiers,
1544 Element enclosing, 1536 Element enclosing,
1545 this.functionSignatureCache, 1537 this.functionSignatureCache,
1546 bool hasNoBody) 1538 bool hasNoBody)
1547 : super(name, kind, enclosing), 1539 : super(name, kind, enclosing),
1548 _hasNoBody = hasNoBody { 1540 _hasNoBody = hasNoBody {
1549 assert(modifiers != null); 1541 assert(modifiers != null);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 1655
1664 bool get isAbstract { 1656 bool get isAbstract {
1665 return !modifiers.isExternal() && 1657 return !modifiers.isExternal() &&
1666 (isFunction() || isAccessor()) && 1658 (isFunction() || isAccessor()) &&
1667 _hasNoBody; 1659 _hasNoBody;
1668 } 1660 }
1669 1661
1670 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); 1662 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this);
1671 } 1663 }
1672 1664
1665 class SynthesizedCallMethodElementX extends FunctionElementX {
1666 final FunctionElement expression;
1667
1668 SynthesizedCallMethodElementX(String name,
1669 FunctionElement other,
1670 Element enclosing)
1671 : expression = other,
1672 super.tooMuchOverloading(name, other.node, other.kind,
1673 other.modifiers, enclosing,
1674 other.functionSignature,
1675 false);
1676 }
1677
1673 class DeferredLoaderGetterElementX extends FunctionElementX { 1678 class DeferredLoaderGetterElementX extends FunctionElementX {
1674 1679
1675 final PrefixElement prefix; 1680 final PrefixElement prefix;
1676 1681
1677 DeferredLoaderGetterElementX(PrefixElement prefix) 1682 DeferredLoaderGetterElementX(PrefixElement prefix)
1678 : this.prefix = prefix, 1683 : this.prefix = prefix,
1679 super("loadLibrary", 1684 super("loadLibrary",
1680 ElementKind.FUNCTION, 1685 ElementKind.FUNCTION,
1681 Modifiers.EMPTY, 1686 Modifiers.EMPTY,
1682 prefix, true); 1687 prefix, true);
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
2624 2629
2625 ParameterMetadataAnnotation(Metadata this.metadata); 2630 ParameterMetadataAnnotation(Metadata this.metadata);
2626 2631
2627 Node parseNode(DiagnosticListener listener) => metadata.expression; 2632 Node parseNode(DiagnosticListener listener) => metadata.expression;
2628 2633
2629 Token get beginToken => metadata.getBeginToken(); 2634 Token get beginToken => metadata.getBeginToken();
2630 2635
2631 Token get endToken => metadata.getEndToken(); 2636 Token get endToken => metadata.getEndToken();
2632 } 2637 }
2633 2638
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698