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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 const Array& functions = Array::Handle(klass.functions()); | 1289 const Array& functions = Array::Handle(klass.functions()); |
1290 const intptr_t num_functions = functions.Length(); | 1290 const intptr_t num_functions = functions.Length(); |
1291 | 1291 |
1292 Instance& constructor_mirror = Instance::Handle(); | 1292 Instance& constructor_mirror = Instance::Handle(); |
1293 const GrowableObjectArray& constructor_mirrors = GrowableObjectArray::Handle( | 1293 const GrowableObjectArray& constructor_mirrors = GrowableObjectArray::Handle( |
1294 GrowableObjectArray::New(num_functions)); | 1294 GrowableObjectArray::New(num_functions)); |
1295 | 1295 |
1296 Function& func = Function::Handle(); | 1296 Function& func = Function::Handle(); |
1297 for (intptr_t i = 0; i < num_functions; i++) { | 1297 for (intptr_t i = 0; i < num_functions; i++) { |
1298 func ^= functions.At(i); | 1298 func ^= functions.At(i); |
1299 if (func.kind() == RawFunction::kConstructor) { | 1299 if (func.is_visible() && func.kind() == RawFunction::kConstructor) { |
1300 constructor_mirror = CreateMethodMirror(func, owner_mirror); | 1300 constructor_mirror = CreateMethodMirror(func, owner_mirror); |
1301 constructor_mirrors.Add(constructor_mirror); | 1301 constructor_mirrors.Add(constructor_mirror); |
1302 } | 1302 } |
1303 } | 1303 } |
1304 | 1304 |
1305 return constructor_mirrors.raw(); | 1305 return constructor_mirrors.raw(); |
1306 } | 1306 } |
1307 | 1307 |
1308 | 1308 |
1309 DEFINE_NATIVE_ENTRY(LibraryMirror_members, 2) { | 1309 DEFINE_NATIVE_ENTRY(LibraryMirror_members, 2) { |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2246 } | 2246 } |
2247 | 2247 |
2248 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { | 2248 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { |
2249 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); | 2249 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); |
2250 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); | 2250 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); |
2251 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); | 2251 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); |
2252 } | 2252 } |
2253 | 2253 |
2254 | 2254 |
2255 } // namespace dart | 2255 } // namespace dart |
OLD | NEW |