| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 } | 243 } |
| 244 | 244 |
| 245 | 245 |
| 246 static RawInstance* CreateTypedefMirror(const Class& cls, | 246 static RawInstance* CreateTypedefMirror(const Class& cls, |
| 247 const AbstractType& type, | 247 const AbstractType& type, |
| 248 const Bool& is_declaration, | 248 const Bool& is_declaration, |
| 249 const Instance& owner_mirror) { | 249 const Instance& owner_mirror) { |
| 250 const Array& args = Array::Handle(Array::New(6)); | 250 const Array& args = Array::Handle(Array::New(6)); |
| 251 args.SetAt(0, MirrorReference::Handle(MirrorReference::New(cls))); | 251 args.SetAt(0, MirrorReference::Handle(MirrorReference::New(cls))); |
| 252 args.SetAt(1, type); | 252 args.SetAt(1, type); |
| 253 args.SetAt(2, String::Handle(cls.UserVisibleName())); | 253 args.SetAt(2, String::Handle(cls.Name())); |
| 254 args.SetAt(3, Bool::Get(cls.NumTypeParameters() != 0)); | 254 args.SetAt(3, Bool::Get(cls.NumTypeParameters() != 0)); |
| 255 args.SetAt(4, cls.NumTypeParameters() == 0 ? Bool::False() : is_declaration); | 255 args.SetAt(4, cls.NumTypeParameters() == 0 ? Bool::False() : is_declaration); |
| 256 args.SetAt(5, owner_mirror); | 256 args.SetAt(5, owner_mirror); |
| 257 return CreateMirror(Symbols::_LocalTypedefMirror(), args); | 257 return CreateMirror(Symbols::_LocalTypedefMirror(), args); |
| 258 } | 258 } |
| 259 | 259 |
| 260 | 260 |
| 261 static RawInstance* CreateFunctionTypeMirror(const Class& cls, | 261 static RawInstance* CreateFunctionTypeMirror(const Class& cls, |
| 262 const AbstractType& type) { | 262 const AbstractType& type) { |
| 263 const Array& args = Array::Handle(Array::New(2)); | 263 const Array& args = Array::Handle(Array::New(2)); |
| (...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1945 | 1945 |
| 1946 DEFINE_NATIVE_ENTRY(VariableMirror_type, 2) { | 1946 DEFINE_NATIVE_ENTRY(VariableMirror_type, 2) { |
| 1947 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); | 1947 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); |
| 1948 const Field& field = Field::Handle(ref.GetFieldReferent()); | 1948 const Field& field = Field::Handle(ref.GetFieldReferent()); |
| 1949 GET_NATIVE_ARGUMENT(AbstractType, instantiator, arguments->NativeArgAt(1)); | 1949 GET_NATIVE_ARGUMENT(AbstractType, instantiator, arguments->NativeArgAt(1)); |
| 1950 const AbstractType& type = AbstractType::Handle(field.type()); | 1950 const AbstractType& type = AbstractType::Handle(field.type()); |
| 1951 return InstantiateType(type, instantiator); | 1951 return InstantiateType(type, instantiator); |
| 1952 } | 1952 } |
| 1953 | 1953 |
| 1954 } // namespace dart | 1954 } // namespace dart |
| OLD | NEW |