Chromium Code Reviews| 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 @@ enum AllocationAlignment { |
| kSimd128Unaligned |
| }; |
| +// Supported write barrier modes. |
| +enum WriteBarrierKind : uint8_t { |
|
Michael Starzinger
2016/05/02 17:20:37
nit: Does this have to be global or can we put it
Benedikt Meurer
2016/05/03 09:05:14
We need it for both machine and simplified operato
|
| + 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 |