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

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

Issue 529053002: Make Dart API Dart_IsTypedData work for typed data views (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | « no previous file | runtime/vm/dart_api_impl_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 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1854 const Instance& closure_obj = 1854 const Instance& closure_obj =
1855 Api::UnwrapInstanceHandle(reused_obj_handle, object); 1855 Api::UnwrapInstanceHandle(reused_obj_handle, object);
1856 return (!closure_obj.IsNull() && closure_obj.IsClosure()); 1856 return (!closure_obj.IsNull() && closure_obj.IsClosure());
1857 } 1857 }
1858 1858
1859 1859
1860 DART_EXPORT bool Dart_IsTypedData(Dart_Handle handle) { 1860 DART_EXPORT bool Dart_IsTypedData(Dart_Handle handle) {
1861 TRACE_API_CALL(CURRENT_FUNC); 1861 TRACE_API_CALL(CURRENT_FUNC);
1862 intptr_t cid = Api::ClassId(handle); 1862 intptr_t cid = Api::ClassId(handle);
1863 return RawObject::IsTypedDataClassId(cid) || 1863 return RawObject::IsTypedDataClassId(cid) ||
1864 RawObject::IsExternalTypedDataClassId(cid); 1864 RawObject::IsExternalTypedDataClassId(cid) ||
1865 RawObject::IsTypedDataViewClassId(cid);
1865 } 1866 }
1866 1867
1867 1868
1868 DART_EXPORT bool Dart_IsByteBuffer(Dart_Handle handle) { 1869 DART_EXPORT bool Dart_IsByteBuffer(Dart_Handle handle) {
1869 TRACE_API_CALL(CURRENT_FUNC); 1870 TRACE_API_CALL(CURRENT_FUNC);
1870 return Api::ClassId(handle) == kByteBufferCid; 1871 return Api::ClassId(handle) == kByteBufferCid;
1871 } 1872 }
1872 1873
1873 1874
1874 // --- Instances ---- 1875 // --- Instances ----
(...skipping 3480 matching lines...) Expand 10 before | Expand all | Expand 10 after
5355 5356
5356 5357
5357 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 5358 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
5358 const char* name, 5359 const char* name,
5359 Dart_ServiceRequestCallback callback, 5360 Dart_ServiceRequestCallback callback,
5360 void* user_data) { 5361 void* user_data) {
5361 Service::RegisterRootEmbedderCallback(name, callback, user_data); 5362 Service::RegisterRootEmbedderCallback(name, callback, user_data);
5362 } 5363 }
5363 5364
5364 } // namespace dart 5365 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698