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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 21540002: Remove support for remaining deprecated features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 4 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 Element get currentElement; 8 Element get currentElement;
9 Set<Node> get superUses; 9 Set<Node> get superUses;
10 10
(...skipping 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 if (node.isIndex) { 2124 if (node.isIndex) {
2125 return isSet ? new Selector.indexSet() : new Selector.index(); 2125 return isSet ? new Selector.indexSet() : new Selector.index();
2126 } 2126 }
2127 2127
2128 if (node.isOperator) { 2128 if (node.isOperator) {
2129 SourceString source = node.selector.asOperator().source; 2129 SourceString source = node.selector.asOperator().source;
2130 String string = source.stringValue; 2130 String string = source.stringValue;
2131 if (identical(string, '!') || 2131 if (identical(string, '!') ||
2132 identical(string, '&&') || identical(string, '||') || 2132 identical(string, '&&') || identical(string, '||') ||
2133 identical(string, 'is') || identical(string, 'as') || 2133 identical(string, 'is') || identical(string, 'as') ||
2134 identical(string, '===') || identical(string, '!==') ||
2135 identical(string, '?') || 2134 identical(string, '?') ||
2136 identical(string, '>>>')) { 2135 identical(string, '>>>')) {
2137 return null; 2136 return null;
2138 } 2137 }
2138 SourceString op = source;
2139 if (!isUserDefinableOperator(source.stringValue)) { 2139 if (!isUserDefinableOperator(source.stringValue)) {
2140 source = Elements.mapToUserOperator(source); 2140 op = Elements.mapToUserOperatorOrNull(source);
2141 }
2142 if (op == null) {
2143 // Unsupported operator. An error has been reported during parsing.
2144 return new Selector.call(
2145 source, library, node.argumentsNode.slowLength(), []);
2141 } 2146 }
2142 return node.arguments.isEmpty 2147 return node.arguments.isEmpty
2143 ? new Selector.unaryOperator(source) 2148 ? new Selector.unaryOperator(op)
2144 : new Selector.binaryOperator(source); 2149 : new Selector.binaryOperator(op);
2145 } 2150 }
2146 2151
2147 Identifier identifier = node.selector.asIdentifier(); 2152 Identifier identifier = node.selector.asIdentifier();
2148 if (node.isPropertyAccess) { 2153 if (node.isPropertyAccess) {
2149 assert(!isSet); 2154 assert(!isSet);
2150 return new Selector.getter(identifier.source, library); 2155 return new Selector.getter(identifier.source, library);
2151 } else if (isSet) { 2156 } else if (isSet) {
2152 return new Selector.setter(identifier.source, library); 2157 return new Selector.setter(identifier.source, library);
2153 } 2158 }
2154 2159
(...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after
4058 return e; 4063 return e;
4059 } 4064 }
4060 4065
4061 /// Assumed to be called by [resolveRedirectingFactory]. 4066 /// Assumed to be called by [resolveRedirectingFactory].
4062 Element visitReturn(Return node) { 4067 Element visitReturn(Return node) {
4063 Node expression = node.expression; 4068 Node expression = node.expression;
4064 return finishConstructorReference(visit(expression), 4069 return finishConstructorReference(visit(expression),
4065 expression, expression); 4070 expression, expression);
4066 } 4071 }
4067 } 4072 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698