From 6fdd5d13cae46b1ea2e56922a76e321097a48519 Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Sat, 3 May 2014 19:46:15 -0600 Subject: [PATCH] remove redundant return_ type parameter --- include/avian/codegen/compiler.h | 2 +- src/codegen/compiler.cpp | 5 ++--- src/compile.cpp | 11 +++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/include/avian/codegen/compiler.h b/include/avian/codegen/compiler.h index d4290cbe63..c200fdb37f 100644 --- a/include/avian/codegen/compiler.h +++ b/include/avian/codegen/compiler.h @@ -90,7 +90,7 @@ class Compiler { ir::Type resultType, util::Slice arguments) = 0; - virtual void return_(ir::Type type, ir::Value* value) = 0; + virtual void return_(ir::Value* value) = 0; virtual void return_() = 0; virtual void initLocal(unsigned size, unsigned index, ir::Type type) = 0; diff --git a/src/codegen/compiler.cpp b/src/codegen/compiler.cpp index 45bf92ccc1..be62ca5904 100644 --- a/src/codegen/compiler.cpp +++ b/src/codegen/compiler.cpp @@ -2462,10 +2462,9 @@ class MyCompiler: public Compiler { return result; } - virtual void return_(ir::Type type, ir::Value* a) + virtual void return_(ir::Value* a) { - assert(&c, a->type == type); - appendReturn(&c, type.size(), static_cast(a)); + appendReturn(&c, a->type.size(), static_cast(a)); } virtual void return_() diff --git a/src/compile.cpp b/src/compile.cpp index be33212a80..4ff08d7168 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -1715,7 +1715,6 @@ class Frame { void pushLongQuiet(ir::Value* o) { - // assert(t, o->type == types.i8); pushQuiet(types.i8, o); } @@ -4358,7 +4357,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp, case areturn: { handleExit(t, frame); - c->return_(types.object, frame->popObject()); + c->return_(frame->popObject()); } goto next; case arraylength: { @@ -5273,13 +5272,13 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp, case ireturn: { handleExit(t, frame); - c->return_(types.i4, frame->popInt()); + c->return_(frame->popInt()); } goto next; case freturn: { handleExit(t, frame); - c->return_(types.f4, frame->popInt()); + c->return_(frame->popInt()); } goto next; case istore: @@ -5594,13 +5593,13 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp, case lreturn: { handleExit(t, frame); - c->return_(types.i8, frame->popLong()); + c->return_(frame->popLong()); } goto next; case dreturn: { handleExit(t, frame); - c->return_(types.f8, frame->popLong()); + c->return_(frame->popLong()); } goto next; case lshl: