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

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

Issue 24631003: Add proper API for creating private symbols wrt a library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 patch static Symbol getSymbol(String name, [LibraryMirror lib]) {
12 throw new UnimplementedError("MirrorSystem.getSymbol not implemented");
13 }
11 } 14 }
12 15
13 patch MirrorSystem currentMirrorSystem() => js.currentJsMirrorSystem; 16 patch MirrorSystem currentMirrorSystem() => js.currentJsMirrorSystem;
14 17
15 patch Future<MirrorSystem> mirrorSystemOf(SendPort port) { 18 patch Future<MirrorSystem> mirrorSystemOf(SendPort port) {
16 throw new UnsupportedError("MirrorSystem not implemented"); 19 throw new UnsupportedError("MirrorSystem not implemented");
17 } 20 }
18 21
19 patch InstanceMirror reflect(Object reflectee) => js.reflect(reflectee); 22 patch InstanceMirror reflect(Object reflectee) => js.reflect(reflectee);
20 23
21 patch ClassMirror reflectClass(Type key) { 24 patch ClassMirror reflectClass(Type key) {
22 return js.reflectType(key).originalDeclaration; 25 return js.reflectType(key).originalDeclaration;
23 } 26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698