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/mirrors.h" |
| 6 |
5 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
6 #include "vm/bootstrap_natives.h" | 8 #include "vm/bootstrap_natives.h" |
7 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
8 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
9 #include "vm/dart_entry.h" | 11 #include "vm/dart_entry.h" |
10 #include "vm/exceptions.h" | 12 #include "vm/exceptions.h" |
11 #include "vm/object_store.h" | 13 #include "vm/object_store.h" |
12 #include "vm/parser.h" | 14 #include "vm/parser.h" |
13 #include "vm/port.h" | 15 #include "vm/port.h" |
14 #include "vm/resolver.h" | 16 #include "vm/resolver.h" |
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 member_mirrors.Add(member_mirror); | 1122 member_mirrors.Add(member_mirror); |
1121 } | 1123 } |
1122 } else if (entry.IsField()) { | 1124 } else if (entry.IsField()) { |
1123 const Field& field = Field::Cast(entry); | 1125 const Field& field = Field::Cast(entry); |
1124 if (!field.is_synthetic()) { | 1126 if (!field.is_synthetic()) { |
1125 member_mirror = CreateVariableMirror(field, owner_mirror); | 1127 member_mirror = CreateVariableMirror(field, owner_mirror); |
1126 member_mirrors.Add(member_mirror); | 1128 member_mirrors.Add(member_mirror); |
1127 } | 1129 } |
1128 } else if (entry.IsFunction()) { | 1130 } else if (entry.IsFunction()) { |
1129 const Function& func = Function::Cast(entry); | 1131 const Function& func = Function::Cast(entry); |
1130 if (func.kind() == RawFunction::kRegularFunction || | 1132 if (func.is_visible() && |
| 1133 (func.kind() == RawFunction::kRegularFunction || |
1131 func.kind() == RawFunction::kGetterFunction || | 1134 func.kind() == RawFunction::kGetterFunction || |
1132 func.kind() == RawFunction::kSetterFunction) { | 1135 func.kind() == RawFunction::kSetterFunction)) { |
1133 member_mirror = CreateMethodMirror(func, owner_mirror); | 1136 member_mirror = CreateMethodMirror(func, owner_mirror); |
1134 member_mirrors.Add(member_mirror); | 1137 member_mirrors.Add(member_mirror); |
1135 } | 1138 } |
1136 } | 1139 } |
1137 } | 1140 } |
1138 | 1141 |
1139 return member_mirrors.raw(); | 1142 return member_mirrors.raw(); |
1140 } | 1143 } |
1141 | 1144 |
1142 | 1145 |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1962 } | 1965 } |
1963 | 1966 |
1964 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { | 1967 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { |
1965 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); | 1968 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); |
1966 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); | 1969 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); |
1967 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); | 1970 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); |
1968 } | 1971 } |
1969 | 1972 |
1970 | 1973 |
1971 } // namespace dart | 1974 } // namespace dart |
OLD | NEW |