Commit 5e82bb63 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[compiler] Remove persistent handles as a broker parameter

Since it will be patched in later in the cases where it will be used,
there is no need to have it as a parameter.

Bug: v8:7790
Change-Id: I93b27f3baf8c3841a60f5ac5ed09993d1caf19bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351667Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69366}
parent 754ebe08
......@@ -2405,10 +2405,9 @@ SourceTextModuleRef ContextRef::GetModule(SerializationPolicy policy) const {
.AsSourceTextModule();
}
JSHeapBroker::JSHeapBroker(
Isolate* isolate, Zone* broker_zone, bool tracing_enabled,
bool is_concurrent_inlining, bool is_native_context_independent,
std::unique_ptr<PersistentHandles> persistent_handles)
JSHeapBroker::JSHeapBroker(Isolate* isolate, Zone* broker_zone,
bool tracing_enabled, bool is_concurrent_inlining,
bool is_native_context_independent)
: isolate_(isolate),
zone_(broker_zone),
refs_(zone()->New<RefsMap>(kMinimalRefsBucketCount, AddressMatcher(),
......@@ -2418,7 +2417,6 @@ JSHeapBroker::JSHeapBroker(
tracing_enabled_(tracing_enabled),
is_concurrent_inlining_(is_concurrent_inlining),
is_native_context_independent_(is_native_context_independent),
ph_(std::move(persistent_handles)),
local_heap_(base::nullopt),
feedback_(zone()),
bytecode_analyses_(zone()),
......
......@@ -77,15 +77,13 @@ struct PropertyAccessTarget {
class V8_EXPORT_PRIVATE JSHeapBroker {
public:
JSHeapBroker(Isolate* isolate, Zone* broker_zone, bool tracing_enabled,
bool is_concurrent_inlining, bool is_native_context_independent,
std::unique_ptr<PersistentHandles> persistent_handles);
bool is_concurrent_inlining, bool is_native_context_independent);
// For use only in tests, sets default values for some arguments. Avoids
// churn when new flags are added.
JSHeapBroker(Isolate* isolate, Zone* broker_zone,
std::unique_ptr<PersistentHandles> persistent_handles)
: JSHeapBroker(isolate, broker_zone, FLAG_trace_heap_broker, false, false,
std::move(persistent_handles)) {}
JSHeapBroker(Isolate* isolate, Zone* broker_zone)
: JSHeapBroker(isolate, broker_zone, FLAG_trace_heap_broker, false,
false) {}
~JSHeapBroker();
......
......@@ -152,10 +152,9 @@ class PipelineData {
instruction_zone_(instruction_zone_scope_.zone()),
codegen_zone_scope_(zone_stats_, kCodegenZoneName),
codegen_zone_(codegen_zone_scope_.zone()),
broker_(new JSHeapBroker(isolate_, info_->zone(),
info_->trace_heap_broker(),
is_concurrent_inlining,
info->IsNativeContextIndependent(), nullptr)),
broker_(new JSHeapBroker(
isolate_, info_->zone(), info_->trace_heap_broker(),
is_concurrent_inlining, info->IsNativeContextIndependent())),
register_allocation_zone_scope_(zone_stats_,
kRegisterAllocationZoneName),
register_allocation_zone_(register_allocation_zone_scope_.zone()),
......
......@@ -39,8 +39,7 @@ class JSConstantCacheTester : public HandleAndZoneScope,
JSGraph(main_isolate(), &main_graph_, &main_common_, &main_javascript_,
nullptr, &main_machine_),
canonical_(main_isolate()),
broker_(main_isolate(), main_zone(),
main_isolate()->NewPersistentHandles()) {
broker_(main_isolate(), main_zone()) {
main_graph_.SetStart(main_graph_.NewNode(common()->Start(0)));
main_graph_.SetEnd(
main_graph_.NewNode(common()->End(1), main_graph_.start()));
......
......@@ -34,8 +34,7 @@ class ContextSpecializationTester : public HandleAndZoneScope {
jsgraph_(main_isolate(), graph(), common(), &javascript_, &simplified_,
&machine_),
reducer_(main_zone(), graph(), &tick_counter_),
js_heap_broker_(main_isolate(), main_zone(),
main_isolate()->NewPersistentHandles()),
js_heap_broker_(main_isolate(), main_zone()),
spec_(&reducer_, jsgraph(), &js_heap_broker_, context,
MaybeHandle<JSFunction>()) {}
......
......@@ -28,7 +28,7 @@ class JSTypedLoweringTester : public HandleAndZoneScope {
: HandleAndZoneScope(kCompressGraphZone),
isolate(main_isolate()),
canonical(isolate),
js_heap_broker(isolate, main_zone(), isolate->NewPersistentHandles()),
js_heap_broker(isolate, main_zone()),
binop(nullptr),
unop(nullptr),
javascript(main_zone()),
......
......@@ -28,8 +28,7 @@ class RepresentationChangerTester : public HandleAndZoneScope,
javascript_(main_zone()),
jsgraph_(main_isolate(), main_graph_, &main_common_, &javascript_,
&main_simplified_, &main_machine_),
broker_(main_isolate(), main_zone(),
main_isolate()->NewPersistentHandles()),
broker_(main_isolate(), main_zone()),
changer_(&jsgraph_, &broker_) {
Node* s = graph()->NewNode(common()->Start(num_parameters));
graph()->SetStart(s);
......
......@@ -41,9 +41,7 @@ namespace compiler {
class Types {
public:
Types(Zone* zone, Isolate* isolate, v8::base::RandomNumberGenerator* rng)
: zone_(zone),
js_heap_broker_(isolate, zone, isolate->NewPersistentHandles()),
rng_(rng) {
: zone_(zone), js_heap_broker_(isolate, zone), rng_(rng) {
#define DECLARE_TYPE(name, value) \
name = Type::name(); \
types.push_back(name);
......
......@@ -29,7 +29,7 @@ class CommonOperatorReducerTest : public GraphTest {
Reduction Reduce(
AdvancedReducer::Editor* editor, Node* node,
MachineOperatorBuilder::Flags flags = MachineOperatorBuilder::kNoFlags) {
JSHeapBroker broker(isolate(), zone(), isolate()->NewPersistentHandles());
JSHeapBroker broker(isolate(), zone());
MachineOperatorBuilder machine(zone(), MachineType::PointerRepresentation(),
flags);
CommonOperatorReducer reducer(editor, graph(), &broker, common(), &machine,
......
......@@ -63,7 +63,7 @@ class ConstantFoldingReducerTest : public TypedGraphTest {
public:
ConstantFoldingReducerTest()
: TypedGraphTest(3),
broker_(isolate(), zone(), isolate()->NewPersistentHandles()),
broker_(isolate(), zone()),
simplified_(zone()),
deps_(&broker_, zone()) {}
~ConstantFoldingReducerTest() override = default;
......
......@@ -19,7 +19,7 @@ GraphTest::GraphTest(int num_parameters)
canonical_(isolate()),
common_(zone()),
graph_(zone()),
broker_(isolate(), zone(), isolate()->NewPersistentHandles()),
broker_(isolate(), zone()),
source_positions_(&graph_),
node_origins_(&graph_) {
graph()->SetStart(graph()->NewNode(common()->Start(num_parameters)));
......
......@@ -30,7 +30,7 @@ class SimplifiedOperatorReducerTest : public GraphTest {
protected:
Reduction Reduce(Node* node) {
JSHeapBroker broker(isolate(), zone(), isolate()->NewPersistentHandles());
JSHeapBroker broker(isolate(), zone());
MachineOperatorBuilder machine(zone());
JSOperatorBuilder javascript(zone());
JSGraph jsgraph(isolate(), graph(), common(), &javascript, simplified(),
......
......@@ -22,7 +22,7 @@ class TyperTest : public TypedGraphTest {
public:
TyperTest()
: TypedGraphTest(3),
broker_(isolate(), zone(), isolate()->NewPersistentHandles()),
broker_(isolate(), zone()),
operation_typer_(&broker_, zone()),
types_(zone(), isolate(), random_number_generator()),
javascript_(zone()),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment