Commit 7cbdff43 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Extend and make more use of Type::Unique

"t.Is(Type::Unique())" is more conservative and future-proof than
"!t.Maybe(Type::NumericOrString)".

Change-Id: I7d08244802feeb062fd2f8a9d8f3af85eb43bba3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2106207
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66768}
parent 329d3719
......@@ -1246,9 +1246,7 @@ Type OperationTyper::StrictEqual(Type lhs, Type rhs) {
DCHECK(lhs.Is(Type::NonInternal()) || lhs.Is(Type::Hole()));
return singleton_true();
}
if ((!lhs.Maybe(Type::NumericOrString()) ||
!rhs.Maybe(Type::NumericOrString())) &&
!lhs.Maybe(rhs)) {
if ((lhs.Is(Type::Unique()) || rhs.Is(Type::Unique())) && !lhs.Maybe(rhs)) {
// One of the inputs has a canonical representation but types don't overlap.
return singleton_false();
}
......
......@@ -191,7 +191,7 @@ namespace compiler {
V(SymbolOrReceiver, kSymbol | kReceiver) \
V(StringOrReceiver, kString | kReceiver) \
V(Unique, kBoolean | kUniqueName | kNull | \
kUndefined | kReceiver) \
kUndefined | kHole | kReceiver) \
V(Internal, kHole | kExternalPointer | kOtherInternal) \
V(NonInternal, kPrimitive | kReceiver) \
V(NonBigInt, kNonBigIntPrimitive | kReceiver) \
......
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