Commit 89ffdbc2 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Lower abstract equality of boolean values.

Abstract equality of boolean values reduces to reference equality.

R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/1425773002

Cr-Commit-Position: refs/heads/master@{#31591}
parent 78abedb9
......@@ -596,13 +596,16 @@ Reduction JSTypedLowering::ReduceJSEqual(Node* node, bool invert) {
return r.ChangeToStringComparisonOperator(simplified()->StringEqual(),
invert);
}
if (r.BothInputsAre(Type::Boolean())) {
return r.ChangeToPureOperator(simplified()->ReferenceEqual(Type::Boolean()),
invert);
}
if (r.BothInputsAre(Type::Receiver())) {
return r.ChangeToPureOperator(
simplified()->ReferenceEqual(Type::Receiver()), invert);
}
// TODO(turbofan): js-typed-lowering of Equal(undefined)
// TODO(turbofan): js-typed-lowering of Equal(null)
// TODO(turbofan): js-typed-lowering of Equal(boolean)
return NoChange();
}
......
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