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

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: Fix regression in emitted meta data 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 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 hasNoBody); 1516 hasNoBody);
1517 1517
1518 FunctionElementX.fromNode(String name, 1518 FunctionElementX.fromNode(String name,
1519 FunctionExpression node, 1519 FunctionExpression node,
1520 ElementKind kind, 1520 ElementKind kind,
1521 Modifiers modifiers, 1521 Modifiers modifiers,
1522 Element enclosing) 1522 Element enclosing)
1523 : this.tooMuchOverloading(name, node, kind, modifiers, enclosing, null, 1523 : this.tooMuchOverloading(name, node, kind, modifiers, enclosing, null,
1524 false); 1524 false);
1525 1525
1526 FunctionElementX.from(String name,
1527 FunctionElement other,
1528 Element enclosing)
1529 : this.tooMuchOverloading(name, other.node, other.kind,
1530 other.modifiers, enclosing,
1531 other.functionSignature,
1532 false);
1533
1534 FunctionElementX.tooMuchOverloading(String name, 1526 FunctionElementX.tooMuchOverloading(String name,
1535 FunctionExpression this.cachedNode, 1527 FunctionExpression this.cachedNode,
1536 ElementKind kind, 1528 ElementKind kind,
1537 this.modifiers, 1529 this.modifiers,
1538 Element enclosing, 1530 Element enclosing,
1539 this.functionSignatureCache, 1531 this.functionSignatureCache,
1540 bool hasNoBody) 1532 bool hasNoBody)
1541 : super(name, kind, enclosing), 1533 : super(name, kind, enclosing),
1542 _hasNoBody = hasNoBody { 1534 _hasNoBody = hasNoBody {
1543 assert(modifiers != null); 1535 assert(modifiers != null);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 1649
1658 bool get isAbstract { 1650 bool get isAbstract {
1659 return !modifiers.isExternal() && 1651 return !modifiers.isExternal() &&
1660 (isFunction() || isAccessor()) && 1652 (isFunction() || isAccessor()) &&
1661 _hasNoBody; 1653 _hasNoBody;
1662 } 1654 }
1663 1655
1664 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); 1656 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this);
1665 } 1657 }
1666 1658
1659 class SynthesizedCallMethodElementX extends FunctionElementX {
1660 final FunctionElement expression;
1661
1662 SynthesizedCallMethodElementX(String name,
1663 FunctionElement other,
1664 Element enclosing)
1665 : expression = other,
1666 super.tooMuchOverloading(name, other.node, other.kind,
1667 other.modifiers, enclosing,
1668 other.functionSignature,
1669 false);
1670 }
1671
1667 class DeferredLoaderGetterElementX extends FunctionElementX { 1672 class DeferredLoaderGetterElementX extends FunctionElementX {
1668 1673
1669 final PrefixElement prefix; 1674 final PrefixElement prefix;
1670 1675
1671 DeferredLoaderGetterElementX(PrefixElement prefix) 1676 DeferredLoaderGetterElementX(PrefixElement prefix)
1672 : this.prefix = prefix, 1677 : this.prefix = prefix,
1673 super("loadLibrary", 1678 super("loadLibrary",
1674 ElementKind.FUNCTION, 1679 ElementKind.FUNCTION,
1675 Modifiers.EMPTY, 1680 Modifiers.EMPTY,
1676 prefix, true); 1681 prefix, true);
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
2618 2623
2619 ParameterMetadataAnnotation(Metadata this.metadata); 2624 ParameterMetadataAnnotation(Metadata this.metadata);
2620 2625
2621 Node parseNode(DiagnosticListener listener) => metadata.expression; 2626 Node parseNode(DiagnosticListener listener) => metadata.expression;
2622 2627
2623 Token get beginToken => metadata.getBeginToken(); 2628 Token get beginToken => metadata.getBeginToken();
2624 2629
2625 Token get endToken => metadata.getEndToken(); 2630 Token get endToken => metadata.getEndToken();
2626 } 2631 }
2627 2632
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698