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

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

Issue 11893003: Unbreak closure invocation name minification. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_backend/namer.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 library universe; 5 library universe;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../dart2jslib.dart'; 9 import '../dart2jslib.dart';
10 import '../tree/tree.dart'; 10 import '../tree/tree.dart';
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 bool isIndex() => identical(kind, SelectorKind.INDEX) && argumentCount == 1; 219 bool isIndex() => identical(kind, SelectorKind.INDEX) && argumentCount == 1;
220 bool isIndexSet() => identical(kind, SelectorKind.INDEX) && argumentCount == 2 ; 220 bool isIndexSet() => identical(kind, SelectorKind.INDEX) && argumentCount == 2 ;
221 221
222 bool isOperator() => identical(kind, SelectorKind.OPERATOR); 222 bool isOperator() => identical(kind, SelectorKind.OPERATOR);
223 bool isUnaryOperator() => isOperator() && argumentCount == 0; 223 bool isUnaryOperator() => isOperator() && argumentCount == 0;
224 bool isBinaryOperator() => isOperator() && argumentCount == 1; 224 bool isBinaryOperator() => isOperator() && argumentCount == 1;
225 225
226 /** Check whether this is a call to 'assert'. */ 226 /** Check whether this is a call to 'assert'. */
227 bool isAssert() => isCall() && identical(name.stringValue, "assert"); 227 bool isAssert() => isCall() && identical(name.stringValue, "assert");
228 228
229 /** Check whether this is a closure invocation call. */
230 bool isClosureCall() =>
231 isCall() && identical(name.stringValue, Compiler.CALL_OPERATOR_NAME);
232
233 int get hashCode => argumentCount + 1000 * namedArguments.length; 229 int get hashCode => argumentCount + 1000 * namedArguments.length;
234 int get namedArgumentCount => namedArguments.length; 230 int get namedArgumentCount => namedArguments.length;
235 int get positionalArgumentCount => argumentCount - namedArgumentCount; 231 int get positionalArgumentCount => argumentCount - namedArgumentCount;
236 DartType get receiverType => null; 232 DartType get receiverType => null;
237 233
238 /** 234 /**
239 * The member name for invocation mirrors created from this selector. 235 * The member name for invocation mirrors created from this selector.
240 */ 236 */
241 String get invocationMirrorMemberName => 237 String get invocationMirrorMemberName =>
242 isSetter() ? '${name.slowToString()}=' : name.slowToString(); 238 isSetter() ? '${name.slowToString()}=' : name.slowToString();
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 ClassElement cls = self; 475 ClassElement cls = self;
480 if (cls.isSubclassOf(other)) { 476 if (cls.isSubclassOf(other)) {
481 // Resolve an invocation of [element.name] on [self]. If it 477 // Resolve an invocation of [element.name] on [self]. If it
482 // is found, this selector is a candidate. 478 // is found, this selector is a candidate.
483 return hasElementIn(self, element) && appliesUntyped(element, compiler); 479 return hasElementIn(self, element) && appliesUntyped(element, compiler);
484 } 480 }
485 481
486 return false; 482 return false;
487 } 483 }
488 } 484 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_backend/namer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698