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

Unified Diff: src/globals.h

Issue 2080703006: [turbofan] Some strength reduction on Smi/HeapObject checks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/globals.h
diff --git a/src/globals.h b/src/globals.h
index c4bbc0cdd30793a598fe380784a254af70c803c6..a5838794c3c65497ea6f9db24c7ffa7f70b69a93 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -460,6 +460,26 @@ enum AllocationAlignment {
kSimd128Unaligned
};
+// Possible outcomes for decisions.
+enum class Decision : uint8_t { kUnknown, kTrue, kFalse };
+
+inline size_t hash_value(Decision decision) {
+ return static_cast<uint8_t>(decision);
+}
+
+inline std::ostream& operator<<(std::ostream& os, Decision decision) {
+ switch (decision) {
+ case Decision::kUnknown:
+ return os << "Unknown";
+ case Decision::kTrue:
+ return os << "True";
+ case Decision::kFalse:
+ return os << "False";
+ }
+ UNREACHABLE();
+ return os;
+}
+
// Supported write barrier modes.
enum WriteBarrierKind : uint8_t {
kNoWriteBarrier,
« no previous file with comments | « src/compiler/simplified-operator-reducer.cc ('k') | test/unittests/compiler/simplified-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698