| 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/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/exceptions.h" | 9 #include "vm/exceptions.h" |
| 10 #include "vm/object_store.h" | 10 #include "vm/object_store.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 const Instance& owner_mirror) { | 252 const Instance& owner_mirror) { |
| 253 const MirrorReference& field_ref = | 253 const MirrorReference& field_ref = |
| 254 MirrorReference::Handle(MirrorReference::New(field)); | 254 MirrorReference::Handle(MirrorReference::New(field)); |
| 255 | 255 |
| 256 const String& name = String::Handle(field.UserVisibleName()); | 256 const String& name = String::Handle(field.UserVisibleName()); |
| 257 | 257 |
| 258 const Array& args = Array::Handle(Array::New(6)); | 258 const Array& args = Array::Handle(Array::New(6)); |
| 259 args.SetAt(0, field_ref); | 259 args.SetAt(0, field_ref); |
| 260 args.SetAt(1, name); | 260 args.SetAt(1, name); |
| 261 args.SetAt(2, owner_mirror); | 261 args.SetAt(2, owner_mirror); |
| 262 args.SetAt(3, Instance::Handle()); // Null for type. | 262 args.SetAt(3, Object::null_instance()); // Null for type. |
| 263 args.SetAt(4, Bool::Get(field.is_static())); | 263 args.SetAt(4, Bool::Get(field.is_static())); |
| 264 args.SetAt(5, Bool::Get(field.is_final())); | 264 args.SetAt(5, Bool::Get(field.is_final())); |
| 265 | 265 |
| 266 return CreateMirror(Symbols::_LocalVariableMirrorImpl(), args); | 266 return CreateMirror(Symbols::_LocalVariableMirrorImpl(), args); |
| 267 } | 267 } |
| 268 | 268 |
| 269 static RawFunction* CallMethod(const Class& cls) { | 269 static RawFunction* CallMethod(const Class& cls) { |
| 270 if (cls.IsSignatureClass()) { | 270 if (cls.IsSignatureClass()) { |
| 271 return cls.signature_function(); | 271 return cls.signature_function(); |
| 272 } | 272 } |
| (...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 } | 1406 } |
| 1407 | 1407 |
| 1408 | 1408 |
| 1409 DEFINE_NATIVE_ENTRY(VariableMirror_type, 1) { | 1409 DEFINE_NATIVE_ENTRY(VariableMirror_type, 1) { |
| 1410 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); | 1410 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); |
| 1411 const Field& field = Field::Handle(ref.GetFieldReferent()); | 1411 const Field& field = Field::Handle(ref.GetFieldReferent()); |
| 1412 return field.type(); | 1412 return field.type(); |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 } // namespace dart | 1415 } // namespace dart |
| OLD | NEW |