| 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/invocation_mirror.h" | 5 #include "lib/invocation_mirror.h" |
| 6 #include "vm/bootstrap_natives.h" | 6 #include "vm/bootstrap_natives.h" |
| 7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/exceptions.h" | 10 #include "vm/exceptions.h" |
| (...skipping 2092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2103 | 2103 |
| 2104 | 2104 |
| 2105 DEFINE_NATIVE_ENTRY(VariableMirror_type, 2) { | 2105 DEFINE_NATIVE_ENTRY(VariableMirror_type, 2) { |
| 2106 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); | 2106 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); |
| 2107 const Field& field = Field::Handle(ref.GetFieldReferent()); | 2107 const Field& field = Field::Handle(ref.GetFieldReferent()); |
| 2108 GET_NATIVE_ARGUMENT(AbstractType, instantiator, arguments->NativeArgAt(1)); | 2108 GET_NATIVE_ARGUMENT(AbstractType, instantiator, arguments->NativeArgAt(1)); |
| 2109 const AbstractType& type = AbstractType::Handle(field.type()); | 2109 const AbstractType& type = AbstractType::Handle(field.type()); |
| 2110 return InstantiateType(type, instantiator); | 2110 return InstantiateType(type, instantiator); |
| 2111 } | 2111 } |
| 2112 | 2112 |
| 2113 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { |
| 2114 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); |
| 2115 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); |
| 2116 return Bool::Get(a.IsSubtypeOf(b, NULL)).raw(); |
| 2117 } |
| 2118 |
| 2119 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { |
| 2120 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); |
| 2121 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); |
| 2122 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); |
| 2123 } |
| 2124 |
| 2125 |
| 2113 } // namespace dart | 2126 } // namespace dart |
| OLD | NEW |