Index: src/compiler/simplified-operator.cc |
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc |
index 30b9784a2d093b6804a8895413ab2743c1ea8489..bb2e76be7169cfea70757f0f9dc442e97efd47e0 100644 |
--- a/src/compiler/simplified-operator.cc |
+++ b/src/compiler/simplified-operator.cc |
@@ -4,6 +4,8 @@ |
#include "src/compiler/simplified-operator.h" |
+#include <ostream> // NOLINT(readability/streams) |
+ |
#include "src/base/lazy-instance.h" |
#include "src/compiler/opcodes.h" |
#include "src/compiler/operator.h" |
@@ -25,6 +27,18 @@ std::ostream& operator<<(std::ostream& os, BaseTaggedness base_taggedness) { |
} |
+std::ostream& operator<<(std::ostream& os, BoundsCheckMode bounds_check_mode) { |
+ switch (bounds_check_mode) { |
+ case kNoBoundsCheck: |
+ return os << "no bounds check"; |
+ case kTypedArrayBoundsCheck: |
+ return os << "ignore out of bounds"; |
+ } |
+ UNREACHABLE(); |
+ return os; |
+} |
+ |
+ |
bool operator==(ElementAccess const& lhs, ElementAccess const& rhs) { |
return lhs.base_is_tagged == rhs.base_is_tagged && |
lhs.header_size == rhs.header_size && lhs.type == rhs.type && |
@@ -40,7 +54,7 @@ bool operator!=(ElementAccess const& lhs, ElementAccess const& rhs) { |
std::ostream& operator<<(std::ostream& os, ElementAccess const& access) { |
os << "[" << access.base_is_tagged << ", " << access.header_size << ", "; |
access.type->PrintTo(os); |
- os << ", " << access.machine_type << "]"; |
+ os << ", " << access.machine_type << ", " << access.bounds_check << "]"; |
return os; |
} |