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

Side by Side Diff: dart/runtime/lib/mirrors_patch.dart

Issue 14173005: Update dart:mirrors to use Symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix various issues discovered during own review. 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 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 import "dart:nativewrappers"; 5 import "dart:nativewrappers";
6 import "dart:_collection-dev" as _collection_dev;
Søren Gjesse 2013/04/15 14:08:31 Maybe use a different "as" name (e.g. _mirror) to
ahe 2013/04/15 14:29:55 Done. (I called it _symbol_dev).
6 7
7 /** 8 /**
8 * Returns a [MirrorSystem] for the current isolate. 9 * Returns a [MirrorSystem] for the current isolate.
9 */ 10 */
10 patch MirrorSystem currentMirrorSystem() { 11 patch MirrorSystem currentMirrorSystem() {
11 return _Mirrors.currentMirrorSystem(); 12 return _Mirrors.currentMirrorSystem();
12 } 13 }
13 14
14 /** 15 /**
15 * Creates a [MirrorSystem] for the isolate which is listening on 16 * Creates a [MirrorSystem] for the isolate which is listening on
16 * the [SendPort]. 17 * the [SendPort].
17 */ 18 */
18 patch Future<MirrorSystem> mirrorSystemOf(SendPort port) { 19 patch Future<MirrorSystem> mirrorSystemOf(SendPort port) {
19 return _Mirrors.mirrorSystemOf(port); 20 return _Mirrors.mirrorSystemOf(port);
20 } 21 }
21 22
22 /** 23 /**
23 * Returns an [InstanceMirror] for some Dart language object. 24 * Returns an [InstanceMirror] for some Dart language object.
24 * 25 *
25 * This only works if this mirror system is associated with the 26 * This only works if this mirror system is associated with the
26 * current running isolate. 27 * current running isolate.
27 */ 28 */
28 patch InstanceMirror reflect(Object reflectee) { 29 patch InstanceMirror reflect(Object reflectee) {
29 return _Mirrors.reflect(reflectee); 30 return _Mirrors.reflect(reflectee);
30 } 31 }
32
33 patch class MirrorSystem {
34 /* patch */ static String getName(Symbol symbol) {
35 return _collection_dev.Symbol.getName(symbol);
36 }
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698