remove redundant f2f aType parameter

This commit is contained in:
Joshua Warner 2014-05-03 19:56:21 -06:00 committed by Joshua Warner
parent 963b371e04
commit c843a97e23
3 changed files with 6 additions and 7 deletions

View File

@ -136,7 +136,7 @@ class Compiler {
ir::Value* a) = 0;
virtual void nullaryOp(lir::Operation op) = 0;
virtual ir::Value* f2f(ir::Type aType, ir::Type resType, ir::Value* a) = 0;
virtual ir::Value* f2f(ir::Type resType, ir::Value* a) = 0;
virtual ir::Value* f2i(ir::Type aType, ir::Type resType, ir::Value* a) = 0;
virtual ir::Value* i2f(ir::Type aType, ir::Type resType, ir::Value* a) = 0;

View File

@ -2692,16 +2692,15 @@ class MyCompiler: public Compiler {
return result;
}
virtual ir::Value* f2f(ir::Type aType, ir::Type resType, ir::Value* a)
virtual ir::Value* f2f(ir::Type resType, ir::Value* a)
{
assert(&c, aType == a->type);
assert(&c, isFloatValue(a));
assert(&c, resType.flavor() == ir::Type::Float);
assert(&c, aType.flavor() == ir::Type::Float);
assert(&c, a->type.flavor() == ir::Type::Float);
Value* result = value(&c, resType);
appendTranslate(&c,
lir::Float2Float,
aType.size(),
a->type.size(),
static_cast<Value*>(a),
resType.size(),
result);

View File

@ -4428,7 +4428,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
} break;
case d2f: {
frame->pushFloat(c->f2f(types.f8, types.f4, frame->popLong()));
frame->pushFloat(c->f2f(types.f4, frame->popLong()));
} break;
case d2i: {
@ -4529,7 +4529,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
break;
case f2d: {
frame->pushDouble(c->f2f(types.f4, types.f8, frame->popInt()));
frame->pushDouble(c->f2f(types.f8, frame->popInt()));
} break;
case f2i: {