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

Unified Diff: src/objects.h

Issue 15562008: Recording array buffer views. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback Created 7 years, 6 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 | « src/heap.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 11b231f1335b3bef0e4c4ca6c293627f12d33c65..5c3b8a613a34d9a185fbbba5c3575fc7aec14526 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -8784,6 +8784,12 @@ class JSArrayBuffer: public JSObject {
inline bool is_external();
inline void set_is_external(bool value);
+ // [weak_next]: linked list of array buffers.
+ DECL_ACCESSORS(weak_next, Object)
+
+ // [weak_first_array]: weak linked list of typed arrays.
+ DECL_ACCESSORS(weak_first_array, Object)
+
// Casting.
static inline JSArrayBuffer* cast(Object* obj);
@@ -8794,7 +8800,12 @@ class JSArrayBuffer: public JSObject {
static const int kBackingStoreOffset = JSObject::kHeaderSize;
static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize;
static const int kFlagOffset = kByteLengthOffset + kPointerSize;
- static const int kSize = kFlagOffset + kPointerSize;
+ static const int kWeakNextOffset = kFlagOffset + kPointerSize;
+ static const int kWeakFirstArrayOffset = kWeakNextOffset + kPointerSize;
+ static const int kSize = kWeakFirstArrayOffset + kPointerSize;
+
+ static const int kSizeWithInternalFields =
+ kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize;
private:
// Bit position in a flag
@@ -8818,6 +8829,9 @@ class JSTypedArray: public JSObject {
// [length]: length of typed array in elements.
DECL_ACCESSORS(length, Object)
+ // [weak_next]: linked list of typed arrays over the same array buffer.
+ DECL_ACCESSORS(weak_next, Object)
+
// Casting.
static inline JSTypedArray* cast(Object* obj);
@@ -8832,7 +8846,8 @@ class JSTypedArray: public JSObject {
static const int kByteOffsetOffset = kBufferOffset + kPointerSize;
static const int kByteLengthOffset = kByteOffsetOffset + kPointerSize;
static const int kLengthOffset = kByteLengthOffset + kPointerSize;
- static const int kSize = kLengthOffset + kPointerSize;
+ static const int kWeakNextOffset = kLengthOffset + kPointerSize;
+ static const int kSize = kWeakNextOffset + kPointerSize;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSTypedArray);
« no previous file with comments | « src/heap.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698