| Index: src/compiler/graph-trimmer.h
|
| diff --git a/src/compiler/graph-trimmer.h b/src/compiler/graph-trimmer.h
|
| index d8258becc8d6e4c3cb46ac9bdbc50a9ae28ab460..98d335a44df22eba6db95c7dad2a356869dfdaf6 100644
|
| --- a/src/compiler/graph-trimmer.h
|
| +++ b/src/compiler/graph-trimmer.h
|
| @@ -28,14 +28,18 @@ class GraphTrimmer final {
|
| // or any of the roots in the sequence [{begin},{end}[.
|
| template <typename ForwardIterator>
|
| void TrimGraph(ForwardIterator begin, ForwardIterator end) {
|
| - while (begin != end) MarkAsLive(*begin++);
|
| + while (begin != end) {
|
| + Node* const node = *begin++;
|
| + if (!node->IsDead()) MarkAsLive(node);
|
| + }
|
| TrimGraph();
|
| }
|
|
|
| private:
|
| V8_INLINE bool IsLive(Node* const node) { return is_live_.Get(node); }
|
| V8_INLINE void MarkAsLive(Node* const node) {
|
| - if (!node->IsDead() && !IsLive(node)) {
|
| + DCHECK(!node->IsDead());
|
| + if (!IsLive(node)) {
|
| is_live_.Set(node, true);
|
| live_.push_back(node);
|
| }
|
|
|