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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 } else { | 845 } else { |
846 UNREACHABLE(); | 846 UNREACHABLE(); |
847 } | 847 } |
848 | 848 |
849 Class& klass = Class::Handle(); | 849 Class& klass = Class::Handle(); |
850 Library& library = Library::Handle(); | 850 Library& library = Library::Handle(); |
851 | 851 |
852 if (decl.IsClass()) { | 852 if (decl.IsClass()) { |
853 klass ^= decl.raw(); | 853 klass ^= decl.raw(); |
854 library = klass.library(); | 854 library = klass.library(); |
855 } else if (decl.IsFunction() && !Function::Cast(decl).IsSignatureFunction()) { | 855 } else if (decl.IsFunction()) { |
856 klass = Function::Cast(decl).origin(); | 856 klass = Function::Cast(decl).origin(); |
857 library = klass.library(); | 857 library = klass.library(); |
858 } else if (decl.IsField()) { | 858 } else if (decl.IsField()) { |
859 klass = Field::Cast(decl).Origin(); | 859 klass = Field::Cast(decl).Origin(); |
860 library = klass.library(); | 860 library = klass.library(); |
861 } else if (decl.IsLibrary()) { | 861 } else if (decl.IsLibrary()) { |
862 library ^= decl.raw(); | 862 library ^= decl.raw(); |
863 } else if (decl.IsTypeParameter()) { | 863 } else if (decl.IsTypeParameter()) { |
864 klass ^= TypeParameter::Cast(decl).parameterized_class(); | 864 klass ^= TypeParameter::Cast(decl).parameterized_class(); |
865 library = klass.library(); | 865 library = klass.library(); |
(...skipping 1151 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 |