[compiler] Simplify OperationTyper::ToPrimitive.

R=jarin@chromium.org

Bug: 
Change-Id: I9adf207491a146459d676342c0b7bdf0c399e440
Reviewed-on: https://chromium-review.googlesource.com/758260
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49217}
This commit is contained in:
Georg Neis 2017-11-08 11:16:33 +01:00 committed by Commit Bot
parent 54d68665f2
commit 363d04fc37

View File

@ -1024,7 +1024,7 @@ Type* OperationTyper::SpeculativeToNumber(Type* type) {
}
Type* OperationTyper::ToPrimitive(Type* type) {
if (type->Is(Type::Primitive()) && !type->Maybe(Type::Receiver())) {
if (type->Is(Type::Primitive())) {
return type;
}
return Type::Primitive();