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 2610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2621 | 2621 |
2622 | 2622 |
2623 static Dart_Handle NewExternalByteData( | 2623 static Dart_Handle NewExternalByteData( |
2624 Isolate* isolate, void* data, intptr_t length) { | 2624 Isolate* isolate, void* data, intptr_t length) { |
2625 Dart_Handle ext_data = NewExternalTypedData( | 2625 Dart_Handle ext_data = NewExternalTypedData( |
2626 isolate, kExternalTypedDataUint8ArrayCid, data, length); | 2626 isolate, kExternalTypedDataUint8ArrayCid, data, length); |
2627 if (::Dart_IsError(ext_data)) { | 2627 if (::Dart_IsError(ext_data)) { |
2628 return ext_data; | 2628 return ext_data; |
2629 } | 2629 } |
2630 Object& result = Object::Handle(isolate); | 2630 Object& result = Object::Handle(isolate); |
2631 result = GetByteDataConstructor(isolate, Symbols::ByteDataDotview(), 3); | 2631 result = GetByteDataConstructor(isolate, Symbols::ByteDataDot_view(), 3); |
2632 ASSERT(!result.IsNull()); | 2632 ASSERT(!result.IsNull()); |
2633 ASSERT(result.IsFunction()); | 2633 ASSERT(result.IsFunction()); |
2634 const Function& factory = Function::Cast(result); | 2634 const Function& factory = Function::Cast(result); |
2635 ASSERT(!factory.IsConstructor()); | 2635 ASSERT(!factory.IsConstructor()); |
2636 | 2636 |
2637 // Create the argument list. | 2637 // Create the argument list. |
2638 const intptr_t num_args = 3; | 2638 const intptr_t num_args = 3; |
2639 const Array& args = Array::Handle(isolate, Array::New(num_args + 1)); | 2639 const Array& args = Array::Handle(isolate, Array::New(num_args + 1)); |
2640 // Factories get type arguments. | 2640 // Factories get type arguments. |
2641 args.SetAt(0, TypeArguments::Handle(isolate)); | 2641 args.SetAt(0, TypeArguments::Handle(isolate)); |
(...skipping 1885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4527 } | 4527 } |
4528 | 4528 |
4529 | 4529 |
4530 // --- Service support --- | 4530 // --- Service support --- |
4531 | 4531 |
4532 DART_EXPORT Dart_Isolate Dart_GetServiceIsolate(void* callback_data) { | 4532 DART_EXPORT Dart_Isolate Dart_GetServiceIsolate(void* callback_data) { |
4533 return Api::CastIsolate(Service::GetServiceIsolate(callback_data)); | 4533 return Api::CastIsolate(Service::GetServiceIsolate(callback_data)); |
4534 } | 4534 } |
4535 | 4535 |
4536 } // namespace dart | 4536 } // namespace dart |
OLD | NEW |