diff options
Diffstat (limited to 'deps/v8/src/compiler/node-marker.h')
-rw-r--r-- | deps/v8/src/compiler/node-marker.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/deps/v8/src/compiler/node-marker.h b/deps/v8/src/compiler/node-marker.h index 84666d5f07..e38105dd8b 100644 --- a/deps/v8/src/compiler/node-marker.h +++ b/deps/v8/src/compiler/node-marker.h @@ -20,11 +20,10 @@ class NodeMarkerBase { public: NodeMarkerBase(Graph* graph, uint32_t num_states); - V8_INLINE Mark Get(Node* node) { + V8_INLINE Mark Get(const Node* node) { Mark mark = node->mark(); if (mark < mark_min_) { - mark = mark_min_; - node->set_mark(mark_min_); + return 0; } DCHECK_LT(mark, mark_max_); return mark - mark_min_; @@ -52,9 +51,9 @@ class NodeMarkerBase { // set to State(0) in constant time. // // In its current implementation, in debug mode NodeMarker will try to -// (efficiently) detect invalid use of an older NodeMarker. Namely, if you get -// or set a node with a NodeMarker, and then get or set that node -// with an older NodeMarker you will get a crash. +// (efficiently) detect invalid use of an older NodeMarker. Namely, if you set a +// node with a NodeMarker, and then get or set that node with an older +// NodeMarker you will get a crash. // // GraphReducer uses a NodeMarker, so individual Reducers cannot use a // NodeMarker. @@ -64,7 +63,7 @@ class NodeMarker : public NodeMarkerBase { V8_INLINE NodeMarker(Graph* graph, uint32_t num_states) : NodeMarkerBase(graph, num_states) {} - V8_INLINE State Get(Node* node) { + V8_INLINE State Get(const Node* node) { return static_cast<State>(NodeMarkerBase::Get(node)); } |