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

Unified Diff: runtime/lib/mirrors.cc

Issue 16757007: Changes to mirrors in support of metadata access at runtime. Assumes VM changes in flight.… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 | « no previous file | runtime/lib/mirrors_impl.dart » ('j') | runtime/lib/mirrors_impl.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
===================================================================
--- runtime/lib/mirrors.cc (revision 23823)
+++ runtime/lib/mirrors.cc (working copy)
@@ -1279,6 +1279,21 @@
}
+void NATIVE_ENTRY_FUNCTION(LocalMirrorImpl_metadata)(
+ Dart_NativeArguments args) {
+ Dart_EnterScope();
+ Dart_Handle mirror = Dart_GetNativeArgument(args, 0);
+
+ Dart_Handle reflectee = UnwrapMirror(mirror);
ahe 2013/06/11 08:48:10 What happens if mirror is not a mirror?
gbracha 2013/06/12 21:21:18 The first argument is the receiver. The only way y
+ Dart_Handle result = Dart_GetMetadata(reflectee);
+ if (Dart_IsError(result)) {
+ Dart_PropagateError(result);
+ }
+ ASSERT(Dart_IsList(result));
+ Dart_SetReturnValue(args, result);
+ Dart_ExitScope();
+}
+
void HandleMirrorsMessage(Isolate* isolate,
Dart_Port reply_port,
const Instance& message) {
« no previous file with comments | « no previous file | runtime/lib/mirrors_impl.dart » ('j') | runtime/lib/mirrors_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698