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

Unified Diff: third_party/pkg/di/lib/reflected_type.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « third_party/pkg/di/lib/module.dart ('k') | third_party/pkg/di/lib/src/base_injector.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/di/lib/reflected_type.dart
diff --git a/third_party/pkg/di/lib/reflected_type.dart b/third_party/pkg/di/lib/reflected_type.dart
deleted file mode 100644
index cb66f0a470bbdfde552ec88eb56dc21004d1e6a2..0000000000000000000000000000000000000000
--- a/third_party/pkg/di/lib/reflected_type.dart
+++ /dev/null
@@ -1,33 +0,0 @@
-library di.src.reflected_type;
-
-// These are used by _getReflectedTypeWorkaround, see http://dartbug.com/12607
-@MirrorsUsed(targets:
- const ['_js_helper.createRuntimeType', 'dart._js_mirrors.JsClassMirror'],
- override: 'di.src.reflected_type')
-import 'dart:mirrors';
-
-Map<ClassMirror, Type> _cache = <ClassMirror, Type>{};
-
-// Horrible hack to work around: http://dartbug.com/12607
-Type getReflectedTypeWorkaround(ClassMirror cls) {
- // On Dart VM, just return reflectedType.
- if (1.0 is! int) return cls.reflectedType;
- if (!cls.isOriginalDeclaration) {
- cls = cls.originalDeclaration;
- }
- if (_cache[cls] == null) {
- var mangledName = reflect(cls).getField(_mangledNameField).reflectee;
- _cache[cls] = _jsHelper.invoke(#createRuntimeType, [mangledName]).reflectee;
- }
- return _cache[cls];
-}
-
-final LibraryMirror _jsHelper =
- currentMirrorSystem().libraries[Uri.parse('dart:_js_helper')];
-
-final Symbol _mangledNameField = () {
- var jsClassMirrorMirror = reflect(reflectClass(ClassMirror)).type;
- for (var name in jsClassMirrorMirror.declarations.keys) {
- if (MirrorSystem.getName(name) == '_mangledName') return name;
- }
-}();
« no previous file with comments | « third_party/pkg/di/lib/module.dart ('k') | third_party/pkg/di/lib/src/base_injector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698