summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/common-operator-reducer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/common-operator-reducer.cc')
-rw-r--r--deps/v8/src/compiler/common-operator-reducer.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/deps/v8/src/compiler/common-operator-reducer.cc b/deps/v8/src/compiler/common-operator-reducer.cc
index 16a9096079..57f1866bdb 100644
--- a/deps/v8/src/compiler/common-operator-reducer.cc
+++ b/deps/v8/src/compiler/common-operator-reducer.cc
@@ -38,13 +38,13 @@ Decision DecideCondition(JSHeapBroker* broker, Node* const cond) {
} // namespace
CommonOperatorReducer::CommonOperatorReducer(Editor* editor, Graph* graph,
- JSHeapBroker* js_heap_broker,
+ JSHeapBroker* broker,
CommonOperatorBuilder* common,
MachineOperatorBuilder* machine,
Zone* temp_zone)
: AdvancedReducer(editor),
graph_(graph),
- js_heap_broker_(js_heap_broker),
+ broker_(broker),
common_(common),
machine_(machine),
dead_(graph->NewNode(common->Dead())),
@@ -89,10 +89,8 @@ Reduction CommonOperatorReducer::ReduceBranch(Node* node) {
// not (i.e. true being returned in the false case and vice versa).
if (cond->opcode() == IrOpcode::kBooleanNot ||
(cond->opcode() == IrOpcode::kSelect &&
- DecideCondition(js_heap_broker(), cond->InputAt(1)) ==
- Decision::kFalse &&
- DecideCondition(js_heap_broker(), cond->InputAt(2)) ==
- Decision::kTrue)) {
+ DecideCondition(broker(), cond->InputAt(1)) == Decision::kFalse &&
+ DecideCondition(broker(), cond->InputAt(2)) == Decision::kTrue)) {
for (Node* const use : node->uses()) {
switch (use->opcode()) {
case IrOpcode::kIfTrue:
@@ -114,7 +112,7 @@ Reduction CommonOperatorReducer::ReduceBranch(Node* node) {
node, common()->Branch(NegateBranchHint(BranchHintOf(node->op()))));
return Changed(node);
}
- Decision const decision = DecideCondition(js_heap_broker(), cond);
+ Decision const decision = DecideCondition(broker(), cond);
if (decision == Decision::kUnknown) return NoChange();
Node* const control = node->InputAt(1);
for (Node* const use : node->uses()) {
@@ -154,7 +152,7 @@ Reduction CommonOperatorReducer::ReduceDeoptimizeConditional(Node* node) {
: common()->DeoptimizeUnless(p.kind(), p.reason(), p.feedback()));
return Changed(node);
}
- Decision const decision = DecideCondition(js_heap_broker(), condition);
+ Decision const decision = DecideCondition(broker(), condition);
if (decision == Decision::kUnknown) return NoChange();
if (condition_is_true == (decision == Decision::kTrue)) {
ReplaceWithValue(node, dead(), effect, control);
@@ -387,7 +385,7 @@ Reduction CommonOperatorReducer::ReduceSelect(Node* node) {
Node* const vtrue = node->InputAt(1);
Node* const vfalse = node->InputAt(2);
if (vtrue == vfalse) return Replace(vtrue);
- switch (DecideCondition(js_heap_broker(), cond)) {
+ switch (DecideCondition(broker(), cond)) {
case Decision::kTrue:
return Replace(vtrue);
case Decision::kFalse: