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

Unified Diff: runtime/lib/mirrors_impl.dart

Issue 276043003: Lay waste to ClosureMirror.findInContext. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: remove stub in dart2js Created 6 years, 7 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
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors_impl.dart
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index a7d8d909c99d85e54c1a97cf11c4efb08586bedd..b1206cd8bd7a40871a2cfb9daf8d33b162eaff90 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -456,29 +456,10 @@ class _LocalClosureMirror extends _LocalInstanceMirror
return this.invoke(#call, positionalArguments, namedArguments);
}
- InstanceMirror findInContext(Symbol name, {ifAbsent: null}) {
- List<String> parts = _n(name).split(".").toList(growable: false);
- if (parts.length > 3) {
- throw new ArgumentError("Invalid symbol: ${name}");
- }
- List tuple = _computeFindInContext(_reflectee, parts);
- if (tuple.length == 0) {
- throw new UnsupportedError(
- "ClosureMirror.findInContext not yet supported");
- }
- if (tuple[0]) {
- return reflect(tuple[1]);
- }
- return ifAbsent == null ? null : ifAbsent();
- }
-
String toString() => "ClosureMirror on '${Error.safeToString(_reflectee)}'";
static _computeFunction(reflectee)
native 'ClosureMirror_function';
-
- static _computeFindInContext(reflectee, name)
- native 'ClosureMirror_find_in_context';
}
class _LocalClassMirror extends _LocalObjectMirror
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698