| 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 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2017 if (cls.is_synthesized_class() && | 2017 if (cls.is_synthesized_class() && |
| 2018 !is_typedef && | 2018 !is_typedef && |
| 2019 !cls.is_mixin_app_alias() && | 2019 !cls.is_mixin_app_alias() && |
| 2020 !cls.is_enum_class()) { | 2020 !cls.is_enum_class()) { |
| 2021 return Instance::null(); // Synthetic. | 2021 return Instance::null(); // Synthetic. |
| 2022 } | 2022 } |
| 2023 script = cls.script(); | 2023 script = cls.script(); |
| 2024 token_pos = cls.token_pos(); | 2024 token_pos = cls.token_pos(); |
| 2025 } else if (decl.IsField()) { | 2025 } else if (decl.IsField()) { |
| 2026 const Field& field = Field::Cast(decl); | 2026 const Field& field = Field::Cast(decl); |
| 2027 const Class& owner = Class::Handle(field.owner()); | 2027 script = field.script(); |
| 2028 script = owner.script(); | |
| 2029 token_pos = field.token_pos(); | 2028 token_pos = field.token_pos(); |
| 2030 } else if (decl.IsTypeParameter()) { | 2029 } else if (decl.IsTypeParameter()) { |
| 2031 const TypeParameter& type_var = TypeParameter::Cast(decl); | 2030 const TypeParameter& type_var = TypeParameter::Cast(decl); |
| 2032 const Class& owner = Class::Handle(type_var.parameterized_class()); | 2031 const Class& owner = Class::Handle(type_var.parameterized_class()); |
| 2033 script = owner.script(); | 2032 script = owner.script(); |
| 2034 token_pos = type_var.token_pos(); | 2033 token_pos = type_var.token_pos(); |
| 2035 } else if (decl.IsLibrary()) { | 2034 } else if (decl.IsLibrary()) { |
| 2036 const Library& lib = Library::Cast(decl); | 2035 const Library& lib = Library::Cast(decl); |
| 2037 if (lib.raw() == Library::NativeWrappersLibrary()) { | 2036 if (lib.raw() == Library::NativeWrappersLibrary()) { |
| 2038 return Instance::null(); // No source. | 2037 return Instance::null(); // No source. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2107 } | 2106 } |
| 2108 | 2107 |
| 2109 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { | 2108 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { |
| 2110 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); | 2109 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); |
| 2111 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); | 2110 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); |
| 2112 return Bool::Get(a.IsSubtypeOf(b, NULL)).raw(); | 2111 return Bool::Get(a.IsSubtypeOf(b, NULL)).raw(); |
| 2113 } | 2112 } |
| 2114 | 2113 |
| 2115 | 2114 |
| 2116 } // namespace dart | 2115 } // namespace dart |
| OLD | NEW |