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

Unified Diff: src/objects.h

Issue 15562008: Recording array buffer views. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index d466f6571515d3eeb8aaf5b082f7591c36cfd89c..6daa9000e6e8e6968dfccd95b146da497820907a 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -8743,7 +8743,6 @@ class JSWeakMap: public JSObject {
static const int kNextOffset = kTableOffset + kPointerSize;
static const int kSize = kNextOffset + kPointerSize;
- private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakMap);
};
@@ -8756,6 +8755,12 @@ class JSArrayBuffer: public JSObject {
// [byte_length]: length in bytes
DECL_ACCESSORS(byte_length, Object)
+ // [next]: linked list of encountered array buffers during GC.
+ DECL_ACCESSORS(next, Object)
+
+ // [first_array]: weak linked list of typed arrays.
+ DECL_ACCESSORS(first_array, Object)
+
// Casting.
static inline JSArrayBuffer* cast(Object* obj);
@@ -8765,7 +8770,9 @@ class JSArrayBuffer: public JSObject {
static const int kBackingStoreOffset = JSObject::kHeaderSize;
static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize;
- static const int kSize = kByteLengthOffset + kPointerSize;
+ static const int kNextOffset = kByteLengthOffset + kPointerSize;
+ static const int kFirstArrayOffset = kNextOffset + kPointerSize;
+ static const int kSize = kFirstArrayOffset + kPointerSize;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer);
@@ -8786,6 +8793,9 @@ class JSTypedArray: public JSObject {
// [length]: length of typed array in elements.
DECL_ACCESSORS(length, Object)
+ // [next]: linked list of typed arrays over the same array buffer.
+ DECL_ACCESSORS(next, Object)
+
// Casting.
static inline JSTypedArray* cast(Object* obj);
@@ -8800,7 +8810,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 kNextOffset = kLengthOffset + kLengthOffset;
+ static const int kSize = kNextOffset + kPointerSize;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSTypedArray);
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects-inl.h » ('j') | src/objects-visiting-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698