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

Unified Diff: dart/runtime/lib/object_patch.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/runtime/lib/object_patch.dart
diff --git a/dart/runtime/lib/object_patch.dart b/dart/runtime/lib/object_patch.dart
index 6c14f3ea7fde7ecb48a8fa628ba6f0ec4810f960..fba43fb105ed6940c2a5aef913b857b281c29aec 100644
--- a/dart/runtime/lib/object_patch.dart
+++ b/dart/runtime/lib/object_patch.dart
@@ -35,10 +35,10 @@ patch class Object {
/* patch */ noSuchMethod(Invocation invocation) {
return _noSuchMethod(invocation.isMethod,
- invocation.memberName,
+ _collection_dev.Symbol.getName(invocation.memberName),
invocation._type,
invocation.positionalArguments,
- invocation.namedArguments);
+ _symbolMapToStringMap(invocation.namedArguments));
}
/* patch */ Type get runtimeType native "Object_runtimeType";
@@ -54,4 +54,12 @@ patch class Object {
// Call this function instead of inlining 'as', thus collecting type
// feedback. Returns receiver.
_as(instantiator, instantiator_type_arguments, type) native "Object_as";
+
+ static _symbolMapToStringMap(Map<Symbol, dynamic> map) {
+ var result = new Map<String, dynamic>();
+ map.forEach((Symbol key, value) {
+ result[_collection_dev.Symbol.getName(key)] = value;
+ });
+ return result;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698