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

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: merge with generic interfaces and mixins 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') | 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 "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/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 return CreateMirrorSystem(); 832 return CreateMirrorSystem();
833 } 833 }
834 834
835 835
836 DEFINE_NATIVE_ENTRY(Mirrors_makeLocalClassMirror, 1) { 836 DEFINE_NATIVE_ENTRY(Mirrors_makeLocalClassMirror, 1) {
837 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0)); 837 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
838 ASSERT(!type.IsMalformed()); 838 ASSERT(!type.IsMalformed());
839 ASSERT(type.IsFinalized()); 839 ASSERT(type.IsFinalized());
840 ASSERT(type.HasResolvedTypeClass()); 840 ASSERT(type.HasResolvedTypeClass());
841 const Class& cls = Class::Handle(type.type_class()); 841 const Class& cls = Class::Handle(type.type_class());
842 if (cls.IsDynamicClass() || cls.IsVoidClass()) { 842 ASSERT(!cls.IsNull());
843 if (cls.IsDynamicClass() ||
844 cls.IsVoidClass() ||
845 (cls.IsSignatureClass() && !cls.IsCanonicalSignatureClass())) {
843 Exceptions::ThrowArgumentError(type); 846 Exceptions::ThrowArgumentError(type);
844 UNREACHABLE(); 847 UNREACHABLE();
845 } 848 }
846 return CreateClassMirror(cls, 849 return CreateClassMirror(cls,
847 AbstractType::Handle(cls.DeclarationType()), 850 AbstractType::Handle(cls.DeclarationType()),
848 Bool::True(), // is_declaration 851 Bool::True(), // is_declaration
849 Object::null_instance()); 852 Object::null_instance());
850 } 853 }
851 854
852 855
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 } 1966 }
1964 1967
1965 1968
1966 DEFINE_NATIVE_ENTRY(VariableMirror_type, 1) { 1969 DEFINE_NATIVE_ENTRY(VariableMirror_type, 1) {
1967 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); 1970 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
1968 const Field& field = Field::Handle(ref.GetFieldReferent()); 1971 const Field& field = Field::Handle(ref.GetFieldReferent());
1969 return field.type(); 1972 return field.type();
1970 } 1973 }
1971 1974
1972 } // namespace dart 1975 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/mirrors_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698