Commit 793dbfd9 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[bigint,compiler] Fix typed-lowering of JSStrictEqual.

R=jarin@chromium.org

Bug: v8:6791
Change-Id: I9d3787f670d44d68cc2c6474621b6c6a25642e5a
Reviewed-on: https://chromium-review.googlesource.com/803434Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49896}
parent 5836b93c
...@@ -850,9 +850,9 @@ Reduction JSTypedLowering::ReduceJSStrictEqual(Node* node) { ...@@ -850,9 +850,9 @@ Reduction JSTypedLowering::ReduceJSStrictEqual(Node* node) {
ReplaceWithValue(node, replacement); ReplaceWithValue(node, replacement);
return Replace(replacement); return Replace(replacement);
} }
if (r.OneInputCannotBe(Type::NumberOrString())) { if (r.OneInputCannotBe(Type::NumericOrString())) {
// For values with canonical representation (i.e. neither String, nor // For values with canonical representation (i.e. neither String nor
// Number) an empty type intersection means the values cannot be strictly // Numeric) an empty type intersection means the values cannot be strictly
// equal. // equal.
if (!r.left_type()->Maybe(r.right_type())) { if (!r.left_type()->Maybe(r.right_type())) {
Node* replacement = jsgraph()->FalseConstant(); Node* replacement = jsgraph()->FalseConstant();
......
...@@ -170,12 +170,11 @@ namespace compiler { ...@@ -170,12 +170,11 @@ namespace compiler {
V(NumberOrHole, kNumber | kHole) \ V(NumberOrHole, kNumber | kHole) \
V(NumberOrOddball, kNumber | kNullOrUndefined | kBoolean | \ V(NumberOrOddball, kNumber | kNullOrUndefined | kBoolean | \
kHole) \ kHole) \
V(NumberOrString, kNumber | kString) \
V(NumericOrString, kNumeric | kString) \ V(NumericOrString, kNumeric | kString) \
V(NumberOrUndefined, kNumber | kUndefined) \ V(NumberOrUndefined, kNumber | kUndefined) \
V(NumberOrUndefinedOrNullOrBoolean, \ V(NumberOrUndefinedOrNullOrBoolean, \
kNumber | kNullOrUndefined | kBoolean) \ kNumber | kNullOrUndefined | kBoolean) \
V(PlainPrimitive, kNumberOrString | kBoolean | \ V(PlainPrimitive, kNumber | kString | kBoolean | \
kNullOrUndefined) \ kNullOrUndefined) \
V(Primitive, kSymbol | kBigInt | kPlainPrimitive) \ V(Primitive, kSymbol | kBigInt | kPlainPrimitive) \
V(OtherUndetectableOrUndefined, kOtherUndetectable | kUndefined) \ V(OtherUndetectableOrUndefined, kOtherUndetectable | kUndefined) \
......
...@@ -16,3 +16,5 @@ assertEquals(0n, 5n % 1n); ...@@ -16,3 +16,5 @@ assertEquals(0n, 5n % 1n);
assertEquals(0n, -5n % 1n); assertEquals(0n, -5n % 1n);
assertEquals(0n, 5n % -1n); assertEquals(0n, 5n % -1n);
assertEquals(0n, -5n % -1n); assertEquals(0n, -5n % -1n);
assertTrue(0n === 0n);
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