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

Unified Diff: src/objects.h

Issue 15562008: Recording array buffer views. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added some more tests 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') | src/objects-visiting.cc » ('J')
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..6f2926190d8f8c152427eba6183475d7ae6013b6 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,11 @@ 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;
+ // It is important for GC visitor that weak_next and weak_first_array
+ // layed out consequtively in memory
+ static const int kWeakNextOffset = kFlagOffset + kPointerSize;
+ static const int kWeakFirstArrayOffset = kWeakNextOffset + kPointerSize;
+ static const int kSize = kWeakFirstArrayOffset + kPointerSize;
private:
// Bit position in a flag
@@ -8818,6 +8828,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.
Hannes Payer (out of office) 2013/06/06 09:33:35 should be called weak_next
Dmitry Lomov (no reviews) 2013/06/06 13:18:34 Done.
+ DECL_ACCESSORS(weak_next, Object)
+
// Casting.
static inline JSTypedArray* cast(Object* obj);
@@ -8832,7 +8845,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') | src/objects-visiting.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698