| Index: pkg/kernel/lib/transformations/closure/info.dart
|
| diff --git a/pkg/kernel/lib/transformations/closure/info.dart b/pkg/kernel/lib/transformations/closure/info.dart
|
| index 8d6645b8edb64e5b91e3a169d3871022972c447d..08d6a5a4fc33a22339aa09d64b72fbe5dc93c8f2 100644
|
| --- a/pkg/kernel/lib/transformations/closure/info.dart
|
| +++ b/pkg/kernel/lib/transformations/closure/info.dart
|
| @@ -12,10 +12,7 @@ import '../../ast.dart'
|
| FunctionDeclaration,
|
| FunctionNode,
|
| Member,
|
| - Name,
|
| Procedure,
|
| - ProcedureKind,
|
| - PropertyGet,
|
| ThisExpression,
|
| TypeParameter,
|
| TypeParameterType,
|
| @@ -45,13 +42,6 @@ class ClosureInfo extends RecursiveVisitor {
|
|
|
| final Map<FunctionNode, String> localNames = <FunctionNode, String>{};
|
|
|
| - /// Contains all names used as getter through a [PropertyGet].
|
| - final Set<Name> invokedGetters = new Set<Name>();
|
| -
|
| - /// Contains all names of declared regular instance methods (not including
|
| - /// accessors and operators).
|
| - final Set<Name> declaredInstanceMethodNames = new Set<Name>();
|
| -
|
| Class currentClass;
|
|
|
| Member currentMember;
|
| @@ -62,24 +52,6 @@ class ClosureInfo extends RecursiveVisitor {
|
| return currentFunction == null || currentMemberFunction == currentFunction;
|
| }
|
|
|
| - /// Maps the names of all instance methods that may be torn off (aka
|
| - /// implicitly closurized) to `${name.name}#get`.
|
| - Map<Name, Name> get tearOffGetterNames {
|
| - // TODO(dmitryas): Add support for tear-offs. When added, uncomment this.
|
| - //
|
| - // Map<Name, Name> result = <Name, Name>{};
|
| - // for (Name name in declaredInstanceMethodNames) {
|
| - // if (invokedGetters.contains(name)) {
|
| - // result[name] = new Name("${name.name}#get", name.library);
|
| - // }
|
| - // }
|
| - // return result;
|
| - //
|
| - // Currently an empty map is returned, so no tear-offs supporting functions
|
| - // and getters are generated, and no property-get targets are renamed.
|
| - return <Name, Name>{};
|
| - }
|
| -
|
| void beginMember(Member member, [FunctionNode function]) {
|
| currentMemberLocalNames.clear();
|
| if (function != null) {
|
| @@ -140,16 +112,6 @@ class ClosureInfo extends RecursiveVisitor {
|
|
|
| visitProcedure(Procedure node) {
|
| beginMember(node, node.function);
|
| - if (node.isInstanceMember && node.kind == ProcedureKind.Method) {
|
| - // Ignore the `length` method of [File] subclasses for now, as they
|
| - // will force us to rename the `length` getter (kernel issue #43).
|
| - // TODO(ahe): remove this condition.
|
| - Class parent = node.parent;
|
| - if (node.name.name != "length" ||
|
| - parent.enclosingLibrary.importUri.toString() != "dart:io") {
|
| - declaredInstanceMethodNames.add(node.name);
|
| - }
|
| - }
|
| super.visitProcedure(node);
|
| endMember();
|
| }
|
| @@ -240,11 +202,6 @@ class ClosureInfo extends RecursiveVisitor {
|
| }
|
| }
|
|
|
| - visitPropertyGet(PropertyGet node) {
|
| - invokedGetters.add(node.name);
|
| - super.visitPropertyGet(node);
|
| - }
|
| -
|
| saveCurrentFunction(void f()) {
|
| var saved = currentFunction;
|
| try {
|
|
|