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

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

Issue 27226003: Do not hide membership of implementation classes in dart:core. (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
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 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
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())) {
rmacnak 2013/10/14 21:18:03 We originally filtered these out because we were u
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
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
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/mirrors_patch.dart » ('j') | tests/lib/mirrors/hierarchy_invariants_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698