Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 339763002: Make TypedList not implement ByteBuffer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/typed_data.dart ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after
3168 3168
3169 3169
3170 static Dart_Handle NewExternalByteData( 3170 static Dart_Handle NewExternalByteData(
3171 Isolate* isolate, void* data, intptr_t length) { 3171 Isolate* isolate, void* data, intptr_t length) {
3172 Dart_Handle ext_data = NewExternalTypedData( 3172 Dart_Handle ext_data = NewExternalTypedData(
3173 isolate, kExternalTypedDataUint8ArrayCid, data, length); 3173 isolate, kExternalTypedDataUint8ArrayCid, data, length);
3174 if (::Dart_IsError(ext_data)) { 3174 if (::Dart_IsError(ext_data)) {
3175 return ext_data; 3175 return ext_data;
3176 } 3176 }
3177 Object& result = Object::Handle(isolate); 3177 Object& result = Object::Handle(isolate);
3178 result = GetByteDataConstructor(isolate, Symbols::ByteDataDotview(), 3); 3178 result = GetByteDataConstructor(isolate, Symbols::ByteDataDot_view(), 3);
3179 ASSERT(!result.IsNull()); 3179 ASSERT(!result.IsNull());
3180 ASSERT(result.IsFunction()); 3180 ASSERT(result.IsFunction());
3181 const Function& factory = Function::Cast(result); 3181 const Function& factory = Function::Cast(result);
3182 ASSERT(!factory.IsConstructor()); 3182 ASSERT(!factory.IsConstructor());
3183 3183
3184 // Create the argument list. 3184 // Create the argument list.
3185 const intptr_t num_args = 3; 3185 const intptr_t num_args = 3;
3186 const Array& args = Array::Handle(isolate, Array::New(num_args + 1)); 3186 const Array& args = Array::Handle(isolate, Array::New(num_args + 1));
3187 // Factories get type arguments. 3187 // Factories get type arguments.
3188 args.SetAt(0, TypeArguments::Handle(isolate)); 3188 args.SetAt(0, TypeArguments::Handle(isolate));
(...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after
5188 5188
5189 5189
5190 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 5190 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
5191 const char* name, 5191 const char* name,
5192 Dart_ServiceRequestCallback callback, 5192 Dart_ServiceRequestCallback callback,
5193 void* user_data) { 5193 void* user_data) {
5194 Service::RegisterRootEmbedderCallback(name, callback, user_data); 5194 Service::RegisterRootEmbedderCallback(name, callback, user_data);
5195 } 5195 }
5196 5196
5197 } // namespace dart 5197 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/typed_data.dart ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698