From c843a97e23f91d50290954493cc799a63d61dc80 Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Sat, 3 May 2014 19:56:21 -0600 Subject: [PATCH] remove redundant f2f aType parameter --- include/avian/codegen/compiler.h | 2 +- src/codegen/compiler.cpp | 7 +++---- src/compile.cpp | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/avian/codegen/compiler.h b/include/avian/codegen/compiler.h index 1dfa289ba8..36f89690b4 100644 --- a/include/avian/codegen/compiler.h +++ b/include/avian/codegen/compiler.h @@ -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; diff --git a/src/codegen/compiler.cpp b/src/codegen/compiler.cpp index cb46eb22b7..55308e24d3 100644 --- a/src/codegen/compiler.cpp +++ b/src/codegen/compiler.cpp @@ -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(a), resType.size(), result); diff --git a/src/compile.cpp b/src/compile.cpp index 3868badc02..4e50fad7dc 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -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: {