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

Side by Side Diff: runtime/vm/raw_object.h

Issue 11280121: Intrinsify ExternalUint8Array.[]. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #ifndef VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 if (callback_ != NULL) (*callback_)(peer_); 1357 if (callback_ != NULL) (*callback_)(peer_);
1358 } 1358 }
1359 1359
1360 T* data() { 1360 T* data() {
1361 return data_; 1361 return data_;
1362 } 1362 }
1363 void* peer() { 1363 void* peer() {
1364 return peer_; 1364 return peer_;
1365 } 1365 }
1366 1366
1367 static intptr_t data_offset() {
1368 return 0;
Florian Schneider 2012/11/21 15:15:17 I think OFFSET_OF(ExternalByteArrayData<T>, data
Mads Ager (google) 2012/11/21 15:31:34 Done.
1369 }
1370
1367 private: 1371 private:
1368 T* data_; 1372 T* data_;
1369 void* peer_; 1373 void* peer_;
1370 Dart_PeerFinalizer callback_; 1374 Dart_PeerFinalizer callback_;
1371 }; 1375 };
1372 1376
1373 1377
1374 class RawExternalInt8Array : public RawByteArray { 1378 class RawExternalInt8Array : public RawByteArray {
1375 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalInt8Array); 1379 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalInt8Array);
1376 1380
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 7 && 1638 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 7 &&
1635 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 8 && 1639 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 8 &&
1636 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 9 && 1640 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 9 &&
1637 kStacktraceCid == kExternalInt8ArrayCid + 10); 1641 kStacktraceCid == kExternalInt8ArrayCid + 10);
1638 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); 1642 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid);
1639 } 1643 }
1640 1644
1641 } // namespace dart 1645 } // namespace dart
1642 1646
1643 #endif // VM_RAW_OBJECT_H_ 1647 #endif // VM_RAW_OBJECT_H_
OLDNEW
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698