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