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