Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index b0222f660f79d6adb3d8e75d3210133353bb96f6..0ebbe2ce9995a03771b27278cf9a97f8c4d1fcc4 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -97,6 +97,7 @@ bool Object::BooleanValue() { |
if (IsUndetectableObject()) return false; // Undetectable object is false. |
if (IsString()) return String::cast(this)->length() != 0; |
if (IsHeapNumber()) return HeapNumber::cast(this)->HeapNumberBooleanValue(); |
+ if (IsFloat32x4()) return true; // Simd value types always evaluate to true. |
return true; |
} |
@@ -1400,6 +1401,12 @@ void HeapObject::HeapObjectShortPrint(std::ostream& os) { // NOLINT |
os << '>'; |
break; |
} |
+ case FLOAT32X4_TYPE: { |
+ os << "<Float32x4: "; |
+ Float32x4::cast(this)->Float32x4Print(os); |
+ os << ">"; |
+ break; |
+ } |
case JS_PROXY_TYPE: |
os << "<JSProxy>"; |
break; |
@@ -1546,6 +1553,7 @@ void HeapObject::IterateBody(InstanceType type, int object_size, |
case HEAP_NUMBER_TYPE: |
case MUTABLE_HEAP_NUMBER_TYPE: |
+ case FLOAT32X4_TYPE: |
case FILLER_TYPE: |
case BYTE_ARRAY_TYPE: |
case FREE_SPACE_TYPE: |
@@ -1591,6 +1599,12 @@ void HeapNumber::HeapNumberPrint(std::ostream& os) { // NOLINT |
} |
+void Float32x4::Float32x4Print(std::ostream& os) { // NOLINT |
+ os << get_lane(0) << ", " << get_lane(1) << ", " << get_lane(2) << ", " |
+ << get_lane(3); |
+} |
+ |
+ |
String* JSReceiver::class_name() { |
if (IsJSFunction() || IsJSFunctionProxy()) { |
return GetHeap()->Function_string(); |