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

Unified Diff: src/globals.h

Issue 1943323002: Reland of [turbofan] Restore basic write barrier elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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.cc ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/globals.h
diff --git a/src/globals.h b/src/globals.h
index 15ff8bfeb727842c6ea0c336ea23468eaadd9d09..c7e59198b10f805765991ec5320adce8b792eda0 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -452,6 +452,33 @@
kSimd128Unaligned
};
+// Supported write barrier modes.
+enum WriteBarrierKind : uint8_t {
+ kNoWriteBarrier,
+ kMapWriteBarrier,
+ kPointerWriteBarrier,
+ kFullWriteBarrier
+};
+
+inline size_t hash_value(WriteBarrierKind kind) {
+ return static_cast<uint8_t>(kind);
+}
+
+inline std::ostream& operator<<(std::ostream& os, WriteBarrierKind kind) {
+ switch (kind) {
+ case kNoWriteBarrier:
+ return os << "NoWriteBarrier";
+ case kMapWriteBarrier:
+ return os << "MapWriteBarrier";
+ case kPointerWriteBarrier:
+ return os << "PointerWriteBarrier";
+ case kFullWriteBarrier:
+ return os << "FullWriteBarrier";
+ }
+ UNREACHABLE();
+ return os;
+}
+
// A flag that indicates whether objects should be pretenured when
// allocated (allocated directly into the old generation) or not
// (allocated in the young generation if the object size and type
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698