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

Unified Diff: runtime/lib/mirrors_patch.dart

Issue 2220883004: Use metadata annotation @patch for patch classes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: wip Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: runtime/lib/mirrors_patch.dart
diff --git a/runtime/lib/mirrors_patch.dart b/runtime/lib/mirrors_patch.dart
index e80dd47d94a74c06ff5b99d19f23e861e9463418..d66ce8245c6ec9b7a7ab3fd397835fb932ce0949 100644
--- a/runtime/lib/mirrors_patch.dart
+++ b/runtime/lib/mirrors_patch.dart
@@ -7,7 +7,7 @@ import "dart:_internal" as internal;
/**
* Returns a [MirrorSystem] for the current isolate.
*/
-patch MirrorSystem currentMirrorSystem() {
+@patch MirrorSystem currentMirrorSystem() {
return _Mirrors.currentMirrorSystem();
}
@@ -17,7 +17,7 @@ patch MirrorSystem currentMirrorSystem() {
* This only works if this mirror system is associated with the
* current running isolate.
*/
-patch InstanceMirror reflect(Object reflectee) {
+@patch InstanceMirror reflect(Object reflectee) {
return _Mirrors.reflect(reflectee);
}
@@ -27,16 +27,16 @@ patch InstanceMirror reflect(Object reflectee) {
*
* This only works with objects local to the current isolate.
*/
-patch ClassMirror reflectClass(Type key) {
+@patch ClassMirror reflectClass(Type key) {
return _Mirrors.reflectClass(key);
}
-patch TypeMirror reflectType(Type key) {
+@patch TypeMirror reflectType(Type key) {
return _Mirrors.reflectType(key);
}
-patch class MirrorSystem {
- /* patch */ LibraryMirror findLibrary(Symbol libraryName) {
+@patch class MirrorSystem {
+ /* @patch */ LibraryMirror findLibrary(Symbol libraryName) {
var candidates =
libraries.values.where((lib) => lib.simpleName == libraryName);
if (candidates.length == 1) {
@@ -50,11 +50,11 @@ patch class MirrorSystem {
throw new Exception("There is no library named '${getName(libraryName)}'");
}
- /* patch */ static String getName(Symbol symbol) {
+ /* @patch */ static String getName(Symbol symbol) {
return internal.Symbol.getUnmangledName(symbol);
}
- /* patch */ static Symbol getSymbol(String name, [LibraryMirror library]) {
+ /* @patch */ static Symbol getSymbol(String name, [LibraryMirror library]) {
if ((library != null && library is! _LocalLibraryMirror) ||
((name.length > 0) && (name[0] == '_') && (library == null))) {
throw new ArgumentError(library);

Powered by Google App Engine
This is Rietveld 408576698