Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit cbcb817

Browse files
committed
Remove complex numbers form the gcbench suite
1 parent 098a08a commit cbcb817

File tree

2 files changed

+3
-43
lines changed

2 files changed

+3
-43
lines changed

benchmark/gcbench/vdparser.extra/vdc/ast/expr.d

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,12 +2032,7 @@ class FloatLiteralExpression : PrimaryExpression
20322032
Value _interpret(Context sc)
20332033
{
20342034
if(complex)
2035-
if(lng)
2036-
return Value.create(cast(ireal) (1i * value));
2037-
else if(flt)
2038-
return Value.create(cast(ifloat) (1i * value));
2039-
else
2040-
return Value.create(cast(idouble) (1i * value));
2035+
assert(0, "Complex numbers aren't supported anymore.");
20412036
else
20422037
if(lng)
20432038
return Value.create(cast(real)value);

benchmark/gcbench/vdparser.extra/vdc/interpret.d

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,6 @@ class Value
9090
static Value create(float v) { return _create!FloatValue (v); }
9191
static Value create(double v) { return _create!DoubleValue (v); }
9292
static Value create(real v) { return _create!RealValue (v); }
93-
static Value create(ifloat v) { return _create!IFloatValue (v); }
94-
static Value create(idouble v) { return _create!IDoubleValue(v); }
95-
static Value create(ireal v) { return _create!IRealValue (v); }
96-
static Value create(cfloat v) { return _create!CFloatValue (v); }
97-
static Value create(cdouble v) { return _create!CDoubleValue(v); }
98-
static Value create(creal v) { return _create!CRealValue (v); }
99-
10093
static Value create(string v) { return createStringValue (v); }
10194

10295
Type getType()
@@ -431,17 +424,13 @@ alias TypeTuple!(bool, byte, ubyte, short, ushort,
431424
alias TypeTuple!(BoolValue, ByteValue, UByteValue, ShortValue, UShortValue,
432425
IntValue, UIntValue, LongValue, ULongValue,
433426
CharValue, WCharValue, DCharValue,
434-
FloatValue, DoubleValue, RealValue,
435-
IFloatValue, IDoubleValue, IRealValue,
436-
CFloatValue, CDoubleValue, CRealValue) BasicTypeValues;
427+
FloatValue, DoubleValue, RealValue) BasicTypeValues;
437428
alias TypeTuple!(BasicTypeValues, SetLengthValue) RHS_BasicTypeValues;
438429

439430
alias TypeTuple!(TOK_bool, TOK_byte, TOK_ubyte, TOK_short, TOK_ushort,
440431
TOK_int, TOK_uint, TOK_long, TOK_ulong,
441432
TOK_char, TOK_wchar, TOK_dchar,
442-
TOK_float, TOK_double, TOK_real,
443-
TOK_ifloat, TOK_idouble, TOK_ireal,
444-
TOK_cfloat, TOK_cdouble, TOK_creal) BasicTypeTokens;
433+
TOK_float, TOK_double, TOK_real) BasicTypeTokens;
445434

446435
int BasicType2Token(T)() { return BasicTypeTokens[staticIndexOf!(T, BasicTypes)]; }
447436

@@ -764,30 +753,6 @@ class RealValue : ValueT!real
764753
{
765754
}
766755

767-
class IFloatValue : ValueT!ifloat
768-
{
769-
}
770-
771-
class IDoubleValue : ValueT!idouble
772-
{
773-
}
774-
775-
class IRealValue : ValueT!ireal
776-
{
777-
}
778-
779-
class CFloatValue : ValueT!cfloat
780-
{
781-
}
782-
783-
class CDoubleValue : ValueT!cdouble
784-
{
785-
}
786-
787-
class CRealValue : ValueT!creal
788-
{
789-
}
790-
791756
class ArrayValueBase : Value
792757
{
793758
Value first;

0 commit comments

Comments
 (0)