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

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

Issue 1790593002: Move the VM's typed_data implementation to runtime/lib. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
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 "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 3473 matching lines...) Expand 10 before | Expand all | Expand 10 after
3484 DART_EXPORT Dart_Handle Dart_NewByteBuffer(Dart_Handle typed_data) { 3484 DART_EXPORT Dart_Handle Dart_NewByteBuffer(Dart_Handle typed_data) {
3485 DARTSCOPE(Thread::Current()); 3485 DARTSCOPE(Thread::Current());
3486 intptr_t class_id = Api::ClassId(typed_data); 3486 intptr_t class_id = Api::ClassId(typed_data);
3487 if (!RawObject::IsExternalTypedDataClassId(class_id) && 3487 if (!RawObject::IsExternalTypedDataClassId(class_id) &&
3488 !RawObject::IsTypedDataViewClassId(class_id) && 3488 !RawObject::IsTypedDataViewClassId(class_id) &&
3489 !RawObject::IsTypedDataClassId(class_id)) { 3489 !RawObject::IsTypedDataClassId(class_id)) {
3490 RETURN_TYPE_ERROR(Z, typed_data, 'TypedData'); 3490 RETURN_TYPE_ERROR(Z, typed_data, 'TypedData');
3491 } 3491 }
3492 Object& result = Object::Handle(Z); 3492 Object& result = Object::Handle(Z);
3493 result = GetByteBufferConstructor(T, 3493 result = GetByteBufferConstructor(T,
3494 Symbols::_ByteBuffer(), 3494 Symbols::ByteBuffer(),
3495 Symbols::_ByteBufferDot_New(), 3495 Symbols::ByteBufferDot_New(),
3496 1); 3496 1);
3497 ASSERT(!result.IsNull()); 3497 ASSERT(!result.IsNull());
3498 ASSERT(result.IsFunction()); 3498 ASSERT(result.IsFunction());
3499 const Function& factory = Function::Cast(result); 3499 const Function& factory = Function::Cast(result);
3500 ASSERT(!factory.IsGenerativeConstructor()); 3500 ASSERT(!factory.IsGenerativeConstructor());
3501 3501
3502 // Create the argument list. 3502 // Create the argument list.
3503 const Array& args = Array::Handle(Z, Array::New(2)); 3503 const Array& args = Array::Handle(Z, Array::New(2));
3504 // Factories get type arguments. 3504 // Factories get type arguments.
3505 args.SetAt(0, Object::null_type_arguments()); 3505 args.SetAt(0, Object::null_type_arguments());
(...skipping 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after
6223 return Api::Success(); 6223 return Api::Success();
6224 } 6224 }
6225 #endif // DART_PRECOMPILER 6225 #endif // DART_PRECOMPILER
6226 6226
6227 6227
6228 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { 6228 DART_EXPORT bool Dart_IsRunningPrecompiledCode() {
6229 return Dart::IsRunningPrecompiledCode(); 6229 return Dart::IsRunningPrecompiledCode();
6230 } 6230 }
6231 6231
6232 } // namespace dart 6232 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap.cc ('k') | runtime/vm/method_recognizer.h » ('j') | runtime/vm/vm.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698