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

Unified Diff: src/types-inl.h

Issue 1303863002: [simd] Introduce SIMD types (as classes) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/types.cc ('k') | test/cctest/types-fuzz.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/types-inl.h
diff --git a/src/types-inl.h b/src/types-inl.h
index 084f5db812d79e5431a7bf0877d1417151e4fef2..699d642d590296158597f7e6c97ca470a901585c 100644
--- a/src/types-inl.h
+++ b/src/types-inl.h
@@ -16,19 +16,29 @@ namespace internal {
// -----------------------------------------------------------------------------
// TypeImpl
-template <class Config>
+template<class Config>
typename TypeImpl<Config>::bitset TypeImpl<Config>::BitsetType::SignedSmall() {
return i::SmiValuesAre31Bits() ? kSigned31 : kSigned32;
}
-template <class Config>
+template<class Config>
typename TypeImpl<Config>::bitset
TypeImpl<Config>::BitsetType::UnsignedSmall() {
return i::SmiValuesAre31Bits() ? kUnsigned30 : kUnsigned31;
}
+#define CONSTRUCT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) \
+template<class Config> \
+typename TypeImpl<Config>::TypeHandle TypeImpl<Config>::Name( \
+ Isolate* isolate, Region* region) { \
+ return Class(i::handle(isolate->heap()->name##_map()), region); \
+}
+SIMD128_TYPES(CONSTRUCT_SIMD_TYPE)
+#undef CONSTRUCT_SIMD_TYPE
+
+
template<class Config>
TypeImpl<Config>* TypeImpl<Config>::cast(typename Config::Base* object) {
TypeImpl* t = static_cast<TypeImpl*>(object);
« no previous file with comments | « src/types.cc ('k') | test/cctest/types-fuzz.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698