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