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

Unified Diff: src/elements.cc

Issue 90643003: Experimental implementation: Exposing SIMD instructions into JavaScript Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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/deoptimizer.cc ('k') | src/elements-kind.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index 0b745c4505fc2fa40b32bc472eb2f405f4eefed5..e8f8ab89c55dc13161a3152ab0a056a18ad43639 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -56,6 +56,7 @@
// - ExternalIntElementsAccessor
// - ExternalUnsignedIntElementsAccessor
// - ExternalFloatElementsAccessor
+// - ExternalFloat32x4ElementsAccessor
// - ExternalDoubleElementsAccessor
// - PixelElementsAccessor
// - DictionaryElementsAccessor
@@ -102,6 +103,10 @@ static const int kPackedSizeNotKnown = -1;
EXTERNAL_UNSIGNED_INT_ELEMENTS, ExternalUnsignedIntArray) \
V(ExternalFloatElementsAccessor, \
EXTERNAL_FLOAT_ELEMENTS, ExternalFloatArray) \
+ V(ExternalFloat32x4ElementsAccessor, \
+ EXTERNAL_FLOAT32x4_ELEMENTS, ExternalFloat32x4Array) \
+ V(ExternalInt32x4ElementsAccessor, \
+ EXTERNAL_INT32x4_ELEMENTS, ExternalInt32x4Array) \
V(ExternalDoubleElementsAccessor, \
EXTERNAL_DOUBLE_ELEMENTS, ExternalDoubleArray) \
V(PixelElementsAccessor, EXTERNAL_PIXEL_ELEMENTS, ExternalPixelArray)
@@ -1092,6 +1097,10 @@ static inline ElementsKind ElementsKindForArray(FixedArrayBase* array) {
return EXTERNAL_UNSIGNED_INT_ELEMENTS;
case EXTERNAL_FLOAT_ARRAY_TYPE:
return EXTERNAL_FLOAT_ELEMENTS;
+ case EXTERNAL_FLOAT32x4_ARRAY_TYPE:
+ return EXTERNAL_FLOAT32x4_ELEMENTS;
+ case EXTERNAL_INT32x4_ARRAY_TYPE:
+ return EXTERNAL_INT32x4_ELEMENTS;
case EXTERNAL_DOUBLE_ARRAY_TYPE:
return EXTERNAL_DOUBLE_ELEMENTS;
case EXTERNAL_PIXEL_ARRAY_TYPE:
@@ -1156,6 +1165,8 @@ class FastSmiOrObjectElementsAccessor
case EXTERNAL_INT_ELEMENTS:
case EXTERNAL_UNSIGNED_INT_ELEMENTS:
case EXTERNAL_FLOAT_ELEMENTS:
+ case EXTERNAL_FLOAT32x4_ELEMENTS:
+ case EXTERNAL_INT32x4_ELEMENTS:
case EXTERNAL_DOUBLE_ELEMENTS:
case EXTERNAL_PIXEL_ELEMENTS:
UNREACHABLE();
@@ -1281,6 +1292,8 @@ class FastDoubleElementsAccessor
case EXTERNAL_INT_ELEMENTS:
case EXTERNAL_UNSIGNED_INT_ELEMENTS:
case EXTERNAL_FLOAT_ELEMENTS:
+ case EXTERNAL_FLOAT32x4_ELEMENTS:
+ case EXTERNAL_INT32x4_ELEMENTS:
case EXTERNAL_DOUBLE_ELEMENTS:
case EXTERNAL_PIXEL_ELEMENTS:
UNREACHABLE();
@@ -1462,6 +1475,25 @@ class ExternalFloatElementsAccessor
EXTERNAL_FLOAT_ELEMENTS>(name) {}
};
+class ExternalFloat32x4ElementsAccessor
+ : public ExternalElementsAccessor<ExternalFloat32x4ElementsAccessor,
+ EXTERNAL_FLOAT32x4_ELEMENTS> {
+ public:
+ explicit ExternalFloat32x4ElementsAccessor(const char* name)
+ : ExternalElementsAccessor<ExternalFloat32x4ElementsAccessor,
+ EXTERNAL_FLOAT32x4_ELEMENTS>(name) {}
+};
+
+
+class ExternalInt32x4ElementsAccessor
+ : public ExternalElementsAccessor<ExternalInt32x4ElementsAccessor,
+ EXTERNAL_INT32x4_ELEMENTS> {
+ public:
+ explicit ExternalInt32x4ElementsAccessor(const char* name)
+ : ExternalElementsAccessor<ExternalInt32x4ElementsAccessor,
+ EXTERNAL_INT32x4_ELEMENTS>(name) {}
+};
+
class ExternalDoubleElementsAccessor
: public ExternalElementsAccessor<ExternalDoubleElementsAccessor,
« no previous file with comments | « src/deoptimizer.cc ('k') | src/elements-kind.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698