summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/all-nodes.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/all-nodes.cc')
-rw-r--r--deps/v8/src/compiler/all-nodes.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/deps/v8/src/compiler/all-nodes.cc b/deps/v8/src/compiler/all-nodes.cc
index eada0cff8c..78db63f904 100644
--- a/deps/v8/src/compiler/all-nodes.cc
+++ b/deps/v8/src/compiler/all-nodes.cc
@@ -12,7 +12,7 @@ namespace compiler {
AllNodes::AllNodes(Zone* local_zone, const Graph* graph, bool only_inputs)
: reachable(local_zone),
- is_reachable_(graph->NodeCount(), false, local_zone),
+ is_reachable_(static_cast<int>(graph->NodeCount()), local_zone),
only_inputs_(only_inputs) {
Mark(local_zone, graph->end(), graph);
}
@@ -20,14 +20,14 @@ AllNodes::AllNodes(Zone* local_zone, const Graph* graph, bool only_inputs)
AllNodes::AllNodes(Zone* local_zone, Node* end, const Graph* graph,
bool only_inputs)
: reachable(local_zone),
- is_reachable_(graph->NodeCount(), false, local_zone),
+ is_reachable_(static_cast<int>(graph->NodeCount()), local_zone),
only_inputs_(only_inputs) {
Mark(local_zone, end, graph);
}
void AllNodes::Mark(Zone* local_zone, Node* end, const Graph* graph) {
DCHECK_LT(end->id(), graph->NodeCount());
- is_reachable_[end->id()] = true;
+ is_reachable_.Add(end->id());
reachable.push_back(end);
// Find all nodes reachable from {end}.
for (size_t i = 0; i < reachable.size(); i++) {
@@ -36,8 +36,8 @@ void AllNodes::Mark(Zone* local_zone, Node* end, const Graph* graph) {
// TODO(titzer): print a warning.
continue;
}
- if (!is_reachable_[input->id()]) {
- is_reachable_[input->id()] = true;
+ if (!is_reachable_.Contains(input->id())) {
+ is_reachable_.Add(input->id());
reachable.push_back(input);
}
}
@@ -46,8 +46,8 @@ void AllNodes::Mark(Zone* local_zone, Node* end, const Graph* graph) {
if (use == nullptr || use->id() >= graph->NodeCount()) {
continue;
}
- if (!is_reachable_[use->id()]) {
- is_reachable_[use->id()] = true;
+ if (!is_reachable_.Contains(use->id())) {
+ is_reachable_.Add(use->id());
reachable.push_back(use);
}
}