mirror of
https://github.com/corda/corda.git
synced 2025-06-16 06:08:13 +00:00
remove redundant Compiler::truncate srcType parameter
This commit is contained in:
committed by
Joshua Warner
parent
3029bb2d7e
commit
e3d01746e8
@ -110,8 +110,7 @@ class Compiler {
|
|||||||
ir::Type truncateType,
|
ir::Type truncateType,
|
||||||
ir::Value* src) = 0;
|
ir::Value* src) = 0;
|
||||||
|
|
||||||
virtual ir::Value* truncate(ir::Type type, ir::Type srcType, ir::Value* src)
|
virtual ir::Value* truncate(ir::Type type, ir::Value* src) = 0;
|
||||||
= 0;
|
|
||||||
|
|
||||||
virtual void store(ir::Type srcType, ir::Value* src, ir::Value* dst) = 0;
|
virtual void store(ir::Type srcType, ir::Value* src, ir::Value* dst) = 0;
|
||||||
virtual ir::Value* load(ir::SignExtendMode signExtend,
|
virtual ir::Value* load(ir::SignExtendMode signExtend,
|
||||||
|
@ -2560,17 +2560,16 @@ class MyCompiler: public Compiler {
|
|||||||
static_cast<Value*>(index), handler);
|
static_cast<Value*>(index), handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ir::Value* truncate(ir::Type type, ir::Type srcType, ir::Value* src)
|
virtual ir::Value* truncate(ir::Type type, ir::Value* src)
|
||||||
{
|
{
|
||||||
assert(&c, srcType == src->type);
|
|
||||||
assert(&c, src->type.flavor() == type.flavor());
|
assert(&c, src->type.flavor() == type.flavor());
|
||||||
assert(&c, type.flavor() != ir::Type::Float);
|
assert(&c, type.flavor() != ir::Type::Float);
|
||||||
assert(&c, type.size() < src->type.size());
|
assert(&c, type.size() < src->type.size());
|
||||||
Value* dst = value(&c, type);
|
Value* dst = value(&c, type);
|
||||||
appendMove(&c,
|
appendMove(&c,
|
||||||
lir::Move,
|
lir::Move,
|
||||||
srcType.size(),
|
src->type.size(),
|
||||||
srcType.size(),
|
src->type.size(),
|
||||||
static_cast<Value*>(src),
|
static_cast<Value*>(src),
|
||||||
type.size(),
|
type.size(),
|
||||||
dst);
|
dst);
|
||||||
|
@ -5329,7 +5329,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
} break;
|
} break;
|
||||||
|
|
||||||
case l2i:
|
case l2i:
|
||||||
frame->pushInt(c->truncate(types.i4, types.i8, frame->popLong()));
|
frame->pushInt(c->truncate(types.i4, frame->popLong()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ladd:
|
case ladd:
|
||||||
|
Reference in New Issue
Block a user