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

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

Issue 24005002: Make TypedefMirror a direct descendant of TypeMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « no previous file | runtime/lib/mirrors_impl.dart » ('j') | sdk/lib/mirrors/mirrors.dart » ('J')
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 "lib/invocation_mirror.h" 5 #include "lib/invocation_mirror.h"
6 #include "vm/bootstrap_natives.h" 6 #include "vm/bootstrap_natives.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/exceptions.h" 9 #include "vm/exceptions.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 734
735 DEFINE_NATIVE_ENTRY(Mirrors_makeLocalMirrorSystem, 0) { 735 DEFINE_NATIVE_ENTRY(Mirrors_makeLocalMirrorSystem, 0) {
736 return CreateMirrorSystem(); 736 return CreateMirrorSystem();
737 } 737 }
738 738
739 739
740 DEFINE_NATIVE_ENTRY(Mirrors_makeLocalClassMirror, 1) { 740 DEFINE_NATIVE_ENTRY(Mirrors_makeLocalClassMirror, 1) {
741 GET_NON_NULL_NATIVE_ARGUMENT(Type, type, arguments->NativeArgAt(0)); 741 GET_NON_NULL_NATIVE_ARGUMENT(Type, type, arguments->NativeArgAt(0));
742 const Class& cls = Class::Handle(type.type_class()); 742 const Class& cls = Class::Handle(type.type_class());
743 ASSERT(!cls.IsNull()); 743 ASSERT(!cls.IsNull());
744 if (cls.IsDynamicClass() || cls.IsVoidClass()) { 744 if (cls.IsDynamicClass() ||
745 cls.IsVoidClass() ||
746 (cls.IsSignatureClass() && !cls.IsCanonicalSignatureClass())) {
745 Exceptions::ThrowArgumentError(type); 747 Exceptions::ThrowArgumentError(type);
746 UNREACHABLE(); 748 UNREACHABLE();
747 } 749 }
748 const Type& stripped_type = Type::Handle(cls.RareType()); 750 const Type& stripped_type = Type::Handle(cls.RareType());
749 return CreateClassMirror(cls, 751 return CreateClassMirror(cls,
750 stripped_type, 752 stripped_type,
751 Bool::True(), // is_declaration 753 Bool::True(), // is_declaration
752 Object::null_instance()); 754 Object::null_instance());
753 } 755 }
754 756
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1683 } 1685 }
1684 1686
1685 1687
1686 DEFINE_NATIVE_ENTRY(VariableMirror_type, 1) { 1688 DEFINE_NATIVE_ENTRY(VariableMirror_type, 1) {
1687 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); 1689 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
1688 const Field& field = Field::Handle(ref.GetFieldReferent()); 1690 const Field& field = Field::Handle(ref.GetFieldReferent());
1689 return field.type(); 1691 return field.type();
1690 } 1692 }
1691 1693
1692 } // namespace dart 1694 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/mirrors_impl.dart » ('j') | sdk/lib/mirrors/mirrors.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698