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

Unified Diff: runtime/vm/object.h

Issue 11280121: Intrinsify ExternalUint8Array.[]. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Consistently use OFFSET_OF Created 8 years, 1 month 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') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 4e1a484cc39ae140e597adfad86517c72c4d572f..a740c2311ba20e7a756b1bbbf844d7d7b92c9acf 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -4565,7 +4565,7 @@ class Int8Array : public ByteArray {
static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
static intptr_t data_offset() {
- return length_offset() + kWordSize;
+ return OFFSET_OF(RawInt8Array, data_);
}
static intptr_t InstanceSize() {
@@ -4617,7 +4617,7 @@ class Uint8Array : public ByteArray {
static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
static intptr_t data_offset() {
- return length_offset() + kWordSize;
+ return OFFSET_OF(RawUint8Array, data_);
}
static intptr_t InstanceSize() {
@@ -4669,7 +4669,7 @@ class Int16Array : public ByteArray {
static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
static intptr_t data_offset() {
- return length_offset() + kWordSize;
+ return OFFSET_OF(RawInt16Array, data_);
}
static intptr_t InstanceSize() {
@@ -4721,7 +4721,7 @@ class Uint16Array : public ByteArray {
static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
static intptr_t data_offset() {
- return length_offset() + kWordSize;
+ return OFFSET_OF(RawUint16Array, data_);
}
static intptr_t InstanceSize() {
@@ -4773,7 +4773,7 @@ class Int32Array : public ByteArray {
static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
static intptr_t data_offset() {
- return length_offset() + kWordSize;
+ return OFFSET_OF(RawInt32Array, data_);
}
static intptr_t InstanceSize() {
@@ -4825,7 +4825,7 @@ class Uint32Array : public ByteArray {
static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
static intptr_t data_offset() {
- return length_offset() + kWordSize;
+ return OFFSET_OF(RawUint32Array, data_);
}
static intptr_t InstanceSize() {
@@ -4877,7 +4877,7 @@ class Int64Array : public ByteArray {
static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
static intptr_t data_offset() {
- return length_offset() + kWordSize;
+ return OFFSET_OF(RawInt64Array, data_);
}
static intptr_t InstanceSize() {
@@ -4929,7 +4929,7 @@ class Uint64Array : public ByteArray {
static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
static intptr_t data_offset() {
- return length_offset() + kWordSize;
+ return OFFSET_OF(RawUint64Array, data_);
}
static intptr_t InstanceSize() {
@@ -4981,7 +4981,7 @@ class Float32Array : public ByteArray {
static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
static intptr_t data_offset() {
- return length_offset() + kWordSize;
+ return OFFSET_OF(RawFloat32Array, data_);
}
static intptr_t InstanceSize() {
@@ -5038,7 +5038,7 @@ class Float64Array : public ByteArray {
}
static intptr_t data_offset() {
- return length_offset() + kWordSize;
+ return OFFSET_OF(RawFloat64Array, data_);
}
static intptr_t InstanceSize(intptr_t len) {
@@ -5157,6 +5157,10 @@ class ExternalUint8Array : public ByteArray {
return RoundedAllocationSize(sizeof(RawExternalUint8Array));
}
+ static intptr_t external_data_offset() {
+ return OFFSET_OF(RawExternalUint8Array, external_data_);
+ }
+
static RawExternalUint8Array* New(uint8_t* data,
intptr_t len,
void* peer,
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698