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

Side by Side Diff: src/compiler/graph.cc

Issue 1178403004: [turbofan] Use appropriate type for NodeId. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix useless static_cast. Created 5 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 unified diff | Download patch
« no previous file with comments | « src/compiler/graph.h ('k') | src/compiler/graph-reducer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/graph.h" 5 #include "src/compiler/graph.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/compiler/node.h" 10 #include "src/compiler/node.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 DCHECK_LE(op->ValueInputCount(), input_count); 46 DCHECK_LE(op->ValueInputCount(), input_count);
47 Node* const node = 47 Node* const node =
48 Node::New(zone(), NextNodeId(), op, input_count, inputs, incomplete); 48 Node::New(zone(), NextNodeId(), op, input_count, inputs, incomplete);
49 Decorate(node, incomplete); 49 Decorate(node, incomplete);
50 return node; 50 return node;
51 } 51 }
52 52
53 53
54 NodeId Graph::NextNodeId() { 54 NodeId Graph::NextNodeId() {
55 NodeId const id = next_node_id_; 55 NodeId const id = next_node_id_;
56 CHECK(!base::bits::SignedAddOverflow32(id, 1, &next_node_id_)); 56 CHECK(!base::bits::UnsignedAddOverflow32(id, 1, &next_node_id_));
57 return id; 57 return id;
58 } 58 }
59 59
60 } // namespace compiler 60 } // namespace compiler
61 } // namespace internal 61 } // namespace internal
62 } // namespace v8 62 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/graph.h ('k') | src/compiler/graph-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698