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

Unified Diff: src/objects.cc

Issue 1230343003: V8: Add SIMD functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove name table size hack. 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/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 687426bc76d6cdf7a9eb63c48ee077091243f97e..fc2ec2dd9812d89ad88a10b4e15f0167173c4390 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1634,6 +1634,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) ==
@@ -1657,6 +1660,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();
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698