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

Unified Diff: src/objects.cc

Issue 1230343003: V8: Add SIMD functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add integer 'neg' functions. 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
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 1a0a3683b7b5568751aee4310d449549bdc4377c..9c19de4d252baa6a3bcf2f02808e5292ca176fa6 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1636,6 +1636,9 @@ void HeapNumber::HeapNumberPrint(std::ostream& os) { // NOLINT
#define READ_INT64_FIELD(p, offset) \
(*reinterpret_cast<const int64_t*>(FIELD_ADDR_CONST(p, offset)))
+#define READ_BYTE_FIELD(p, offset) \
+ (*reinterpret_cast<const byte*>(FIELD_ADDR_CONST(p, offset)))
+
bool Simd128Value::BitwiseEquals(const Simd128Value* other) const {
return READ_INT64_FIELD(this, kValueOffset) ==
@@ -1659,6 +1662,11 @@ uint32_t Simd128Value::Hash() const {
}
+void Simd128Value::CopyBits(void* destination) const {
+ memcpy(destination, &READ_BYTE_FIELD(this, kValueOffset), kSimd128Size);
+}
+
+
String* JSReceiver::class_name() {
if (IsJSFunction() || IsJSFunctionProxy()) {
return GetHeap()->Function_string();

Powered by Google App Engine
This is Rietveld 408576698