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

Unified Diff: src/objects.h

Issue 136333011: MIPS: Specialize FixedTypedArray<> set and get functions to solve unaligned double access. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: small fix Created 6 years, 11 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 | « no previous file | 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 c6f36bf63bdb3b4d31fba9c27b42bf8efff2f583..ff21a1fed2f59cd3881f8070647e23fee18f576c 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4895,8 +4895,12 @@ class FixedTypedArray: public FixedTypedArrayBase {
// Casting:
static inline FixedTypedArray<Traits>* cast(Object* obj);
+ static inline int ElementOffset(int index) {
+ return kDataOffset + index * sizeof(ElementType);
+ }
+
static inline int SizeFor(int length) {
- return kDataOffset + length * sizeof(ElementType);
+ return ElementOffset(length);
}
inline ElementType get_scalar(int index);
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698