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

Unified Diff: runtime/lib/mirrors.cc

Issue 10700149: Some small changes to make the vm dart:mirrors somewhat closer to the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 | « lib/mirrors/mirrors.dart ('k') | runtime/lib/mirrors_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
===================================================================
--- runtime/lib/mirrors.cc (revision 9527)
+++ runtime/lib/mirrors.cc (working copy)
@@ -569,6 +569,23 @@
return cls;
}
+ Dart_Handle args[] = { Dart_DebugName() };
+ Dart_Handle mirror = Dart_New(cls, Dart_Null(), ARRAY_SIZE(args), args);
+ if (Dart_IsError(mirror)) {
+ return mirror;
+ }
+
+ return mirror;
+}
+
+
+static Dart_Handle CreateMirrorSystem() {
+ Dart_Handle cls_name = Dart_NewString("_LocalMirrorSystemImpl");
+ Dart_Handle cls = Dart_GetClass(MirrorLib(), cls_name);
+ if (Dart_IsError(cls)) {
+ return cls;
+ }
+
Dart_Handle libraries = CreateLibrariesMap();
if (Dart_IsError(libraries)) {
return libraries;
@@ -582,9 +599,9 @@
}
Dart_Handle args[] = {
- Dart_DebugName(),
root_lib_mirror,
libraries,
+ CreateIsolateMirror(),
};
Dart_Handle mirror = Dart_New(cls, Dart_Null(), ARRAY_SIZE(args), args);
if (Dart_IsError(mirror)) {
@@ -687,13 +704,13 @@
}
-void NATIVE_ENTRY_FUNCTION(Mirrors_makeLocalIsolateMirror)(
+void NATIVE_ENTRY_FUNCTION(Mirrors_makeLocalMirrorSystem)(
Dart_NativeArguments args) {
- Dart_Handle mirror = CreateIsolateMirror();
- if (Dart_IsError(mirror)) {
- Dart_PropagateError(mirror);
+ Dart_Handle mirrors = CreateMirrorSystem();
+ if (Dart_IsError(mirrors)) {
+ Dart_PropagateError(mirrors);
}
- Dart_SetReturnValue(args, mirror);
+ Dart_SetReturnValue(args, mirrors);
}
void NATIVE_ENTRY_FUNCTION(Mirrors_makeLocalInstanceMirror)(
« no previous file with comments | « lib/mirrors/mirrors.dart ('k') | runtime/lib/mirrors_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698