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

Side by Side Diff: runtime/lib/mirrors.cc

Issue 10702186: Replaced simpleValue with more general reflectee. hasSimpleValue is retained internally for the sak… (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/mirrors/mirrors.dart ('k') | runtime/lib/mirrors_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "platform/json.h" 7 #include "platform/json.h"
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "include/dart_debugger_api.h" 9 #include "include/dart_debugger_api.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 ASSERT(Dart_IsInstance(instance)); 623 ASSERT(Dart_IsInstance(instance));
624 Dart_Handle cls_name = Dart_NewString("_LocalInstanceMirrorImpl"); 624 Dart_Handle cls_name = Dart_NewString("_LocalInstanceMirrorImpl");
625 Dart_Handle cls = Dart_GetClass(MirrorLib(), cls_name); 625 Dart_Handle cls = Dart_GetClass(MirrorLib(), cls_name);
626 if (Dart_IsError(cls)) { 626 if (Dart_IsError(cls)) {
627 return cls; 627 return cls;
628 } 628 }
629 Dart_Handle instance_cls = Dart_InstanceGetClass(instance); 629 Dart_Handle instance_cls = Dart_InstanceGetClass(instance);
630 if (Dart_IsError(instance_cls)) { 630 if (Dart_IsError(instance_cls)) {
631 return instance_cls; 631 return instance_cls;
632 } 632 }
633
633 bool is_simple = IsSimpleValue(instance); 634 bool is_simple = IsSimpleValue(instance);
634 Dart_Handle args[] = { 635 Dart_Handle args[] = {
635 CreateVMReference(instance), 636 CreateVMReference(instance),
636 CreateLazyMirror(instance_cls), 637 CreateLazyMirror(instance_cls),
637 Dart_NewBoolean(is_simple), 638 Dart_NewBoolean(is_simple),
638 (is_simple ? instance : Dart_Null()), 639 instance
639 }; 640 };
640 Dart_Handle mirror = Dart_New(cls, Dart_Null(), ARRAY_SIZE(args), args); 641 Dart_Handle mirror = Dart_New(cls, Dart_Null(), ARRAY_SIZE(args), args);
641 return mirror; 642 return mirror;
642 } 643 }
643 644
644 645
645 static Dart_Handle CreateMirroredError(Dart_Handle error) { 646 static Dart_Handle CreateMirroredError(Dart_Handle error) {
646 ASSERT(Dart_IsError(error)); 647 ASSERT(Dart_IsError(error));
647 if (Dart_IsUnhandledExceptionError(error)) { 648 if (Dart_IsUnhandledExceptionError(error)) {
648 Dart_Handle exc = Dart_ErrorGetException(error); 649 Dart_Handle exc = Dart_ErrorGetException(error);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 Dart_SetReturnValue(args, wrapped_result); 734 Dart_SetReturnValue(args, wrapped_result);
734 } 735 }
735 736
736 void HandleMirrorsMessage(Isolate* isolate, 737 void HandleMirrorsMessage(Isolate* isolate,
737 Dart_Port reply_port, 738 Dart_Port reply_port,
738 const Instance& message) { 739 const Instance& message) {
739 UNIMPLEMENTED(); 740 UNIMPLEMENTED();
740 } 741 }
741 742
742 } // namespace dart 743 } // namespace dart
OLDNEW
« 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