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

Unified Diff: runtime/vm/object.h

Issue 12547018: Add the allocator intrinsics for dart:typeddata implementation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 19729)
+++ runtime/vm/object.h (working copy)
@@ -4972,6 +4972,11 @@
return element_size[class_id - kTypedDataInt8ArrayCid];
}
+ static intptr_t MaxElements(intptr_t class_id) {
+ ASSERT(RawObject::IsTypedDataClassId(class_id));
+ return (kSmiMax / ElementSizeInBytes(class_id));
+ }
+
static RawTypedData* New(intptr_t class_id,
intptr_t len,
Heap::Space space = Heap::kNew);
@@ -5050,6 +5055,11 @@
return TypedData::element_size[class_id - kExternalTypedDataInt8ArrayCid];
}
+ static intptr_t MaxElements(intptr_t class_id) {
+ ASSERT(RawObject::IsExternalTypedDataClassId(class_id));
+ return (kSmiMax / ElementSizeInBytes(class_id));
+ }
+
static RawExternalTypedData* New(intptr_t class_id,
uint8_t* data,
intptr_t len,
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698