OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
8 | 8 |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 3869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3880 if (obj.IsType()) { | 3880 if (obj.IsType()) { |
3881 if (!Type::Cast(obj).IsFinalized()) { | 3881 if (!Type::Cast(obj).IsFinalized()) { |
3882 return Api::NewError( | 3882 return Api::NewError( |
3883 "%s expects argument 'target' to be a fully resolved type.", | 3883 "%s expects argument 'target' to be a fully resolved type.", |
3884 CURRENT_FUNC); | 3884 CURRENT_FUNC); |
3885 } | 3885 } |
3886 | 3886 |
3887 const Class& cls = Class::Handle(isolate, Type::Cast(obj).type_class()); | 3887 const Class& cls = Class::Handle(isolate, Type::Cast(obj).type_class()); |
3888 const Function& function = Function::Handle( | 3888 const Function& function = Function::Handle( |
3889 isolate, | 3889 isolate, |
3890 Resolver::ResolveStatic(cls, | 3890 Resolver::ResolveStaticAllowPrivate(cls, |
3891 function_name, | 3891 function_name, |
3892 number_of_arguments, | 3892 number_of_arguments, |
3893 Object::empty_array())); | 3893 Object::empty_array())); |
3894 if (function.IsNull()) { | 3894 if (function.IsNull()) { |
3895 const String& cls_name = String::Handle(isolate, cls.Name()); | 3895 const String& cls_name = String::Handle(isolate, cls.Name()); |
3896 return Api::NewError("%s: did not find static method '%s.%s'.", | 3896 return Api::NewError("%s: did not find static method '%s.%s'.", |
3897 CURRENT_FUNC, | 3897 CURRENT_FUNC, |
3898 cls_name.ToCString(), | 3898 cls_name.ToCString(), |
3899 function_name.ToCString()); | 3899 function_name.ToCString()); |
3900 } | 3900 } |
3901 // Setup args and check for malformed arguments in the arguments list. | 3901 // Setup args and check for malformed arguments in the arguments list. |
3902 result = SetupArguments(isolate, number_of_arguments, arguments, 0, &args); | 3902 result = SetupArguments(isolate, number_of_arguments, arguments, 0, &args); |
3903 if (!::Dart_IsError(result)) { | 3903 if (!::Dart_IsError(result)) { |
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5429 | 5429 |
5430 | 5430 |
5431 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 5431 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
5432 const char* name, | 5432 const char* name, |
5433 Dart_ServiceRequestCallback callback, | 5433 Dart_ServiceRequestCallback callback, |
5434 void* user_data) { | 5434 void* user_data) { |
5435 Service::RegisterRootEmbedderCallback(name, callback, user_data); | 5435 Service::RegisterRootEmbedderCallback(name, callback, user_data); |
5436 } | 5436 } |
5437 | 5437 |
5438 } // namespace dart | 5438 } // namespace dart |
OLD | NEW |