| 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" |
| 11 #include "vm/dart_entry.h" | 11 #include "vm/dart_entry.h" |
| 12 #include "vm/exceptions.h" | 12 #include "vm/exceptions.h" |
| 13 #include "vm/flags.h" | 13 #include "vm/flags.h" |
| 14 #include "vm/kernel_to_il.h" | 14 #include "vm/kernel_to_il.h" |
| 15 #include "vm/object_store.h" | 15 #include "vm/object_store.h" |
| 16 #include "vm/parser.h" | 16 #include "vm/parser.h" |
| 17 #include "vm/port.h" | 17 #include "vm/port.h" |
| 18 #include "vm/resolver.h" | 18 #include "vm/resolver.h" |
| 19 #include "vm/symbols.h" | 19 #include "vm/symbols.h" |
| 20 | 20 |
| 21 namespace dart { | 21 namespace dart { |
| 22 | 22 |
| 23 #ifndef PRODUCT | 23 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) |
| 24 | 24 |
| 25 #define PROPAGATE_IF_MALFORMED(type) \ | 25 #define PROPAGATE_IF_MALFORMED(type) \ |
| 26 if (type.IsMalformed()) { \ | 26 if (type.IsMalformed()) { \ |
| 27 Exceptions::PropagateError(Error::Handle(type.error())); \ | 27 Exceptions::PropagateError(Error::Handle(type.error())); \ |
| 28 } | 28 } |
| 29 | 29 |
| 30 static RawInstance* CreateMirror(const String& mirror_class_name, | 30 static RawInstance* CreateMirror(const String& mirror_class_name, |
| 31 const Array& constructor_arguments) { | 31 const Array& constructor_arguments) { |
| 32 const Library& mirrors_lib = Library::Handle(Library::MirrorsLibrary()); | 32 const Library& mirrors_lib = Library::Handle(Library::MirrorsLibrary()); |
| 33 const String& constructor_name = Symbols::Dot(); | 33 const String& constructor_name = Symbols::Dot(); |
| (...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2085 const AbstractType& type = AbstractType::Handle(field.type()); | 2085 const AbstractType& type = AbstractType::Handle(field.type()); |
| 2086 return InstantiateType(type, instantiator); | 2086 return InstantiateType(type, instantiator); |
| 2087 } | 2087 } |
| 2088 | 2088 |
| 2089 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { | 2089 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { |
| 2090 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); | 2090 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); |
| 2091 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); | 2091 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); |
| 2092 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw(); | 2092 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw(); |
| 2093 } | 2093 } |
| 2094 | 2094 |
| 2095 #endif // !PRODUCT | 2095 #endif // !PRODUCT && !DART_PRECOMPILED_RUNTIME |
| 2096 | 2096 |
| 2097 } // namespace dart | 2097 } // namespace dart |
| OLD | NEW |