[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: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#66768}
This commit is contained in:
parent
329d371979
commit
7cbdff438d
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user