Reduce imports in intrange.d

This commit is contained in:
Dennis Korpel 2024-11-12 12:38:08 +01:00 committed by Nicholas Wilson
parent 33cd3b3981
commit 9ffda54fe1

View file

@ -13,10 +13,9 @@ module dmd.intrange;
import core.stdc.stdio;
import dmd.astenums;
import dmd.mtype;
import dmd.expression;
import dmd.globals;
import dmd.astenums : Tdchar;
import dmd.mtype : Type;
import dmd.globals : uinteger_t;
private uinteger_t copySign(uinteger_t x, bool sign) @safe
{
@ -322,7 +321,7 @@ struct IntRange
static IntRange fromType(Type type, bool isUnsigned)
{
if (!type.isIntegral() || type.toBasetype().ty == Tvector)
if (!type.isIntegral() || type.toBasetype().isTypeVector())
return widest();
uinteger_t mask = type.sizemask();
@ -444,7 +443,7 @@ struct IntRange
IntRange _cast(Type type)
{
if (!type.isIntegral() || type.toBasetype().ty == Tvector)
if (!type.isIntegral() || type.toBasetype().isTypeVector())
return this;
else if (!type.isUnsigned())
return castSigned(type.sizemask());
@ -456,7 +455,7 @@ struct IntRange
IntRange castUnsigned(Type type)
{
if (!type.isIntegral() || type.toBasetype().ty == Tvector)
if (!type.isIntegral() || type.toBasetype().isTypeVector())
return castUnsigned(ulong.max);
else if (type.toBasetype().ty == Tdchar)
return castDchar();
@ -504,7 +503,7 @@ struct IntRange
union_ = true;
}
ref const(IntRange) dump(const(char)* funcName, Expression e) const return
ref const(IntRange) dump(Exp)(const(char)* funcName, Exp e) const return
{
printf("[(%c)%#018llx, (%c)%#018llx] @ %s ::: %s\n",
imin.negative?'-':'+', cast(ulong)imin.value,