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

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

Issue 14173005: Update dart:mirrors to use Symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also use _symbol_dev.Symbol.getName in dart2js 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/core_patch.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart b/dart/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
index 53e082dff6cdaa54a1e482820e7e1e4c0f808827..541b0724fe9be2e1cf974d7d6b231bfd2278406d 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
@@ -11,6 +11,7 @@ import 'dart:_js_helper' show checkNull,
Primitives,
TypeImpl,
stringJoinUnchecked;
+import "dart:_collection-dev" as _symbol_dev;
patch void print(var object) {
Primitives.printString(object.toString());
@@ -49,7 +50,7 @@ patch class Function {
if (namedArguments == null) return null;
Map<String, dynamic> result = {};
namedArguments.forEach((symbol, value) {
- result[symbol._name] = value;
+ result[_symbol_dev.Symbol.getName(symbol)] = value;
});
return result;
}
@@ -298,19 +299,3 @@ patch class NoSuchMethodError {
}
}
}
-
-patch class Symbol {
- final String _name;
-
- patch const Symbol(String name) :
- this._name = name;
-
- patch bool operator ==(other) {
- return other is Symbol && _name == other._name;
- }
-
- patch int get hashCode {
- const arbitraryPrime = 664597;
- return 0x1fffffff & (arbitraryPrime * _name.hashCode);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698