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

Unified Diff: src/objects.h

Issue 1128433006: Make sure fixed typed array is always double aligned for doubles (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/hydrogen.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 801e98674a817a13d6e0e8592fd1a0e36699a85b..75ec7fe9e0b96ba9943260b30571b843c8a7e9dc 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4642,8 +4642,7 @@ class ExternalArray: public FixedArrayBase {
// ExternalArray headers are not quadword aligned.
static const int kExternalPointerOffset =
POINTER_SIZE_ALIGN(FixedArrayBase::kLengthOffset + kPointerSize);
- static const int kHeaderSize = kExternalPointerOffset + kPointerSize;
- static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
+ static const int kSize = kExternalPointerOffset + kPointerSize;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalArray);
@@ -4885,7 +4884,7 @@ class FixedTypedArrayBase: public FixedArrayBase {
public:
DECLARE_CAST(FixedTypedArrayBase)
- static const int kDataOffset = kHeaderSize;
+ static const int kDataOffset = DOUBLE_POINTER_ALIGN(kHeaderSize);
inline int size();
@@ -4914,14 +4913,6 @@ class FixedTypedArray: public FixedTypedArrayBase {
DECLARE_CAST(FixedTypedArray<Traits>)
- static inline int ElementOffset(int index) {
- return kDataOffset + index * sizeof(ElementType);
- }
-
- static inline int SizeFor(int length) {
- return ElementOffset(length);
- }
-
inline ElementType get_scalar(int index);
static inline Handle<Object> get(Handle<FixedTypedArray> array, int index);
inline void set(int index, ElementType value);
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698