| 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" | 5 #include "lib/mirrors.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/bootstrap_natives.h" | 8 #include "vm/bootstrap_natives.h" |
| 9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1363 const Array& args_descriptor = | 1363 const Array& args_descriptor = |
| 1364 Array::Handle(zone, ArgumentsDescriptor::New(args.Length())); | 1364 Array::Handle(zone, ArgumentsDescriptor::New(args.Length())); |
| 1365 | 1365 |
| 1366 return InvokeDynamicFunction(reflectee, setter, internal_setter_name, args, | 1366 return InvokeDynamicFunction(reflectee, setter, internal_setter_name, args, |
| 1367 args_descriptor); | 1367 args_descriptor); |
| 1368 } | 1368 } |
| 1369 | 1369 |
| 1370 | 1370 |
| 1371 DEFINE_NATIVE_ENTRY(InstanceMirror_computeType, 1) { | 1371 DEFINE_NATIVE_ENTRY(InstanceMirror_computeType, 1) { |
| 1372 GET_NON_NULL_NATIVE_ARGUMENT(Instance, instance, arguments->NativeArgAt(0)); | 1372 GET_NON_NULL_NATIVE_ARGUMENT(Instance, instance, arguments->NativeArgAt(0)); |
| 1373 const AbstractType& type = AbstractType::Handle(instance.GetType()); | 1373 const AbstractType& type = AbstractType::Handle(instance.GetType(Heap::kNew)); |
| 1374 // The static type of null is specified to be the bottom type, however, the | 1374 // The static type of null is specified to be the bottom type, however, the |
| 1375 // runtime type of null is the Null type, which we correctly return here. | 1375 // runtime type of null is the Null type, which we correctly return here. |
| 1376 return type.Canonicalize(); | 1376 return type.Canonicalize(); |
| 1377 } | 1377 } |
| 1378 | 1378 |
| 1379 | 1379 |
| 1380 DEFINE_NATIVE_ENTRY(ClosureMirror_function, 1) { | 1380 DEFINE_NATIVE_ENTRY(ClosureMirror_function, 1) { |
| 1381 GET_NON_NULL_NATIVE_ARGUMENT(Instance, closure, arguments->NativeArgAt(0)); | 1381 GET_NON_NULL_NATIVE_ARGUMENT(Instance, closure, arguments->NativeArgAt(0)); |
| 1382 ASSERT(!closure.IsNull()); | 1382 ASSERT(!closure.IsNull()); |
| 1383 | 1383 |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2017 | 2017 |
| 2018 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { | 2018 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { |
| 2019 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); | 2019 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); |
| 2020 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); | 2020 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); |
| 2021 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw(); | 2021 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw(); |
| 2022 } | 2022 } |
| 2023 | 2023 |
| 2024 #endif // !PRODUCT | 2024 #endif // !PRODUCT |
| 2025 | 2025 |
| 2026 } // namespace dart | 2026 } // namespace dart |
| OLD | NEW |