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

Unified Diff: lib/compiler/implementation/namer.dart

Issue 10834270: Implement call operator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/namer.dart
diff --git a/lib/compiler/implementation/namer.dart b/lib/compiler/implementation/namer.dart
index c30a2784a7ebcbfc9b73064d258398dfdb5311fc..19c875817d64cd757a6d3c428911ad78bb25926d 100644
--- a/lib/compiler/implementation/namer.dart
+++ b/lib/compiler/implementation/namer.dart
@@ -35,7 +35,7 @@ class Namer {
/** Some closures must contain their name. The name is stored in
* [STATIC_CLOSURE_NAME_NAME]. */
final String STATIC_CLOSURE_NAME_NAME = @'$name';
- final SourceString CLOSURE_INVOCATION_NAME = const SourceString(@'$call');
+ final SourceString CLOSURE_INVOCATION_NAME = const SourceString('call');
String closureInvocationName(Selector selector) {
@@ -107,11 +107,13 @@ class Namer {
}
String instanceMethodName(LibraryElement lib, SourceString name, int arity) {
+ if (name == const SourceString("call")) name = CLOSURE_INVOCATION_NAME;
kasperl 2012/08/10 10:16:28 What's the intent here? If the name is already 'ca
floitsch 2012/08/10 12:19:16 Changed: CLOSURE_INVOCATION_NAME is now initialize
return '${privateName(lib, name)}\$$arity';
}
String instanceMethodInvocationName(LibraryElement lib, SourceString name,
Selector selector) {
+ if (name == const SourceString("call")) name = CLOSURE_INVOCATION_NAME;
// TODO(floitsch): mangle, while preserving uniqueness.
StringBuffer buffer = new StringBuffer();
List<SourceString> names = selector.getOrderedNamedArguments();

Powered by Google App Engine
This is Rietveld 408576698