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 {
namespace internal {
namespace compiler {
OperationTyper::OperationTyper(Isolate* isolate, JSHeapBroker* js_heap_broker,
Zone* zone)
OperationTyper::OperationTyper(JSHeapBroker* js_heap_broker, Zone* zone)
: zone_(zone), cache_(TypeCache::Get()) {
Factory* factory = isolate->factory();
Factory* factory = js_heap_broker->isolate()->factory();
infinity_ = Type::NewConstant(V8_INFINITY, zone);
minus_infinity_ = Type::NewConstant(-V8_INFINITY, zone);
Type truncating_to_zero = Type::MinusZeroOrNaN();
......
......@@ -27,7 +27,7 @@ class TypeCache;
class V8_EXPORT_PRIVATE OperationTyper {
public:
OperationTyper(Isolate* isolate, JSHeapBroker* js_heap_broker, Zone* zone);
OperationTyper(JSHeapBroker* js_heap_broker, Zone* zone);
// Typing Phi.
Type Merge(Type left, Type right);
......
......@@ -315,7 +315,7 @@ class PipelineData {
Typer* CreateTyper() {
DCHECK_NULL(typer_);
typer_ = new Typer(isolate(), js_heap_broker(), typer_flags_, graph());
typer_ = new Typer(js_heap_broker(), typer_flags_, graph());
return typer_;
}
......
......@@ -306,7 +306,7 @@ class RepresentationSelector {
source_positions_(source_positions),
node_origins_(node_origins),
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.
......
......@@ -15,7 +15,7 @@ TypeNarrowingReducer::TypeNarrowingReducer(Editor* editor, JSGraph* jsgraph,
JSHeapBroker* js_heap_broker)
: AdvancedReducer(editor),
jsgraph_(jsgraph),
op_typer_(jsgraph->isolate(), js_heap_broker, zone()) {}
op_typer_(js_heap_broker, zone()) {}
TypeNarrowingReducer::~TypeNarrowingReducer() = default;
......
......@@ -34,14 +34,13 @@ class Typer::Decorator final : public GraphDecorator {
Typer* const typer_;
};
Typer::Typer(Isolate* isolate, JSHeapBroker* js_heap_broker, Flags flags,
Graph* graph)
Typer::Typer(JSHeapBroker* js_heap_broker, Flags flags, Graph* graph)
: flags_(flags),
graph_(graph),
decorator_(nullptr),
cache_(TypeCache::Get()),
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_true_ = operation_typer_.singleton_true();
......
......@@ -25,8 +25,7 @@ class V8_EXPORT_PRIVATE Typer {
};
typedef base::Flags<Flag> Flags;
Typer(Isolate* isolate, JSHeapBroker* js_heap_broker, Flags flags,
Graph* graph);
Typer(JSHeapBroker* js_heap_broker, Flags flags, Graph* graph);
~Typer();
void Run();
......
......@@ -32,7 +32,7 @@ class JSTypedLoweringTester : public HandleAndZoneScope {
simplified(main_zone()),
common(main_zone()),
graph(main_zone()),
typer(main_isolate(), &js_heap_broker, Typer::kNoFlags, &graph),
typer(&js_heap_broker, Typer::kNoFlags, &graph),
context_node(nullptr) {
graph.SetStart(graph.NewNode(common.Start(num_parameters)));
graph.SetEnd(graph.NewNode(common.End(1), graph.start()));
......
......@@ -121,7 +121,7 @@ Matcher<Node*> GraphTest::IsUndefinedConstant() {
TypedGraphTest::TypedGraphTest(int num_parameters)
: GraphTest(num_parameters),
typer_(isolate(), js_heap_broker(), Typer::kNoFlags, graph()) {}
typer_(js_heap_broker(), Typer::kNoFlags, graph()) {}
TypedGraphTest::~TypedGraphTest() = default;
......
......@@ -651,7 +651,7 @@ TEST_F(RedundancyEliminationTest, CheckedUint64ToTaggedSigned) {
TEST_F(RedundancyEliminationTest,
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(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Any(), 0);
......@@ -677,7 +677,7 @@ TEST_F(RedundancyEliminationTest,
}
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(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Range(42.0, 42.0, zone()), 0);
......@@ -707,7 +707,7 @@ TEST_F(RedundancyEliminationTest, SpeculativeNumberAddWithCheckBoundsSameType) {
TEST_F(RedundancyEliminationTest,
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(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Any(), 0);
......@@ -735,7 +735,7 @@ TEST_F(RedundancyEliminationTest,
TEST_F(RedundancyEliminationTest,
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(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Range(42.0, 42.0, zone()), 0);
......@@ -766,7 +766,7 @@ TEST_F(RedundancyEliminationTest,
TEST_F(RedundancyEliminationTest,
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(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Any(), 0);
......@@ -794,7 +794,7 @@ TEST_F(RedundancyEliminationTest,
TEST_F(RedundancyEliminationTest,
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(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Range(42.0, 42.0, zone()), 0);
......@@ -825,7 +825,7 @@ TEST_F(RedundancyEliminationTest,
TEST_F(RedundancyEliminationTest,
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(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Any(), 0);
......@@ -853,7 +853,7 @@ TEST_F(RedundancyEliminationTest,
TEST_F(RedundancyEliminationTest,
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(NumberOperationHint, hint, kNumberOperationHints) {
Node* lhs = Parameter(Type::Range(42.0, 42.0, zone()), 0);
......@@ -884,7 +884,7 @@ TEST_F(RedundancyEliminationTest,
TEST_F(RedundancyEliminationTest,
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, feedback2, vector_slot_pairs()) {
TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) {
......@@ -912,7 +912,7 @@ TEST_F(RedundancyEliminationTest,
}
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, feedback2, vector_slot_pairs()) {
TRACED_FOREACH(NumberOperationHint, hint, kNumberOperationHints) {
......
......@@ -42,7 +42,7 @@ class SimplifiedLoweringTest : public GraphTest {
{
// Simplified lowering needs to run w/o the typer decorator so make sure
// 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();
}
......
......@@ -23,7 +23,7 @@ class TyperTest : public TypedGraphTest {
TyperTest()
: TypedGraphTest(3),
js_heap_broker_(isolate(), zone()),
operation_typer_(isolate(), &js_heap_broker_, zone()),
operation_typer_(&js_heap_broker_, zone()),
types_(zone(), isolate(), random_number_generator()),
javascript_(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