mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
Reduce imports in intrange.d
This commit is contained in:
parent
33cd3b3981
commit
9ffda54fe1
1 changed files with 7 additions and 8 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue