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

Unified Diff: src/compiler/node-marker.h

Issue 2583043004: [turbofan] Do not set node's mark to min on get (Closed)
Patch Set: Created 4 years 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/node.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/node-marker.h
diff --git a/src/compiler/node-marker.h b/src/compiler/node-marker.h
index 84666d5f076747d7e1be76ced39f8d7c10dd4c79..e38105dd8b117352a4c416782a1614d4528b31a2 100644
--- a/src/compiler/node-marker.h
+++ b/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));
}
« no previous file with comments | « src/compiler/node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698