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 { ...@@ -2405,10 +2405,9 @@ SourceTextModuleRef ContextRef::GetModule(SerializationPolicy policy) const {
.AsSourceTextModule(); .AsSourceTextModule();
} }
JSHeapBroker::JSHeapBroker( JSHeapBroker::JSHeapBroker(Isolate* isolate, Zone* broker_zone,
Isolate* isolate, Zone* broker_zone, bool tracing_enabled, bool tracing_enabled, bool is_concurrent_inlining,
bool is_concurrent_inlining, bool is_native_context_independent, bool is_native_context_independent)
std::unique_ptr<PersistentHandles> persistent_handles)
: isolate_(isolate), : isolate_(isolate),
zone_(broker_zone), zone_(broker_zone),
refs_(zone()->New<RefsMap>(kMinimalRefsBucketCount, AddressMatcher(), refs_(zone()->New<RefsMap>(kMinimalRefsBucketCount, AddressMatcher(),
...@@ -2418,7 +2417,6 @@ JSHeapBroker::JSHeapBroker( ...@@ -2418,7 +2417,6 @@ JSHeapBroker::JSHeapBroker(
tracing_enabled_(tracing_enabled), tracing_enabled_(tracing_enabled),
is_concurrent_inlining_(is_concurrent_inlining), is_concurrent_inlining_(is_concurrent_inlining),
is_native_context_independent_(is_native_context_independent), is_native_context_independent_(is_native_context_independent),
ph_(std::move(persistent_handles)),
local_heap_(base::nullopt), local_heap_(base::nullopt),
feedback_(zone()), feedback_(zone()),
bytecode_analyses_(zone()), bytecode_analyses_(zone()),
......
...@@ -77,15 +77,13 @@ struct PropertyAccessTarget { ...@@ -77,15 +77,13 @@ struct PropertyAccessTarget {
class V8_EXPORT_PRIVATE JSHeapBroker { class V8_EXPORT_PRIVATE JSHeapBroker {
public: public:
JSHeapBroker(Isolate* isolate, Zone* broker_zone, bool tracing_enabled, JSHeapBroker(Isolate* isolate, Zone* broker_zone, bool tracing_enabled,
bool is_concurrent_inlining, bool is_native_context_independent, bool is_concurrent_inlining, bool is_native_context_independent);
std::unique_ptr<PersistentHandles> persistent_handles);
// For use only in tests, sets default values for some arguments. Avoids // For use only in tests, sets default values for some arguments. Avoids
// churn when new flags are added. // churn when new flags are added.
JSHeapBroker(Isolate* isolate, Zone* broker_zone, JSHeapBroker(Isolate* isolate, Zone* broker_zone)
std::unique_ptr<PersistentHandles> persistent_handles) : JSHeapBroker(isolate, broker_zone, FLAG_trace_heap_broker, false,
: JSHeapBroker(isolate, broker_zone, FLAG_trace_heap_broker, false, false, false) {}
std::move(persistent_handles)) {}
~JSHeapBroker(); ~JSHeapBroker();
......
...@@ -152,10 +152,9 @@ class PipelineData { ...@@ -152,10 +152,9 @@ class PipelineData {
instruction_zone_(instruction_zone_scope_.zone()), instruction_zone_(instruction_zone_scope_.zone()),
codegen_zone_scope_(zone_stats_, kCodegenZoneName), codegen_zone_scope_(zone_stats_, kCodegenZoneName),
codegen_zone_(codegen_zone_scope_.zone()), codegen_zone_(codegen_zone_scope_.zone()),
broker_(new JSHeapBroker(isolate_, info_->zone(), broker_(new JSHeapBroker(
info_->trace_heap_broker(), isolate_, info_->zone(), info_->trace_heap_broker(),
is_concurrent_inlining, is_concurrent_inlining, info->IsNativeContextIndependent())),
info->IsNativeContextIndependent(), nullptr)),
register_allocation_zone_scope_(zone_stats_, register_allocation_zone_scope_(zone_stats_,
kRegisterAllocationZoneName), kRegisterAllocationZoneName),
register_allocation_zone_(register_allocation_zone_scope_.zone()), register_allocation_zone_(register_allocation_zone_scope_.zone()),
......
...@@ -39,8 +39,7 @@ class JSConstantCacheTester : public HandleAndZoneScope, ...@@ -39,8 +39,7 @@ class JSConstantCacheTester : public HandleAndZoneScope,
JSGraph(main_isolate(), &main_graph_, &main_common_, &main_javascript_, JSGraph(main_isolate(), &main_graph_, &main_common_, &main_javascript_,
nullptr, &main_machine_), nullptr, &main_machine_),
canonical_(main_isolate()), canonical_(main_isolate()),
broker_(main_isolate(), main_zone(), broker_(main_isolate(), main_zone()) {
main_isolate()->NewPersistentHandles()) {
main_graph_.SetStart(main_graph_.NewNode(common()->Start(0))); main_graph_.SetStart(main_graph_.NewNode(common()->Start(0)));
main_graph_.SetEnd( main_graph_.SetEnd(
main_graph_.NewNode(common()->End(1), main_graph_.start())); main_graph_.NewNode(common()->End(1), main_graph_.start()));
......
...@@ -34,8 +34,7 @@ class ContextSpecializationTester : public HandleAndZoneScope { ...@@ -34,8 +34,7 @@ class ContextSpecializationTester : public HandleAndZoneScope {
jsgraph_(main_isolate(), graph(), common(), &javascript_, &simplified_, jsgraph_(main_isolate(), graph(), common(), &javascript_, &simplified_,
&machine_), &machine_),
reducer_(main_zone(), graph(), &tick_counter_), reducer_(main_zone(), graph(), &tick_counter_),
js_heap_broker_(main_isolate(), main_zone(), js_heap_broker_(main_isolate(), main_zone()),
main_isolate()->NewPersistentHandles()),
spec_(&reducer_, jsgraph(), &js_heap_broker_, context, spec_(&reducer_, jsgraph(), &js_heap_broker_, context,
MaybeHandle<JSFunction>()) {} MaybeHandle<JSFunction>()) {}
......
...@@ -28,7 +28,7 @@ class JSTypedLoweringTester : public HandleAndZoneScope { ...@@ -28,7 +28,7 @@ class JSTypedLoweringTester : public HandleAndZoneScope {
: HandleAndZoneScope(kCompressGraphZone), : HandleAndZoneScope(kCompressGraphZone),
isolate(main_isolate()), isolate(main_isolate()),
canonical(isolate), canonical(isolate),
js_heap_broker(isolate, main_zone(), isolate->NewPersistentHandles()), js_heap_broker(isolate, main_zone()),
binop(nullptr), binop(nullptr),
unop(nullptr), unop(nullptr),
javascript(main_zone()), javascript(main_zone()),
......
...@@ -28,8 +28,7 @@ class RepresentationChangerTester : public HandleAndZoneScope, ...@@ -28,8 +28,7 @@ class RepresentationChangerTester : public HandleAndZoneScope,
javascript_(main_zone()), javascript_(main_zone()),
jsgraph_(main_isolate(), main_graph_, &main_common_, &javascript_, jsgraph_(main_isolate(), main_graph_, &main_common_, &javascript_,
&main_simplified_, &main_machine_), &main_simplified_, &main_machine_),
broker_(main_isolate(), main_zone(), broker_(main_isolate(), main_zone()),
main_isolate()->NewPersistentHandles()),
changer_(&jsgraph_, &broker_) { changer_(&jsgraph_, &broker_) {
Node* s = graph()->NewNode(common()->Start(num_parameters)); Node* s = graph()->NewNode(common()->Start(num_parameters));
graph()->SetStart(s); graph()->SetStart(s);
......
...@@ -41,9 +41,7 @@ namespace compiler { ...@@ -41,9 +41,7 @@ namespace compiler {
class Types { class Types {
public: public:
Types(Zone* zone, Isolate* isolate, v8::base::RandomNumberGenerator* rng) Types(Zone* zone, Isolate* isolate, v8::base::RandomNumberGenerator* rng)
: zone_(zone), : zone_(zone), js_heap_broker_(isolate, zone), rng_(rng) {
js_heap_broker_(isolate, zone, isolate->NewPersistentHandles()),
rng_(rng) {
#define DECLARE_TYPE(name, value) \ #define DECLARE_TYPE(name, value) \
name = Type::name(); \ name = Type::name(); \
types.push_back(name); types.push_back(name);
......
...@@ -29,7 +29,7 @@ class CommonOperatorReducerTest : public GraphTest { ...@@ -29,7 +29,7 @@ class CommonOperatorReducerTest : public GraphTest {
Reduction Reduce( Reduction Reduce(
AdvancedReducer::Editor* editor, Node* node, AdvancedReducer::Editor* editor, Node* node,
MachineOperatorBuilder::Flags flags = MachineOperatorBuilder::kNoFlags) { MachineOperatorBuilder::Flags flags = MachineOperatorBuilder::kNoFlags) {
JSHeapBroker broker(isolate(), zone(), isolate()->NewPersistentHandles()); JSHeapBroker broker(isolate(), zone());
MachineOperatorBuilder machine(zone(), MachineType::PointerRepresentation(), MachineOperatorBuilder machine(zone(), MachineType::PointerRepresentation(),
flags); flags);
CommonOperatorReducer reducer(editor, graph(), &broker, common(), &machine, CommonOperatorReducer reducer(editor, graph(), &broker, common(), &machine,
......
...@@ -63,7 +63,7 @@ class ConstantFoldingReducerTest : public TypedGraphTest { ...@@ -63,7 +63,7 @@ class ConstantFoldingReducerTest : public TypedGraphTest {
public: public:
ConstantFoldingReducerTest() ConstantFoldingReducerTest()
: TypedGraphTest(3), : TypedGraphTest(3),
broker_(isolate(), zone(), isolate()->NewPersistentHandles()), broker_(isolate(), zone()),
simplified_(zone()), simplified_(zone()),
deps_(&broker_, zone()) {} deps_(&broker_, zone()) {}
~ConstantFoldingReducerTest() override = default; ~ConstantFoldingReducerTest() override = default;
......
...@@ -19,7 +19,7 @@ GraphTest::GraphTest(int num_parameters) ...@@ -19,7 +19,7 @@ GraphTest::GraphTest(int num_parameters)
canonical_(isolate()), canonical_(isolate()),
common_(zone()), common_(zone()),
graph_(zone()), graph_(zone()),
broker_(isolate(), zone(), isolate()->NewPersistentHandles()), broker_(isolate(), zone()),
source_positions_(&graph_), source_positions_(&graph_),
node_origins_(&graph_) { node_origins_(&graph_) {
graph()->SetStart(graph()->NewNode(common()->Start(num_parameters))); graph()->SetStart(graph()->NewNode(common()->Start(num_parameters)));
......
...@@ -30,7 +30,7 @@ class SimplifiedOperatorReducerTest : public GraphTest { ...@@ -30,7 +30,7 @@ class SimplifiedOperatorReducerTest : public GraphTest {
protected: protected:
Reduction Reduce(Node* node) { Reduction Reduce(Node* node) {
JSHeapBroker broker(isolate(), zone(), isolate()->NewPersistentHandles()); JSHeapBroker broker(isolate(), zone());
MachineOperatorBuilder machine(zone()); MachineOperatorBuilder machine(zone());
JSOperatorBuilder javascript(zone()); JSOperatorBuilder javascript(zone());
JSGraph jsgraph(isolate(), graph(), common(), &javascript, simplified(), JSGraph jsgraph(isolate(), graph(), common(), &javascript, simplified(),
......
...@@ -22,7 +22,7 @@ class TyperTest : public TypedGraphTest { ...@@ -22,7 +22,7 @@ class TyperTest : public TypedGraphTest {
public: public:
TyperTest() TyperTest()
: TypedGraphTest(3), : TypedGraphTest(3),
broker_(isolate(), zone(), isolate()->NewPersistentHandles()), broker_(isolate(), zone()),
operation_typer_(&broker_, zone()), operation_typer_(&broker_, zone()),
types_(zone(), isolate(), random_number_generator()), types_(zone(), isolate(), random_number_generator()),
javascript_(zone()), 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