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

Unified Diff: src/objects.h

Issue 1248483007: Store offset between fixed typed array base and data start in object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 5 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/mips64/lithium-mips64.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 4327f653095cf28f3053a6e9066dbb1354d52ee8..d8852427613ce939b7542b209bb5f39b0a522d63 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4536,6 +4536,10 @@ class FixedTypedArrayBase: public FixedArrayBase {
// [base_pointer]: For now, points to the FixedTypedArrayBase itself.
DECL_ACCESSORS(base_pointer, Object)
+ // [external_pointer]: For now, contains the offset between base_pointer and
+ // the start of the data.
+ DECL_ACCESSORS(external_pointer, void)
+
// Dispatched behavior.
inline void FixedTypedArrayBaseIterateBody(ObjectVisitor* v);
@@ -4544,11 +4548,12 @@ class FixedTypedArrayBase: public FixedArrayBase {
DECLARE_CAST(FixedTypedArrayBase)
- static const int kBasePointerOffset =
- FixedArrayBase::kHeaderSize + kPointerSize;
- static const int kHeaderSize = kBasePointerOffset + kPointerSize;
+ static const int kBasePointerOffset = FixedArrayBase::kHeaderSize;
+ static const int kExternalPointerOffset = kBasePointerOffset + kPointerSize;
+ static const int kHeaderSize =
+ DOUBLE_POINTER_ALIGN(kExternalPointerOffset + kPointerSize);
- static const int kDataOffset = DOUBLE_POINTER_ALIGN(kHeaderSize);
+ static const int kDataOffset = kHeaderSize;
inline int size();
« no previous file with comments | « src/mips64/lithium-mips64.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698