diff options
Diffstat (limited to 'deps/v8/src/compiler/graph-reducer.cc')
-rw-r--r-- | deps/v8/src/compiler/graph-reducer.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/deps/v8/src/compiler/graph-reducer.cc b/deps/v8/src/compiler/graph-reducer.cc index 17789a0432..155d6fa8ef 100644 --- a/deps/v8/src/compiler/graph-reducer.cc +++ b/deps/v8/src/compiler/graph-reducer.cc @@ -2,12 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "src/compiler/graph-reducer.h" + #include <functional> #include <limits> #include "src/codegen/tick-counter.h" -#include "src/compiler/graph-reducer.h" #include "src/compiler/graph.h" +#include "src/compiler/js-heap-broker.h" #include "src/compiler/node-properties.h" #include "src/compiler/node.h" #include "src/compiler/verifier.h" @@ -27,14 +29,15 @@ enum class GraphReducer::State : uint8_t { void Reducer::Finalize() {} GraphReducer::GraphReducer(Zone* zone, Graph* graph, TickCounter* tick_counter, - Node* dead) + JSHeapBroker* broker, Node* dead) : graph_(graph), dead_(dead), state_(graph, 4), reducers_(zone), revisit_(zone), stack_(zone), - tick_counter_(tick_counter) { + tick_counter_(tick_counter), + broker_(broker) { if (dead != nullptr) { NodeProperties::SetType(dead_, Type::None()); } @@ -94,6 +97,9 @@ Reduction GraphReducer::Reduce(Node* const node) { // all the other reducers for this node, as now there may be more // opportunities for reduction. if (FLAG_trace_turbo_reduction) { + UnparkedScopeIfNeeded unparked(broker_); + // TODO(neis): Disallow racy handle dereference once we stop + // supporting --no-local-heaps --no-turbo-direct-heap-access. AllowHandleDereference allow_deref; StdoutStream{} << "- In-place update of #" << *node << " by reducer " << (*i)->reducer_name() << std::endl; @@ -104,6 +110,9 @@ Reduction GraphReducer::Reduce(Node* const node) { } else { // {node} was replaced by another node. if (FLAG_trace_turbo_reduction) { + UnparkedScopeIfNeeded unparked(broker_); + // TODO(neis): Disallow racy handle dereference once we stop + // supporting --no-local-heaps --no-turbo-direct-heap-access. AllowHandleDereference allow_deref; StdoutStream{} << "- Replacement of #" << *node << " with #" << *(reduction.replacement()) << " by reducer " |