| OLD | NEW |
| 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 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1110 | 1110 |
| 1111 Object& entry = Object::Handle(); | 1111 Object& entry = Object::Handle(); |
| 1112 DictionaryIterator entries(library); | 1112 DictionaryIterator entries(library); |
| 1113 | 1113 |
| 1114 AbstractType& type = AbstractType::Handle(); | 1114 AbstractType& type = AbstractType::Handle(); |
| 1115 | 1115 |
| 1116 while (entries.HasNext()) { | 1116 while (entries.HasNext()) { |
| 1117 entry = entries.GetNext(); | 1117 entry = entries.GetNext(); |
| 1118 if (entry.IsClass()) { | 1118 if (entry.IsClass()) { |
| 1119 const Class& klass = Class::Cast(entry); | 1119 const Class& klass = Class::Cast(entry); |
| 1120 // We filter out implementation classes like Smi, Mint, Bignum, | 1120 // We filter out function signature classes and dynamic. |
| 1121 // OneByteString; function signature classes; and dynamic. | 1121 // TODO(12478): Should not need to filter out dynamic. |
| 1122 if (!klass.IsCanonicalSignatureClass() && | 1122 if (!klass.IsCanonicalSignatureClass() && |
| 1123 !klass.IsDynamicClass() && | 1123 !klass.IsDynamicClass()) { |
| 1124 !RawObject::IsImplementationClassId(klass.id())) { | |
| 1125 type = klass.RareType(); | 1124 type = klass.RareType(); |
| 1126 member_mirror = CreateClassMirror(klass, | 1125 member_mirror = CreateClassMirror(klass, |
| 1127 type, | 1126 type, |
| 1128 Bool::True(), // is_declaration | 1127 Bool::True(), // is_declaration |
| 1129 owner_mirror); | 1128 owner_mirror); |
| 1130 member_mirrors.Add(member_mirror); | 1129 member_mirrors.Add(member_mirror); |
| 1131 } | 1130 } |
| 1132 } else if (entry.IsField()) { | 1131 } else if (entry.IsField()) { |
| 1133 const Field& field = Field::Cast(entry); | 1132 const Field& field = Field::Cast(entry); |
| 1134 member_mirror = CreateVariableMirror(field, owner_mirror); | 1133 member_mirror = CreateVariableMirror(field, owner_mirror); |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 } | 1854 } |
| 1856 | 1855 |
| 1857 | 1856 |
| 1858 DEFINE_NATIVE_ENTRY(VariableMirror_type, 1) { | 1857 DEFINE_NATIVE_ENTRY(VariableMirror_type, 1) { |
| 1859 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); | 1858 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); |
| 1860 const Field& field = Field::Handle(ref.GetFieldReferent()); | 1859 const Field& field = Field::Handle(ref.GetFieldReferent()); |
| 1861 return field.type(); | 1860 return field.type(); |
| 1862 } | 1861 } |
| 1863 | 1862 |
| 1864 } // namespace dart | 1863 } // namespace dart |
| OLD | NEW |