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

Side by Side Diff: lib/mirrors/mirrors.dart

Issue 11118020: dart2js_mirrors_test added (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: TODO added Created 8 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
« no previous file with comments | « lib/compiler/implementation/lib/mirrors.dart ('k') | tests/lib/lib.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // The dart:mirrors library provides reflective access for Dart program. 5 // The dart:mirrors library provides reflective access for Dart program.
6 // 6 //
7 // For the purposes of the mirrors library, we adopt a naming 7 // For the purposes of the mirrors library, we adopt a naming
8 // convention with respect to getters and setters. Specifically, for 8 // convention with respect to getters and setters. Specifically, for
9 // some variable or field... 9 // some variable or field...
10 // 10 //
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 /** 49 /**
50 * A mirror on the [:void:] type. 50 * A mirror on the [:void:] type.
51 */ 51 */
52 TypeMirror get voidType; 52 TypeMirror get voidType;
53 } 53 }
54 54
55 /** 55 /**
56 * Returns a [MirrorSystem] for the current isolate. 56 * Returns a [MirrorSystem] for the current isolate.
57 */ 57 */
58 // TODO(johnniwinther): Implement this as an external function.
58 MirrorSystem currentMirrorSystem() { 59 MirrorSystem currentMirrorSystem() {
59 return _Mirrors.currentMirrorSystem(); 60 return _Mirrors.currentMirrorSystem();
60 } 61 }
61 62
62 /** 63 /**
63 * Creates a [MirrorSystem] for the isolate which is listening on 64 * Creates a [MirrorSystem] for the isolate which is listening on
64 * the [SendPort]. 65 * the [SendPort].
65 */ 66 */
67 // TODO(johnniwinther): Implement this as an external function.
66 Future<MirrorSystem> mirrorSystemOf(SendPort port) { 68 Future<MirrorSystem> mirrorSystemOf(SendPort port) {
67 return _Mirrors.mirrorSystemOf(port); 69 return _Mirrors.mirrorSystemOf(port);
68 } 70 }
69 71
70 /** 72 /**
71 * Returns an [InstanceMirror] for some Dart language object. 73 * Returns an [InstanceMirror] for some Dart language object.
72 * 74 *
73 * This only works if this mirror system is associated with the 75 * This only works if this mirror system is associated with the
74 * current running isolate. 76 * current running isolate.
75 */ 77 */
78 // TODO(johnniwinther): Implement this as an external function.
76 InstanceMirror reflect(Object reflectee) { 79 InstanceMirror reflect(Object reflectee) {
77 return _Mirrors.reflect(reflectee); 80 return _Mirrors.reflect(reflectee);
78 } 81 }
79 82
80 /** 83 /**
81 * A [Mirror] reflects some Dart language entity. 84 * A [Mirror] reflects some Dart language entity.
82 * 85 *
83 * Every [Mirror] originates from some [MirrorSystem]. 86 * Every [Mirror] originates from some [MirrorSystem].
84 */ 87 */
85 abstract class Mirror { 88 abstract class Mirror {
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 739
737 /** 740 /**
738 * A [MirrorException] is used to indicate errors within the mirrors 741 * A [MirrorException] is used to indicate errors within the mirrors
739 * framework. 742 * framework.
740 */ 743 */
741 class MirrorException implements Exception { 744 class MirrorException implements Exception {
742 const MirrorException(String this._message); 745 const MirrorException(String this._message);
743 String toString() => "MirrorException: '$_message'"; 746 String toString() => "MirrorException: '$_message'";
744 final String _message; 747 final String _message;
745 } 748 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/lib/mirrors.dart ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698