| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 3252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3263 DART_EXPORT Dart_Handle Dart_Invoke(Dart_Handle target, | 3263 DART_EXPORT Dart_Handle Dart_Invoke(Dart_Handle target, |
| 3264 Dart_Handle name, | 3264 Dart_Handle name, |
| 3265 int number_of_arguments, | 3265 int number_of_arguments, |
| 3266 Dart_Handle* arguments) { | 3266 Dart_Handle* arguments) { |
| 3267 Isolate* isolate = Isolate::Current(); | 3267 Isolate* isolate = Isolate::Current(); |
| 3268 DARTSCOPE(isolate); | 3268 DARTSCOPE(isolate); |
| 3269 CHECK_CALLBACK_STATE(isolate); | 3269 CHECK_CALLBACK_STATE(isolate); |
| 3270 // TODO(turnidge): This is a bit simplistic. It overcounts when | 3270 // TODO(turnidge): This is a bit simplistic. It overcounts when |
| 3271 // other operations (gc, compilation) are active. | 3271 // other operations (gc, compilation) are active. |
| 3272 TIMERSCOPE(isolate, time_dart_execution); | 3272 TIMERSCOPE(isolate, time_dart_execution); |
| 3273 VMTagScope tagScope(isolate, VMTag::kScriptTagId); |
| 3273 | 3274 |
| 3274 const String& function_name = Api::UnwrapStringHandle(isolate, name); | 3275 const String& function_name = Api::UnwrapStringHandle(isolate, name); |
| 3275 if (function_name.IsNull()) { | 3276 if (function_name.IsNull()) { |
| 3276 RETURN_TYPE_ERROR(isolate, name, String); | 3277 RETURN_TYPE_ERROR(isolate, name, String); |
| 3277 } | 3278 } |
| 3278 if (number_of_arguments < 0) { | 3279 if (number_of_arguments < 0) { |
| 3279 return Api::NewError( | 3280 return Api::NewError( |
| 3280 "%s expects argument 'number_of_arguments' to be non-negative.", | 3281 "%s expects argument 'number_of_arguments' to be non-negative.", |
| 3281 CURRENT_FUNC); | 3282 CURRENT_FUNC); |
| 3282 } | 3283 } |
| (...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4632 | 4633 |
| 4633 | 4634 |
| 4634 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 4635 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
| 4635 const char* name, | 4636 const char* name, |
| 4636 Dart_ServiceRequestCallback callback, | 4637 Dart_ServiceRequestCallback callback, |
| 4637 void* user_data) { | 4638 void* user_data) { |
| 4638 Service::RegisterRootEmbedderCallback(name, callback, user_data); | 4639 Service::RegisterRootEmbedderCallback(name, callback, user_data); |
| 4639 } | 4640 } |
| 4640 | 4641 |
| 4641 } // namespace dart | 4642 } // namespace dart |
| OLD | NEW |