Commit 74b40e34 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Remove redundant isolate argument from typers.

This is just a cleanup.

Bug: v8:7790
Change-Id: Ic0114451159b8c504f527f3cf3bdaed6a8cc8741
Reviewed-on: https://chromium-review.googlesource.com/1243103
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56206}
parent 78dd1d0c
...@@ -16,10 +16,9 @@ namespace v8 { ...@@ -16,10 +16,9 @@ namespace v8 {
namespace internal { namespace internal {
namespace compiler { namespace compiler {
OperationTyper::OperationTyper(Isolate* isolate, JSHeapBroker* js_heap_broker, OperationTyper::OperationTyper(JSHeapBroker* js_heap_broker, Zone* zone)
Zone* zone)
: zone_(zone), cache_(TypeCache::Get()) { : zone_(zone), cache_(TypeCache::Get()) {
Factory* factory = isolate->factory(); Factory* factory = js_heap_broker->isolate()->factory();
infinity_ = Type::NewConstant(V8_INFINITY, zone); infinity_ = Type::NewConstant(V8_INFINITY, zone);
minus_infinity_ = Type::NewConstant(-V8_INFINITY, zone); minus_infinity_ = Type::NewConstant(-V8_INFINITY, zone);
Type truncating_to_zero = Type::MinusZeroOrNaN(); Type truncating_to_zero = Type::MinusZeroOrNaN();
......
...@@ -27,7 +27,7 @@ class TypeCache; ...@@ -27,7 +27,7 @@ class TypeCache;
class V8_EXPORT_PRIVATE OperationTyper { class V8_EXPORT_PRIVATE OperationTyper {
public: public:
OperationTyper(Isolate* isolate, JSHeapBroker* js_heap_broker, Zone* zone); OperationTyper(JSHeapBroker* js_heap_broker, Zone* zone);
// Typing Phi. // Typing Phi.
Type Merge(Type left, Type right); Type Merge(Type left, Type right);
......
...@@ -315,7 +315,7 @@ class PipelineData { ...@@ -315,7 +315,7 @@ class PipelineData {
Typer* CreateTyper() { Typer* CreateTyper() {
DCHECK_NULL(typer_); DCHECK_NULL(typer_);
typer_ = new Typer(isolate(), js_heap_broker(), typer_flags_, graph()); typer_ = new Typer(js_heap_broker(), typer_flags_, graph());
return typer_; return typer_;
} }
......
...@@ -306,7 +306,7 @@ class RepresentationSelector { ...@@ -306,7 +306,7 @@ class RepresentationSelector {
source_positions_(source_positions), source_positions_(source_positions),
node_origins_(node_origins), node_origins_(node_origins),
type_cache_(TypeCache::Get()), type_cache_(TypeCache::Get()),
op_typer_(jsgraph->isolate(), js_heap_broker, graph_zone()) { op_typer_(js_heap_broker, graph_zone()) {
} }
// Forward propagation of types from type feedback. // Forward propagation of types from type feedback.
......
...@@ -15,7 +15,7 @@ TypeNarrowingReducer::TypeNarrowingReducer(Editor* editor, JSGraph* jsgraph, ...@@ -15,7 +15,7 @@ TypeNarrowingReducer::TypeNarrowingReducer(Editor* editor, JSGraph* jsgraph,
JSHeapBroker* js_heap_broker) JSHeapBroker* js_heap_broker)
: AdvancedReducer(editor), : AdvancedReducer(editor),
jsgraph_(jsgraph), jsgraph_(jsgraph),
op_typer_(jsgraph->isolate(), js_heap_broker, zone()) {} op_typer_(js_heap_broker, zone()) {}
TypeNarrowingReducer::~TypeNarrowingReducer() = default; TypeNarrowingReducer::~TypeNarrowingReducer() = default;
......
...@@ -34,14 +34,13 @@ class Typer::Decorator final : public GraphDecorator { ...@@ -34,14 +34,13 @@ class Typer::Decorator final : public GraphDecorator {
Typer* const typer_; Typer* const typer_;
}; };
Typer::Typer(Isolate* isolate, JSHeapBroker* js_heap_broker, Flags flags, Typer::Typer(JSHeapBroker* js_heap_broker, Flags flags, Graph* graph)
Graph* graph)
: flags_(flags), : flags_(flags),
graph_(graph), graph_(graph),
decorator_(nullptr), decorator_(nullptr),
cache_(TypeCache::Get()), cache_(TypeCache::Get()),
js_heap_broker_(js_heap_broker), js_heap_broker_(js_heap_broker),
operation_typer_(isolate, js_heap_broker, zone()) { operation_typer_(js_heap_broker, zone()) {
singleton_false_ = operation_typer_.singleton_false(); singleton_false_ = operation_typer_.singleton_false();
singleton_true_ = operation_typer_.singleton_true(); singleton_true_ = operation_typer_.singleton_true();
......
...@@ -25,8 +25,7 @@ class V8_EXPORT_PRIVATE Typer { ...@@ -25,8 +25,7 @@ class V8_EXPORT_PRIVATE Typer {
}; };
typedef base::Flags<Flag> Flags; typedef base::Flags<Flag> Flags;
Typer(Isolate* isolate, JSHeapBroker* js_heap_broker, Flags flags, Typer(JSHeapBroker* js_heap_broker, Flags flags, Graph* graph);
Graph* graph);
~Typer(); ~Typer();
void Run(); void Run();
......
...@@ -32,7 +32,7 @@ class JSTypedLoweringTester : public HandleAndZoneScope { ...@@ -32,7 +32,7 @@ class JSTypedLoweringTester : public HandleAndZoneScope {
simplified(main_zone()), simplified(main_zone()),
common(main_zone()), common(main_zone()),
graph(main_zone()), graph(main_zone()),
typer(main_isolate(), &js_heap_broker, Typer::kNoFlags, &graph), typer(&js_heap_broker, Typer::kNoFlags, &graph),
context_node(nullptr) { context_node(nullptr) {
graph.SetStart(graph.NewNode(common.Start(num_parameters))); graph.SetStart(graph.NewNode(common.Start(num_parameters)));
graph.SetEnd(graph.NewNode(common.End(1), graph.start())); graph.SetEnd(graph.NewNode(common.End(1), graph.start()));
......
...@@ -121,7 +121,7 @@ Matcher<Node*> GraphTest::IsUndefinedConstant() { ...@@ -121,7 +121,7 @@ Matcher<Node*> GraphTest::IsUndefinedConstant() {
TypedGraphTest::TypedGraphTest(int num_parameters) TypedGraphTest::TypedGraphTest(int num_parameters)
: GraphTest(num_parameters), : GraphTest(num_parameters),
typer_(isolate(), js_heap_broker(), Typer::kNoFlags, graph()) {} typer_(js_heap_broker(), Typer::kNoFlags, graph()) {}
TypedGraphTest::~TypedGraphTest() = default; TypedGraphTest::~TypedGraphTest() = default;
......
...@@ -651,7 +651,7 @@ TEST_F(RedundancyEliminationTest, CheckedUint64ToTaggedSigned) { ...@@ -651,7 +651,7 @@ TEST_F(RedundancyEliminationTest, CheckedUint64ToTaggedSigned) {
TEST_F(RedundancyEliminationTest, TEST_F(RedundancyEliminationTest,
SpeculativeNumberAddWithCheckBoundsBetterType) { SpeculativeNumberAddWithCheckBoundsBetterType) {
Typer typer(isolate(), js_heap_broker(), Typer::kNoFlags, graph()); Typer typer(js_heap_broker(), Typer::kNoFlags, graph());
TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) { TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) {
TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) { TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Any(), 0); Node* lhs = Parameter(Type::Any(), 0);
...@@ -677,7 +677,7 @@ TEST_F(RedundancyEliminationTest, ...@@ -677,7 +677,7 @@ TEST_F(RedundancyEliminationTest,
} }
TEST_F(RedundancyEliminationTest, SpeculativeNumberAddWithCheckBoundsSameType) { TEST_F(RedundancyEliminationTest, SpeculativeNumberAddWithCheckBoundsSameType) {
Typer typer(isolate(), js_heap_broker(), Typer::kNoFlags, graph()); Typer typer(js_heap_broker(), Typer::kNoFlags, graph());
TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) { TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) {
TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) { TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Range(42.0, 42.0, zone()), 0); Node* lhs = Parameter(Type::Range(42.0, 42.0, zone()), 0);
...@@ -707,7 +707,7 @@ TEST_F(RedundancyEliminationTest, SpeculativeNumberAddWithCheckBoundsSameType) { ...@@ -707,7 +707,7 @@ TEST_F(RedundancyEliminationTest, SpeculativeNumberAddWithCheckBoundsSameType) {
TEST_F(RedundancyEliminationTest, TEST_F(RedundancyEliminationTest,
SpeculativeNumberSubtractWithCheckBoundsBetterType) { SpeculativeNumberSubtractWithCheckBoundsBetterType) {
Typer typer(isolate(), js_heap_broker(), Typer::kNoFlags, graph()); Typer typer(js_heap_broker(), Typer::kNoFlags, graph());
TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) { TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) {
TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) { TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Any(), 0); Node* lhs = Parameter(Type::Any(), 0);
...@@ -735,7 +735,7 @@ TEST_F(RedundancyEliminationTest, ...@@ -735,7 +735,7 @@ TEST_F(RedundancyEliminationTest,
TEST_F(RedundancyEliminationTest, TEST_F(RedundancyEliminationTest,
SpeculativeNumberSubtractWithCheckBoundsSameType) { SpeculativeNumberSubtractWithCheckBoundsSameType) {
Typer typer(isolate(), js_heap_broker(), Typer::kNoFlags, graph()); Typer typer(js_heap_broker(), Typer::kNoFlags, graph());
TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) { TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) {
TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) { TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Range(42.0, 42.0, zone()), 0); Node* lhs = Parameter(Type::Range(42.0, 42.0, zone()), 0);
...@@ -766,7 +766,7 @@ TEST_F(RedundancyEliminationTest, ...@@ -766,7 +766,7 @@ TEST_F(RedundancyEliminationTest,
TEST_F(RedundancyEliminationTest, TEST_F(RedundancyEliminationTest,
SpeculativeSafeIntegerAddWithCheckBoundsBetterType) { SpeculativeSafeIntegerAddWithCheckBoundsBetterType) {
Typer typer(isolate(), js_heap_broker(), Typer::kNoFlags, graph()); Typer typer(js_heap_broker(), Typer::kNoFlags, graph());
TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) { TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) {
TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) { TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Any(), 0); Node* lhs = Parameter(Type::Any(), 0);
...@@ -794,7 +794,7 @@ TEST_F(RedundancyEliminationTest, ...@@ -794,7 +794,7 @@ TEST_F(RedundancyEliminationTest,
TEST_F(RedundancyEliminationTest, TEST_F(RedundancyEliminationTest,
SpeculativeSafeIntegerAddWithCheckBoundsSameType) { SpeculativeSafeIntegerAddWithCheckBoundsSameType) {
Typer typer(isolate(), js_heap_broker(), Typer::kNoFlags, graph()); Typer typer(js_heap_broker(), Typer::kNoFlags, graph());
TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) { TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) {
TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) { TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Range(42.0, 42.0, zone()), 0); Node* lhs = Parameter(Type::Range(42.0, 42.0, zone()), 0);
...@@ -825,7 +825,7 @@ TEST_F(RedundancyEliminationTest, ...@@ -825,7 +825,7 @@ TEST_F(RedundancyEliminationTest,
TEST_F(RedundancyEliminationTest, TEST_F(RedundancyEliminationTest,
SpeculativeSafeIntegerSubtractWithCheckBoundsBetterType) { SpeculativeSafeIntegerSubtractWithCheckBoundsBetterType) {
Typer typer(isolate(), js_heap_broker(), Typer::kNoFlags, graph()); Typer typer(js_heap_broker(), Typer::kNoFlags, graph());
TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) { TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) {
TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) { TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Any(), 0); Node* lhs = Parameter(Type::Any(), 0);
...@@ -853,7 +853,7 @@ TEST_F(RedundancyEliminationTest, ...@@ -853,7 +853,7 @@ TEST_F(RedundancyEliminationTest,
TEST_F(RedundancyEliminationTest, TEST_F(RedundancyEliminationTest,
SpeculativeSafeIntegerSubtractWithCheckBoundsSameType) { SpeculativeSafeIntegerSubtractWithCheckBoundsSameType) {
Typer typer(isolate(), js_heap_broker(), Typer::kNoFlags, graph()); Typer typer(js_heap_broker(), Typer::kNoFlags, graph());
TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) { TRACED_FOREACH(VectorSlotPair, feedback, vector_slot_pairs()) {
TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) { TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Range(42.0, 42.0, zone()), 0); Node* lhs = Parameter(Type::Range(42.0, 42.0, zone()), 0);
...@@ -884,7 +884,7 @@ TEST_F(RedundancyEliminationTest, ...@@ -884,7 +884,7 @@ TEST_F(RedundancyEliminationTest,
TEST_F(RedundancyEliminationTest, TEST_F(RedundancyEliminationTest,
SpeculativeToNumberWithCheckBoundsBetterType) { SpeculativeToNumberWithCheckBoundsBetterType) {
Typer typer(isolate(), js_heap_broker(), Typer::kNoFlags, graph()); Typer typer(js_heap_broker(), Typer::kNoFlags, graph());
TRACED_FOREACH(VectorSlotPair, feedback1, vector_slot_pairs()) { TRACED_FOREACH(VectorSlotPair, feedback1, vector_slot_pairs()) {
TRACED_FOREACH(VectorSlotPair, feedback2, vector_slot_pairs()) { TRACED_FOREACH(VectorSlotPair, feedback2, vector_slot_pairs()) {
TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) { TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) {
...@@ -912,7 +912,7 @@ TEST_F(RedundancyEliminationTest, ...@@ -912,7 +912,7 @@ TEST_F(RedundancyEliminationTest,
} }
TEST_F(RedundancyEliminationTest, SpeculativeToNumberWithCheckBoundsSameType) { TEST_F(RedundancyEliminationTest, SpeculativeToNumberWithCheckBoundsSameType) {
Typer typer(isolate(), js_heap_broker(), Typer::kNoFlags, graph()); Typer typer(js_heap_broker(), Typer::kNoFlags, graph());
TRACED_FOREACH(VectorSlotPair, feedback1, vector_slot_pairs()) { TRACED_FOREACH(VectorSlotPair, feedback1, vector_slot_pairs()) {
TRACED_FOREACH(VectorSlotPair, feedback2, vector_slot_pairs()) { TRACED_FOREACH(VectorSlotPair, feedback2, vector_slot_pairs()) {
TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) { TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) {
......
...@@ -42,7 +42,7 @@ class SimplifiedLoweringTest : public GraphTest { ...@@ -42,7 +42,7 @@ class SimplifiedLoweringTest : public GraphTest {
{ {
// Simplified lowering needs to run w/o the typer decorator so make sure // Simplified lowering needs to run w/o the typer decorator so make sure
// the object is not live at the same time. // the object is not live at the same time.
Typer typer(isolate(), js_heap_broker(), Typer::kNoFlags, graph()); Typer typer(js_heap_broker(), Typer::kNoFlags, graph());
typer.Run(); typer.Run();
} }
......
...@@ -23,7 +23,7 @@ class TyperTest : public TypedGraphTest { ...@@ -23,7 +23,7 @@ class TyperTest : public TypedGraphTest {
TyperTest() TyperTest()
: TypedGraphTest(3), : TypedGraphTest(3),
js_heap_broker_(isolate(), zone()), js_heap_broker_(isolate(), zone()),
operation_typer_(isolate(), &js_heap_broker_, zone()), operation_typer_(&js_heap_broker_, zone()),
types_(zone(), isolate(), random_number_generator()), types_(zone(), isolate(), random_number_generator()),
javascript_(zone()), javascript_(zone()),
simplified_(zone()) { simplified_(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