Commit 5afd1f30 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Remove unused Type parameter from ReferenceEqual.

This parameter was never used and doesn't seem like it would ever be
useful, so it's gone now.

R=epertoso@chromium.org

Review-Url: https://codereview.chromium.org/2221043002
Cr-Commit-Position: refs/heads/master@{#38453}
parent 025ddb21
...@@ -323,8 +323,8 @@ Reduction JSCallReducer::ReduceJSCallFunction(Node* node) { ...@@ -323,8 +323,8 @@ Reduction JSCallReducer::ReduceJSCallFunction(Node* node) {
} }
// Check that the {target} is still the {array_function}. // Check that the {target} is still the {array_function}.
Node* check = graph()->NewNode(simplified()->ReferenceEqual(Type::Any()), Node* check = graph()->NewNode(simplified()->ReferenceEqual(), target,
target, array_function); array_function);
effect = graph()->NewNode(simplified()->CheckIf(), check, effect, control); effect = graph()->NewNode(simplified()->CheckIf(), check, effect, control);
// Turn the {node} into a {JSCreateArray} call. // Turn the {node} into a {JSCreateArray} call.
...@@ -338,8 +338,8 @@ Reduction JSCallReducer::ReduceJSCallFunction(Node* node) { ...@@ -338,8 +338,8 @@ Reduction JSCallReducer::ReduceJSCallFunction(Node* node) {
jsgraph()->Constant(handle(cell->value(), isolate())); jsgraph()->Constant(handle(cell->value(), isolate()));
// Check that the {target} is still the {target_function}. // Check that the {target} is still the {target_function}.
Node* check = graph()->NewNode(simplified()->ReferenceEqual(Type::Any()), Node* check = graph()->NewNode(simplified()->ReferenceEqual(), target,
target, target_function); target_function);
effect = effect =
graph()->NewNode(simplified()->CheckIf(), check, effect, control); graph()->NewNode(simplified()->CheckIf(), check, effect, control);
...@@ -439,8 +439,8 @@ Reduction JSCallReducer::ReduceJSCallConstruct(Node* node) { ...@@ -439,8 +439,8 @@ Reduction JSCallReducer::ReduceJSCallConstruct(Node* node) {
} }
// Check that the {target} is still the {array_function}. // Check that the {target} is still the {array_function}.
Node* check = graph()->NewNode(simplified()->ReferenceEqual(Type::Any()), Node* check = graph()->NewNode(simplified()->ReferenceEqual(), target,
target, array_function); array_function);
effect = graph()->NewNode(simplified()->CheckIf(), check, effect, control); effect = graph()->NewNode(simplified()->CheckIf(), check, effect, control);
// Turn the {node} into a {JSCreateArray} call. // Turn the {node} into a {JSCreateArray} call.
...@@ -459,8 +459,8 @@ Reduction JSCallReducer::ReduceJSCallConstruct(Node* node) { ...@@ -459,8 +459,8 @@ Reduction JSCallReducer::ReduceJSCallConstruct(Node* node) {
jsgraph()->Constant(handle(cell->value(), isolate())); jsgraph()->Constant(handle(cell->value(), isolate()));
// Check that the {target} is still the {target_function}. // Check that the {target} is still the {target_function}.
Node* check = graph()->NewNode(simplified()->ReferenceEqual(Type::Any()), Node* check = graph()->NewNode(simplified()->ReferenceEqual(), target,
target, target_function); target_function);
effect = effect =
graph()->NewNode(simplified()->CheckIf(), check, effect, control); graph()->NewNode(simplified()->CheckIf(), check, effect, control);
......
...@@ -555,8 +555,8 @@ Reduction JSCreateLowering::ReduceNewArrayToStubCall( ...@@ -555,8 +555,8 @@ Reduction JSCreateLowering::ReduceNewArrayToStubCall(
Node* effect = NodeProperties::GetEffectInput(node); Node* effect = NodeProperties::GetEffectInput(node);
Node* control = NodeProperties::GetControlInput(node); Node* control = NodeProperties::GetControlInput(node);
Node* length = NodeProperties::GetValueInput(node, 2); Node* length = NodeProperties::GetValueInput(node, 2);
Node* equal = graph()->NewNode(simplified()->ReferenceEqual(Type::Any()), Node* equal = graph()->NewNode(simplified()->ReferenceEqual(), length,
length, jsgraph()->ZeroConstant()); jsgraph()->ZeroConstant());
Node* branch = Node* branch =
graph()->NewNode(common()->Branch(BranchHint::kFalse), equal, control); graph()->NewNode(common()->Branch(BranchHint::kFalse), equal, control);
......
...@@ -169,8 +169,7 @@ Reduction JSGlobalObjectSpecialization::ReduceJSStoreGlobal(Node* node) { ...@@ -169,8 +169,7 @@ Reduction JSGlobalObjectSpecialization::ReduceJSStoreGlobal(Node* node) {
// Record a code dependency on the cell, and just deoptimize if the new // Record a code dependency on the cell, and just deoptimize if the new
// value doesn't match the previous value stored inside the cell. // value doesn't match the previous value stored inside the cell.
dependencies()->AssumePropertyCell(property_cell); dependencies()->AssumePropertyCell(property_cell);
Node* check = Node* check = graph()->NewNode(simplified()->ReferenceEqual(), value,
graph()->NewNode(simplified()->ReferenceEqual(Type::Tagged()), value,
jsgraph()->Constant(property_cell_value)); jsgraph()->Constant(property_cell_value));
effect = effect =
graph()->NewNode(simplified()->CheckIf(), check, effect, control); graph()->NewNode(simplified()->CheckIf(), check, effect, control);
......
...@@ -148,8 +148,8 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess( ...@@ -148,8 +148,8 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess(
// Ensure that {index} matches the specified {name} (if {index} is given). // Ensure that {index} matches the specified {name} (if {index} is given).
if (index != nullptr) { if (index != nullptr) {
Node* check = graph()->NewNode(simplified()->ReferenceEqual(Type::Name()), Node* check = graph()->NewNode(simplified()->ReferenceEqual(), index,
index, jsgraph()->HeapConstant(name)); jsgraph()->HeapConstant(name));
effect = graph()->NewNode(simplified()->CheckIf(), check, effect, control); effect = graph()->NewNode(simplified()->CheckIf(), check, effect, control);
} }
...@@ -233,8 +233,8 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess( ...@@ -233,8 +233,8 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess(
for (auto map : receiver_maps) { for (auto map : receiver_maps) {
DCHECK_LT(0u, num_classes); DCHECK_LT(0u, num_classes);
Node* check = Node* check =
graph()->NewNode(simplified()->ReferenceEqual(Type::Internal()), graph()->NewNode(simplified()->ReferenceEqual(), receiver_map,
receiver_map, jsgraph()->Constant(map)); jsgraph()->Constant(map));
if (--num_classes == 0 && j == access_infos.size() - 1) { if (--num_classes == 0 && j == access_infos.size() - 1) {
check = graph()->NewNode(simplified()->CheckIf(), check, check = graph()->NewNode(simplified()->CheckIf(), check,
this_effect, fallthrough_control); this_effect, fallthrough_control);
...@@ -531,8 +531,8 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess( ...@@ -531,8 +531,8 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess(
for (Handle<Map> map : receiver_maps) { for (Handle<Map> map : receiver_maps) {
DCHECK_LT(0u, num_classes); DCHECK_LT(0u, num_classes);
Node* check = Node* check =
graph()->NewNode(simplified()->ReferenceEqual(Type::Any()), graph()->NewNode(simplified()->ReferenceEqual(), receiver_map,
receiver_map, jsgraph()->Constant(map)); jsgraph()->Constant(map));
if (--num_classes == 0 && j == access_infos.size() - 1) { if (--num_classes == 0 && j == access_infos.size() - 1) {
// Last map check on the fallthrough control path, do a conditional // Last map check on the fallthrough control path, do a conditional
// eager deoptimization exit here. // eager deoptimization exit here.
...@@ -753,8 +753,8 @@ JSNativeContextSpecialization::BuildPropertyAccess( ...@@ -753,8 +753,8 @@ JSNativeContextSpecialization::BuildPropertyAccess(
} else if (access_info.IsDataConstant()) { } else if (access_info.IsDataConstant()) {
value = jsgraph()->Constant(access_info.constant()); value = jsgraph()->Constant(access_info.constant());
if (access_mode == AccessMode::kStore) { if (access_mode == AccessMode::kStore) {
Node* check = graph()->NewNode( Node* check =
simplified()->ReferenceEqual(Type::Tagged()), value, value); graph()->NewNode(simplified()->ReferenceEqual(), value, value);
effect = effect =
graph()->NewNode(simplified()->CheckIf(), check, effect, control); graph()->NewNode(simplified()->CheckIf(), check, effect, control);
} }
......
...@@ -666,13 +666,13 @@ Reduction JSTypedLowering::ReduceJSEqualTypeOf(Node* node, bool invert) { ...@@ -666,13 +666,13 @@ Reduction JSTypedLowering::ReduceJSEqualTypeOf(Node* node, bool invert) {
Node* input = m.left().InputAt(0); Node* input = m.left().InputAt(0);
Handle<String> value = Handle<String>::cast(m.right().Value()); Handle<String> value = Handle<String>::cast(m.right().Value());
if (String::Equals(value, factory()->boolean_string())) { if (String::Equals(value, factory()->boolean_string())) {
replacement = graph()->NewNode( replacement =
common()->Select(MachineRepresentation::kTagged), graph()->NewNode(common()->Select(MachineRepresentation::kTagged),
graph()->NewNode(simplified()->ReferenceEqual(Type::Any()), input, graph()->NewNode(simplified()->ReferenceEqual(),
jsgraph()->TrueConstant()), input, jsgraph()->TrueConstant()),
jsgraph()->TrueConstant(), jsgraph()->TrueConstant(),
graph()->NewNode(simplified()->ReferenceEqual(Type::Any()), input, graph()->NewNode(simplified()->ReferenceEqual(),
jsgraph()->FalseConstant())); input, jsgraph()->FalseConstant()));
} else if (String::Equals(value, factory()->function_string())) { } else if (String::Equals(value, factory()->function_string())) {
replacement = graph()->NewNode(simplified()->ObjectIsCallable(), input); replacement = graph()->NewNode(simplified()->ObjectIsCallable(), input);
} else if (String::Equals(value, factory()->number_string())) { } else if (String::Equals(value, factory()->number_string())) {
...@@ -682,7 +682,7 @@ Reduction JSTypedLowering::ReduceJSEqualTypeOf(Node* node, bool invert) { ...@@ -682,7 +682,7 @@ Reduction JSTypedLowering::ReduceJSEqualTypeOf(Node* node, bool invert) {
} else if (String::Equals(value, factory()->undefined_string())) { } else if (String::Equals(value, factory()->undefined_string())) {
replacement = graph()->NewNode( replacement = graph()->NewNode(
common()->Select(MachineRepresentation::kTagged), common()->Select(MachineRepresentation::kTagged),
graph()->NewNode(simplified()->ReferenceEqual(Type::Any()), input, graph()->NewNode(simplified()->ReferenceEqual(), input,
jsgraph()->NullConstant()), jsgraph()->NullConstant()),
jsgraph()->FalseConstant(), jsgraph()->FalseConstant(),
graph()->NewNode(simplified()->ObjectIsUndetectable(), input)); graph()->NewNode(simplified()->ObjectIsUndetectable(), input));
...@@ -708,12 +708,10 @@ Reduction JSTypedLowering::ReduceJSEqual(Node* node, bool invert) { ...@@ -708,12 +708,10 @@ Reduction JSTypedLowering::ReduceJSEqual(Node* node, bool invert) {
return r.ChangeToPureOperator(simplified()->StringEqual(), invert); return r.ChangeToPureOperator(simplified()->StringEqual(), invert);
} }
if (r.BothInputsAre(Type::Boolean())) { if (r.BothInputsAre(Type::Boolean())) {
return r.ChangeToPureOperator(simplified()->ReferenceEqual(Type::Boolean()), return r.ChangeToPureOperator(simplified()->ReferenceEqual(), invert);
invert);
} }
if (r.BothInputsAre(Type::Receiver())) { if (r.BothInputsAre(Type::Receiver())) {
return r.ChangeToPureOperator( return r.ChangeToPureOperator(simplified()->ReferenceEqual(), invert);
simplified()->ReferenceEqual(Type::Receiver()), invert);
} }
if (r.OneInputIs(Type::Undetectable())) { if (r.OneInputIs(Type::Undetectable())) {
RelaxEffectsAndControls(node); RelaxEffectsAndControls(node);
...@@ -770,32 +768,25 @@ Reduction JSTypedLowering::ReduceJSStrictEqual(Node* node, bool invert) { ...@@ -770,32 +768,25 @@ Reduction JSTypedLowering::ReduceJSStrictEqual(Node* node, bool invert) {
if (reduction.Changed()) return reduction; if (reduction.Changed()) return reduction;
if (r.OneInputIs(the_hole_type_)) { if (r.OneInputIs(the_hole_type_)) {
return r.ChangeToPureOperator(simplified()->ReferenceEqual(the_hole_type_), return r.ChangeToPureOperator(simplified()->ReferenceEqual(), invert);
invert);
} }
if (r.OneInputIs(Type::Undefined())) { if (r.OneInputIs(Type::Undefined())) {
return r.ChangeToPureOperator( return r.ChangeToPureOperator(simplified()->ReferenceEqual(), invert);
simplified()->ReferenceEqual(Type::Undefined()), invert);
} }
if (r.OneInputIs(Type::Null())) { if (r.OneInputIs(Type::Null())) {
return r.ChangeToPureOperator(simplified()->ReferenceEqual(Type::Null()), return r.ChangeToPureOperator(simplified()->ReferenceEqual(), invert);
invert);
} }
if (r.OneInputIs(Type::Boolean())) { if (r.OneInputIs(Type::Boolean())) {
return r.ChangeToPureOperator(simplified()->ReferenceEqual(Type::Boolean()), return r.ChangeToPureOperator(simplified()->ReferenceEqual(), invert);
invert);
} }
if (r.OneInputIs(Type::Object())) { if (r.OneInputIs(Type::Object())) {
return r.ChangeToPureOperator(simplified()->ReferenceEqual(Type::Object()), return r.ChangeToPureOperator(simplified()->ReferenceEqual(), invert);
invert);
} }
if (r.OneInputIs(Type::Receiver())) { if (r.OneInputIs(Type::Receiver())) {
return r.ChangeToPureOperator( return r.ChangeToPureOperator(simplified()->ReferenceEqual(), invert);
simplified()->ReferenceEqual(Type::Receiver()), invert);
} }
if (r.BothInputsAre(Type::Unique())) { if (r.BothInputsAre(Type::Unique())) {
return r.ChangeToPureOperator(simplified()->ReferenceEqual(Type::Unique()), return r.ChangeToPureOperator(simplified()->ReferenceEqual(), invert);
invert);
} }
if (r.BothInputsAre(Type::String())) { if (r.BothInputsAre(Type::String())) {
return r.ChangeToPureOperator(simplified()->StringEqual(), invert); return r.ChangeToPureOperator(simplified()->StringEqual(), invert);
...@@ -1311,8 +1302,8 @@ Reduction JSTypedLowering::ReduceJSInstanceOf(Node* node) { ...@@ -1311,8 +1302,8 @@ Reduction JSTypedLowering::ReduceJSInstanceOf(Node* node) {
// If not, check if object prototype is the null prototype. // If not, check if object prototype is the null prototype.
Node* null_proto = Node* null_proto =
graph()->NewNode(simplified()->ReferenceEqual(r.right_type()), graph()->NewNode(simplified()->ReferenceEqual(), object_prototype,
object_prototype, jsgraph()->NullConstant()); jsgraph()->NullConstant());
Node* branch_null_proto = graph()->NewNode( Node* branch_null_proto = graph()->NewNode(
common()->Branch(BranchHint::kFalse), null_proto, control); common()->Branch(BranchHint::kFalse), null_proto, control);
Node* if_null_proto = graph()->NewNode(common()->IfTrue(), branch_null_proto); Node* if_null_proto = graph()->NewNode(common()->IfTrue(), branch_null_proto);
...@@ -1321,8 +1312,7 @@ Reduction JSTypedLowering::ReduceJSInstanceOf(Node* node) { ...@@ -1321,8 +1312,7 @@ Reduction JSTypedLowering::ReduceJSInstanceOf(Node* node) {
control = graph()->NewNode(common()->IfFalse(), branch_null_proto); control = graph()->NewNode(common()->IfFalse(), branch_null_proto);
// Check if object prototype is equal to function prototype. // Check if object prototype is equal to function prototype.
Node* eq_proto = Node* eq_proto = graph()->NewNode(simplified()->ReferenceEqual(),
graph()->NewNode(simplified()->ReferenceEqual(r.right_type()),
object_prototype, prototype); object_prototype, prototype);
Node* branch_eq_proto = Node* branch_eq_proto =
graph()->NewNode(common()->Branch(BranchHint::kFalse), eq_proto, control); graph()->NewNode(common()->Branch(BranchHint::kFalse), eq_proto, control);
...@@ -1440,18 +1430,16 @@ Reduction JSTypedLowering::ReduceJSConvertReceiver(Node* node) { ...@@ -1440,18 +1430,16 @@ Reduction JSTypedLowering::ReduceJSConvertReceiver(Node* node) {
frame_state, effect, control); frame_state, effect, control);
} else { } else {
// Check {receiver} for undefined. // Check {receiver} for undefined.
Node* check0 = Node* check0 = graph()->NewNode(simplified()->ReferenceEqual(), receiver,
graph()->NewNode(simplified()->ReferenceEqual(receiver_type), jsgraph()->UndefinedConstant());
receiver, jsgraph()->UndefinedConstant());
Node* branch0 = graph()->NewNode(common()->Branch(BranchHint::kFalse), Node* branch0 = graph()->NewNode(common()->Branch(BranchHint::kFalse),
check0, control); check0, control);
Node* if_true0 = graph()->NewNode(common()->IfTrue(), branch0); Node* if_true0 = graph()->NewNode(common()->IfTrue(), branch0);
Node* if_false0 = graph()->NewNode(common()->IfFalse(), branch0); Node* if_false0 = graph()->NewNode(common()->IfFalse(), branch0);
// Check {receiver} for null. // Check {receiver} for null.
Node* check1 = Node* check1 = graph()->NewNode(simplified()->ReferenceEqual(), receiver,
graph()->NewNode(simplified()->ReferenceEqual(receiver_type), jsgraph()->NullConstant());
receiver, jsgraph()->NullConstant());
Node* branch1 = graph()->NewNode(common()->Branch(BranchHint::kFalse), Node* branch1 = graph()->NewNode(common()->Branch(BranchHint::kFalse),
check1, if_false0); check1, if_false0);
Node* if_true1 = graph()->NewNode(common()->IfTrue(), branch1); Node* if_true1 = graph()->NewNode(common()->IfTrue(), branch1);
...@@ -1702,8 +1690,8 @@ Reduction JSTypedLowering::ReduceJSForInNext(Node* node) { ...@@ -1702,8 +1690,8 @@ Reduction JSTypedLowering::ReduceJSForInNext(Node* node) {
receiver, effect, control); receiver, effect, control);
// Check if the expected map still matches that of the {receiver}. // Check if the expected map still matches that of the {receiver}.
Node* check0 = graph()->NewNode(simplified()->ReferenceEqual(Type::Any()), Node* check0 = graph()->NewNode(simplified()->ReferenceEqual(), receiver_map,
receiver_map, cache_type); cache_type);
Node* branch0 = Node* branch0 =
graph()->NewNode(common()->Branch(BranchHint::kTrue), check0, control); graph()->NewNode(common()->Branch(BranchHint::kTrue), check0, control);
......
...@@ -426,6 +426,7 @@ NumberOperationHint NumberOperationHintOf(const Operator* op) { ...@@ -426,6 +426,7 @@ NumberOperationHint NumberOperationHintOf(const Operator* op) {
V(ObjectIsSmi, Operator::kNoProperties, 1, 0) \ V(ObjectIsSmi, Operator::kNoProperties, 1, 0) \
V(ObjectIsString, Operator::kNoProperties, 1, 0) \ V(ObjectIsString, Operator::kNoProperties, 1, 0) \
V(ObjectIsUndetectable, Operator::kNoProperties, 1, 0) \ V(ObjectIsUndetectable, Operator::kNoProperties, 1, 0) \
V(ReferenceEqual, Operator::kCommutative, 2, 0) \
V(StringEqual, Operator::kCommutative, 2, 0) \ V(StringEqual, Operator::kCommutative, 2, 0) \
V(StringLessThan, Operator::kNoProperties, 2, 0) \ V(StringLessThan, Operator::kNoProperties, 2, 0) \
V(StringLessThanOrEqual, Operator::kNoProperties, 2, 0) V(StringLessThanOrEqual, Operator::kNoProperties, 2, 0)
...@@ -717,12 +718,6 @@ const Operator* SimplifiedOperatorBuilder::CheckTaggedHole( ...@@ -717,12 +718,6 @@ const Operator* SimplifiedOperatorBuilder::CheckTaggedHole(
return nullptr; return nullptr;
} }
const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) {
return new (zone()) Operator(IrOpcode::kReferenceEqual,
Operator::kCommutative | Operator::kPure,
"ReferenceEqual", 2, 0, 0, 1, 0, 0);
}
const Operator* SimplifiedOperatorBuilder::EnsureWritableFastElements() { const Operator* SimplifiedOperatorBuilder::EnsureWritableFastElements() {
return &cache_.kEnsureWritableFastElements; return &cache_.kEnsureWritableFastElements;
} }
......
...@@ -291,7 +291,7 @@ class SimplifiedOperatorBuilder final : public ZoneObject { ...@@ -291,7 +291,7 @@ class SimplifiedOperatorBuilder final : public ZoneObject {
const Operator* SpeculativeNumberLessThanOrEqual(NumberOperationHint hint); const Operator* SpeculativeNumberLessThanOrEqual(NumberOperationHint hint);
const Operator* SpeculativeNumberEqual(NumberOperationHint hint); const Operator* SpeculativeNumberEqual(NumberOperationHint hint);
const Operator* ReferenceEqual(Type* type); const Operator* ReferenceEqual();
const Operator* StringEqual(); const Operator* StringEqual();
const Operator* StringLessThan(); const Operator* StringLessThan();
......
...@@ -442,7 +442,7 @@ TEST(JSToNumber_replacement) { ...@@ -442,7 +442,7 @@ TEST(JSToNumber_replacement) {
R.graph.NewNode(R.javascript.ToNumber(), n, R.context(), R.graph.NewNode(R.javascript.ToNumber(), n, R.context(),
R.EmptyFrameState(R.context()), R.start(), R.start()); R.EmptyFrameState(R.context()), R.start(), R.start());
Node* effect_use = R.UseForEffect(c); Node* effect_use = R.UseForEffect(c);
Node* add = R.graph.NewNode(R.simplified.ReferenceEqual(Type::Any()), n, c); Node* add = R.graph.NewNode(R.simplified.ReferenceEqual(), n, c);
R.CheckEffectInput(c, effect_use); R.CheckEffectInput(c, effect_use);
Node* r = R.reduce(c); Node* r = R.reduce(c);
...@@ -554,7 +554,7 @@ TEST(JSToString_replacement) { ...@@ -554,7 +554,7 @@ TEST(JSToString_replacement) {
R.graph.NewNode(R.javascript.ToString(), n, R.context(), R.graph.NewNode(R.javascript.ToString(), n, R.context(),
R.EmptyFrameState(R.context()), R.start(), R.start()); R.EmptyFrameState(R.context()), R.start(), R.start());
Node* effect_use = R.UseForEffect(c); Node* effect_use = R.UseForEffect(c);
Node* add = R.graph.NewNode(R.simplified.ReferenceEqual(Type::Any()), n, c); Node* add = R.graph.NewNode(R.simplified.ReferenceEqual(), n, c);
R.CheckEffectInput(c, effect_use); R.CheckEffectInput(c, effect_use);
Node* r = R.reduce(c); Node* r = R.reduce(c);
......
...@@ -811,7 +811,7 @@ class TestingGraph : public HandleAndZoneScope, public GraphAndBuilders { ...@@ -811,7 +811,7 @@ class TestingGraph : public HandleAndZoneScope, public GraphAndBuilders {
return graph()->NewNode(machine()->Word32Equal(), node, return graph()->NewNode(machine()->Word32Equal(), node,
jsgraph.Int32Constant(1)); jsgraph.Int32Constant(1));
} else { } else {
return graph()->NewNode(simplified()->ReferenceEqual(Type::Any()), node, return graph()->NewNode(simplified()->ReferenceEqual(), node,
jsgraph.TrueConstant()); jsgraph.TrueConstant());
} }
} }
...@@ -1088,7 +1088,7 @@ TEST(LowerReferenceEqual_to_wordeq) { ...@@ -1088,7 +1088,7 @@ TEST(LowerReferenceEqual_to_wordeq) {
TestingGraph t(Type::Any(), Type::Any()); TestingGraph t(Type::Any(), Type::Any());
IrOpcode::Value opcode = IrOpcode::Value opcode =
static_cast<IrOpcode::Value>(t.machine()->WordEqual()->opcode()); static_cast<IrOpcode::Value>(t.machine()->WordEqual()->opcode());
t.CheckLoweringBinop(opcode, t.simplified()->ReferenceEqual(Type::Any())); t.CheckLoweringBinop(opcode, t.simplified()->ReferenceEqual());
} }
void CheckChangeInsertion(IrOpcode::Value expected, MachineType from, void CheckChangeInsertion(IrOpcode::Value expected, MachineType from,
......
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