| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 "vm/bootstrap_natives.h" | 5 #include "vm/bootstrap_natives.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/exceptions.h" | 8 #include "vm/exceptions.h" |
| 9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
| 10 #include "vm/native_entry.h" | 10 #include "vm/native_entry.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } else { | 80 } else { |
| 81 Class& instance_class = Class::Handle(instance.clazz()); | 81 Class& instance_class = Class::Handle(instance.clazz()); |
| 82 function = instance_class.LookupDynamicFunction(member_name); | 82 function = instance_class.LookupDynamicFunction(member_name); |
| 83 while (function.IsNull()) { | 83 while (function.IsNull()) { |
| 84 instance_class = instance_class.SuperClass(); | 84 instance_class = instance_class.SuperClass(); |
| 85 if (instance_class.IsNull()) break; | 85 if (instance_class.IsNull()) break; |
| 86 function = instance_class.LookupDynamicFunction(member_name); | 86 function = instance_class.LookupDynamicFunction(member_name); |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 if (!function.IsNull()) { | 89 if (!function.IsNull()) { |
| 90 const int total_num_parameters = function.NumParameters(); | 90 const intptr_t total_num_parameters = function.NumParameters(); |
| 91 const Array& array = Array::Handle(Array::New(total_num_parameters - 1)); | 91 const Array& array = Array::Handle(Array::New(total_num_parameters - 1)); |
| 92 // Skip receiver. | 92 // Skip receiver. |
| 93 for (int i = 1; i < total_num_parameters; i++) { | 93 for (int i = 1; i < total_num_parameters; i++) { |
| 94 array.SetAt(i - 1, String::Handle(function.ParameterNameAt(i))); | 94 array.SetAt(i - 1, String::Handle(function.ParameterNameAt(i))); |
| 95 } | 95 } |
| 96 dart_arguments.SetAt(5, array); | 96 dart_arguments.SetAt(5, array); |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 Exceptions::ThrowByType(Exceptions::kNoSuchMethod, dart_arguments); | 99 Exceptions::ThrowByType(Exceptions::kNoSuchMethod, dart_arguments); |
| 100 return Object::null(); | 100 return Object::null(); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 } | 224 } |
| 225 | 225 |
| 226 | 226 |
| 227 DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) { | 227 DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) { |
| 228 const AbstractType& type = | 228 const AbstractType& type = |
| 229 AbstractType::CheckedHandle(arguments->NativeArgAt(0)); | 229 AbstractType::CheckedHandle(arguments->NativeArgAt(0)); |
| 230 return type.UserVisibleName(); | 230 return type.UserVisibleName(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 } // namespace dart | 233 } // namespace dart |
| OLD | NEW |