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

Unified Diff: src/compiler/simplified-operator.cc

Issue 617853002: [turbofan] Add BoundsCheckMode to ElementAccess. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rename Created 6 years, 3 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/compiler/simplified-operator.h ('k') | src/compiler/simplified-operator-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/compiler/simplified-operator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698