| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 static RawInstance* CreateMethodMirror(const Function& func, | 239 static RawInstance* CreateMethodMirror(const Function& func, |
| 240 const Instance& owner_mirror) { | 240 const Instance& owner_mirror) { |
| 241 const Array& args = Array::Handle(Array::New(12)); | 241 const Array& args = Array::Handle(Array::New(12)); |
| 242 args.SetAt(0, MirrorReference::Handle(MirrorReference::New(func))); | 242 args.SetAt(0, MirrorReference::Handle(MirrorReference::New(func))); |
| 243 | 243 |
| 244 String& name = String::Handle(func.name()); | 244 String& name = String::Handle(func.name()); |
| 245 name = String::IdentifierPrettyNameRetainPrivate(name); | 245 name = String::IdentifierPrettyNameRetainPrivate(name); |
| 246 args.SetAt(1, name); | 246 args.SetAt(1, name); |
| 247 | 247 |
| 248 args.SetAt(2, owner_mirror); | 248 args.SetAt(2, owner_mirror); |
| 249 args.SetAt(3, Bool::Get(func.is_static())); | 249 args.SetAt(3, Bool::Get(func.is_static() && !func.IsClosureFunction())); |
| 250 args.SetAt(4, Bool::Get(func.is_abstract())); | 250 args.SetAt(4, Bool::Get(func.is_abstract())); |
| 251 args.SetAt(5, Bool::Get(func.IsGetterFunction())); | 251 args.SetAt(5, Bool::Get(func.IsGetterFunction())); |
| 252 args.SetAt(6, Bool::Get(func.IsSetterFunction())); | 252 args.SetAt(6, Bool::Get(func.IsSetterFunction())); |
| 253 | 253 |
| 254 bool isConstructor = (func.kind() == RawFunction::kConstructor); | 254 bool isConstructor = (func.kind() == RawFunction::kConstructor); |
| 255 args.SetAt(7, Bool::Get(isConstructor)); | 255 args.SetAt(7, Bool::Get(isConstructor)); |
| 256 args.SetAt(8, Bool::Get(isConstructor && func.is_const())); | 256 args.SetAt(8, Bool::Get(isConstructor && func.is_const())); |
| 257 args.SetAt(9, Bool::Get(isConstructor && func.IsConstructor())); | 257 args.SetAt(9, Bool::Get(isConstructor && func.IsConstructor())); |
| 258 args.SetAt(10, Bool::Get(isConstructor && func.is_redirecting())); | 258 args.SetAt(10, Bool::Get(isConstructor && func.is_redirecting())); |
| 259 args.SetAt(11, Bool::Get(isConstructor && func.IsFactory())); | 259 args.SetAt(11, Bool::Get(isConstructor && func.IsFactory())); |
| (...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1956 } | 1956 } |
| 1957 | 1957 |
| 1958 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { | 1958 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { |
| 1959 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); | 1959 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); |
| 1960 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); | 1960 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); |
| 1961 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); | 1961 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); |
| 1962 } | 1962 } |
| 1963 | 1963 |
| 1964 | 1964 |
| 1965 } // namespace dart | 1965 } // namespace dart |
| OLD | NEW |