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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart

Issue 14066019: Change memberName and namedArguments in Invocation to use Symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
index a6ed014c7407e8a713475228f31b037821955455..59b0f679cb38c6119c75ab81ceeec6223d647652 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
@@ -62,15 +62,20 @@ String S(value) {
return res;
}
-createInvocationMirror(name, internalName, type, arguments, argumentNames) =>
- new JSInvocationMirror(name, internalName, type, arguments, argumentNames);
+createInvocationMirror(name, internalName, type, arguments, argumentNames) {
+ return new JSInvocationMirror(new Symbol(name),
+ internalName,
+ type,
+ arguments,
+ argumentNames);
+}
class JSInvocationMirror implements Invocation {
static const METHOD = 0;
static const GETTER = 1;
static const SETTER = 2;
- final String memberName;
+ final Symbol memberName;
final String _internalName;
final int _kind;
final List _arguments;
@@ -100,13 +105,14 @@ class JSInvocationMirror implements Invocation {
return list;
}
- Map<String,dynamic> get namedArguments {
+ Map<Symbol,dynamic> get namedArguments {
if (isAccessor) return null;
- var map = <String,dynamic>{};
+ var map = new Map<Symbol, dynamic>();
int namedArgumentCount = _namedArgumentNames.length;
int namedArgumentsStartIndex = _arguments.length - namedArgumentCount;
for (int i = 0; i < namedArgumentCount; i++) {
- map[_namedArgumentNames[i]] = _arguments[namedArgumentsStartIndex + i];
+ map[new Symbol(_namedArgumentNames[i])] =
+ _arguments[namedArgumentsStartIndex + i];
}
return map;
}

Powered by Google App Engine
This is Rietveld 408576698