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

Side by Side Diff: sdk/lib/_internal/lib/mirrors_patch.dart

Issue 24005002: Make TypedefMirror a direct descendant of TypeMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Patch library for dart:mirrors. 5 // Patch library for dart:mirrors.
6 6
7 import 'dart:_js_mirrors' as js; 7 import 'dart:_js_mirrors' as js;
8 8
9 patch class MirrorSystem { 9 patch class MirrorSystem {
10 patch static String getName(Symbol symbol) => js.getName(symbol); 10 patch static String getName(Symbol symbol) => js.getName(symbol);
11 } 11 }
12 12
13 patch MirrorSystem currentMirrorSystem() => js.currentJsMirrorSystem; 13 patch MirrorSystem currentMirrorSystem() => js.currentJsMirrorSystem;
14 14
15 patch Future<MirrorSystem> mirrorSystemOf(SendPort port) { 15 patch Future<MirrorSystem> mirrorSystemOf(SendPort port) {
16 throw new UnsupportedError("MirrorSystem not implemented"); 16 throw new UnsupportedError("MirrorSystem not implemented");
17 } 17 }
18 18
19 patch InstanceMirror reflect(Object reflectee) => js.reflect(reflectee); 19 patch InstanceMirror reflect(Object reflectee) => js.reflect(reflectee);
20 20
21 patch ClassMirror reflectClass(Type key) { 21 patch ClassMirror reflectClass(Type key) {
22 return js.reflectType(key).originalDeclaration; 22 TypeMirror tm = reflectType(key);
23 if (tm is ClassMirror) {
24 return (tm as ClassMirror).originalDeclaration;
25 }
26 throw new ArgumentError("$key does not denote a class");
23 } 27 }
28
29 patch TypeMirror reflectType(Type key) => js.reflectType(key);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698