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

Unified Diff: sdk/lib/mirrors/mirrors_impl.dart

Issue 11624011: Mirrors implemented via patches. 2nd try. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Second attempt Created 8 years 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
Index: sdk/lib/mirrors/mirrors_impl.dart
diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors_impl.dart
similarity index 96%
copy from sdk/lib/mirrors/mirrors.dart
copy to sdk/lib/mirrors/mirrors_impl.dart
index 303cec4ad7ea0c92f3c5a4d93af9399d99610128..31effd0c92697485c06593a2de7a7633268c28d2 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors_impl.dart
@@ -2,20 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// The dart:mirrors library provides reflective access for Dart program.
-//
-// For the purposes of the mirrors library, we adopt a naming
-// convention with respect to getters and setters. Specifically, for
-// some variable or field...
-//
-// var myField;
-//
-// ...the getter is named 'myField' and the setter is named
-// 'myField='. This allows us to assign unique names to getters and
-// setters for the purposes of member lookup.
-
-// #library("mirrors");
-
/**
* A [MirrorSystem] is the main interface used to reflect on a set of
* associated libraries.
@@ -55,17 +41,13 @@ abstract class MirrorSystem {
/**
* Returns a [MirrorSystem] for the current isolate.
*/
-MirrorSystem currentMirrorSystem() {
- return _Mirrors.currentMirrorSystem();
-}
+external MirrorSystem currentMirrorSystem();
/**
* Creates a [MirrorSystem] for the isolate which is listening on
* the [SendPort].
*/
-Future<MirrorSystem> mirrorSystemOf(SendPort port) {
- return _Mirrors.mirrorSystemOf(port);
-}
+external Future<MirrorSystem> mirrorSystemOf(SendPort port);
/**
* Returns an [InstanceMirror] for some Dart language object.
@@ -73,9 +55,7 @@ Future<MirrorSystem> mirrorSystemOf(SendPort port) {
* This only works if this mirror system is associated with the
* current running isolate.
*/
-InstanceMirror reflect(Object reflectee) {
- return _Mirrors.reflect(reflectee);
-}
+external InstanceMirror reflect(Object reflectee);
/**
* A [Mirror] reflects some Dart language entity.

Powered by Google App Engine
This is Rietveld 408576698