mirror of
https://github.com/corda/corda.git
synced 2025-06-15 05:38:14 +00:00
remove redundant Compiler::store dstType parameter
This commit is contained in:
committed by
Joshua Warner
parent
0ee3eec478
commit
9c98986f99
@ -109,7 +109,6 @@ class Compiler {
|
|||||||
|
|
||||||
virtual void store(ir::Type srcType,
|
virtual void store(ir::Type srcType,
|
||||||
Operand* src,
|
Operand* src,
|
||||||
ir::Type dstType,
|
|
||||||
Operand* dst) = 0;
|
Operand* dst) = 0;
|
||||||
virtual Operand* load(unsigned srcSize, unsigned srcSelectSize, Operand* src,
|
virtual Operand* load(unsigned srcSize, unsigned srcSelectSize, Operand* src,
|
||||||
unsigned dstSize) = 0;
|
unsigned dstSize) = 0;
|
||||||
|
@ -2610,22 +2610,19 @@ class MyCompiler: public Compiler {
|
|||||||
|
|
||||||
virtual void store(ir::Type srcType,
|
virtual void store(ir::Type srcType,
|
||||||
Operand* src,
|
Operand* src,
|
||||||
ir::Type dstType,
|
|
||||||
Operand* dst)
|
Operand* dst)
|
||||||
{
|
{
|
||||||
assert(&c, srcType.flavor() == static_cast<Value*>(src)->type.flavor());
|
assert(&c, srcType.flavor() == static_cast<Value*>(src)->type.flavor());
|
||||||
assert(&c, dstType.flavor() == static_cast<Value*>(dst)->type.flavor());
|
assert(&c, srcType.flavor() == static_cast<Value*>(dst)->type.flavor());
|
||||||
assert(&c, srcType.flavor() == dstType.flavor());
|
|
||||||
assert(&c,
|
assert(&c,
|
||||||
srcType.flavor() != ir::Type::Float
|
srcType.flavor() != ir::Type::Float
|
||||||
|| srcType.size() == static_cast<Value*>(src)->type.size());
|
|| srcType.size() == static_cast<Value*>(src)->type.size());
|
||||||
assert(&c, dstType == static_cast<Value*>(dst)->type);
|
|
||||||
appendMove(&c,
|
appendMove(&c,
|
||||||
lir::Move,
|
lir::Move,
|
||||||
srcType.size(),
|
srcType.size(),
|
||||||
srcType.size(),
|
srcType.size(),
|
||||||
static_cast<Value*>(src),
|
static_cast<Value*>(src),
|
||||||
dstType.size(),
|
static_cast<Value*>(dst)->type.size(),
|
||||||
static_cast<Value*>(dst));
|
static_cast<Value*>(dst));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3208,7 +3208,6 @@ Compiler::Operand* compileDirectInvoke(MyThread* t,
|
|||||||
c->store(
|
c->store(
|
||||||
types.address,
|
types.address,
|
||||||
frame->absoluteAddressOperand(returnAddressPromise),
|
frame->absoluteAddressOperand(returnAddressPromise),
|
||||||
types.address,
|
|
||||||
c->memory(
|
c->memory(
|
||||||
c->threadRegister(), types.address, TARGET_THREAD_TAILADDRESS));
|
c->threadRegister(), types.address, TARGET_THREAD_TAILADDRESS));
|
||||||
|
|
||||||
@ -3754,7 +3753,7 @@ intrinsic(MyThread* t, Frame* frame, object target)
|
|||||||
Compiler::Operand* value = frame->popInt();
|
Compiler::Operand* value = frame->popInt();
|
||||||
Compiler::Operand* address = popLongAddress(frame);
|
Compiler::Operand* address = popLongAddress(frame);
|
||||||
frame->popObject();
|
frame->popObject();
|
||||||
c->store(types.address, value, types.i1, c->memory(address, types.i1));
|
c->store(types.address, value, c->memory(address, types.i1));
|
||||||
return true;
|
return true;
|
||||||
} else if ((MATCH(methodName(t, target), "getShort")
|
} else if ((MATCH(methodName(t, target), "getShort")
|
||||||
and MATCH(methodSpec(t, target), "(J)S"))
|
and MATCH(methodSpec(t, target), "(J)S"))
|
||||||
@ -3774,7 +3773,7 @@ intrinsic(MyThread* t, Frame* frame, object target)
|
|||||||
Compiler::Operand* value = frame->popInt();
|
Compiler::Operand* value = frame->popInt();
|
||||||
Compiler::Operand* address = popLongAddress(frame);
|
Compiler::Operand* address = popLongAddress(frame);
|
||||||
frame->popObject();
|
frame->popObject();
|
||||||
c->store(types.address, value, types.i2, c->memory(address, types.i2));
|
c->store(types.address, value, c->memory(address, types.i2));
|
||||||
return true;
|
return true;
|
||||||
} else if ((MATCH(methodName(t, target), "getInt")
|
} else if ((MATCH(methodName(t, target), "getInt")
|
||||||
and MATCH(methodSpec(t, target), "(J)I"))
|
and MATCH(methodSpec(t, target), "(J)I"))
|
||||||
@ -3801,7 +3800,7 @@ intrinsic(MyThread* t, Frame* frame, object target)
|
|||||||
frame->popObject();
|
frame->popObject();
|
||||||
ir::Type type = MATCH(methodName(t, target), "putInt") ? types.i4
|
ir::Type type = MATCH(methodName(t, target), "putInt") ? types.i4
|
||||||
: types.f4;
|
: types.f4;
|
||||||
c->store(type, value, type, c->memory(address, type));
|
c->store(type, value, c->memory(address, type));
|
||||||
return true;
|
return true;
|
||||||
} else if ((MATCH(methodName(t, target), "getLong")
|
} else if ((MATCH(methodName(t, target), "getLong")
|
||||||
and MATCH(methodSpec(t, target), "(J)J"))
|
and MATCH(methodSpec(t, target), "(J)J"))
|
||||||
@ -3828,7 +3827,7 @@ intrinsic(MyThread* t, Frame* frame, object target)
|
|||||||
frame->popObject();
|
frame->popObject();
|
||||||
ir::Type type = MATCH(methodName(t, target), "putLong") ? types.i8
|
ir::Type type = MATCH(methodName(t, target), "putLong") ? types.i8
|
||||||
: types.f8;
|
: types.f8;
|
||||||
c->store(type, value, type, c->memory(address, type));
|
c->store(type, value, c->memory(address, type));
|
||||||
return true;
|
return true;
|
||||||
} else if (MATCH(methodName(t, target), "getAddress")
|
} else if (MATCH(methodName(t, target), "getAddress")
|
||||||
and MATCH(methodSpec(t, target), "(J)J"))
|
and MATCH(methodSpec(t, target), "(J)J"))
|
||||||
@ -3846,8 +3845,7 @@ intrinsic(MyThread* t, Frame* frame, object target)
|
|||||||
Compiler::Operand* value = frame->popLong();
|
Compiler::Operand* value = frame->popLong();
|
||||||
Compiler::Operand* address = popLongAddress(frame);
|
Compiler::Operand* address = popLongAddress(frame);
|
||||||
frame->popObject();
|
frame->popObject();
|
||||||
c->store(
|
c->store(types.i8, value, c->memory(address, types.address));
|
||||||
types.i8, value, types.address, c->memory(address, types.address));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4201,21 +4199,18 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
case fastore:
|
case fastore:
|
||||||
c->store(types.f4,
|
c->store(types.f4,
|
||||||
value,
|
value,
|
||||||
types.f4,
|
|
||||||
c->memory(array, types.f4, TargetArrayBody, index));
|
c->memory(array, types.f4, TargetArrayBody, index));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case iastore:
|
case iastore:
|
||||||
c->store(types.address,
|
c->store(types.address,
|
||||||
value,
|
value,
|
||||||
types.i4,
|
|
||||||
c->memory(array, types.i4, TargetArrayBody, index));
|
c->memory(array, types.i4, TargetArrayBody, index));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case bastore:
|
case bastore:
|
||||||
c->store(types.address,
|
c->store(types.address,
|
||||||
value,
|
value,
|
||||||
types.i1,
|
|
||||||
c->memory(array, types.i1, TargetArrayBody, index));
|
c->memory(array, types.i1, TargetArrayBody, index));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -4223,21 +4218,18 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
case sastore:
|
case sastore:
|
||||||
c->store(types.address,
|
c->store(types.address,
|
||||||
value,
|
value,
|
||||||
types.i2,
|
|
||||||
c->memory(array, types.i2, TargetArrayBody, index));
|
c->memory(array, types.i2, TargetArrayBody, index));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case dastore:
|
case dastore:
|
||||||
c->store(types.f8,
|
c->store(types.f8,
|
||||||
value,
|
value,
|
||||||
types.f8,
|
|
||||||
c->memory(array, types.f8, TargetArrayBody, index));
|
c->memory(array, types.f8, TargetArrayBody, index));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case lastore:
|
case lastore:
|
||||||
c->store(types.i8,
|
c->store(types.i8,
|
||||||
value,
|
value,
|
||||||
types.i8,
|
|
||||||
c->memory(array, types.i8, TargetArrayBody, index));
|
c->memory(array, types.i8, TargetArrayBody, index));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -5763,7 +5755,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
c->store(
|
c->store(
|
||||||
types.address,
|
types.address,
|
||||||
value,
|
value,
|
||||||
types.i1,
|
|
||||||
c->memory(table, types.i1, targetFieldOffset(context, field)));
|
c->memory(table, types.i1, targetFieldOffset(context, field)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -5772,7 +5763,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
c->store(
|
c->store(
|
||||||
types.address,
|
types.address,
|
||||||
value,
|
value,
|
||||||
types.i2,
|
|
||||||
c->memory(table, types.i2, targetFieldOffset(context, field)));
|
c->memory(table, types.i2, targetFieldOffset(context, field)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -5780,7 +5770,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
c->store(
|
c->store(
|
||||||
types.f4,
|
types.f4,
|
||||||
value,
|
value,
|
||||||
types.f4,
|
|
||||||
c->memory(table, types.f4, targetFieldOffset(context, field)));
|
c->memory(table, types.f4, targetFieldOffset(context, field)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -5788,7 +5777,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
c->store(
|
c->store(
|
||||||
types.address,
|
types.address,
|
||||||
value,
|
value,
|
||||||
types.i4,
|
|
||||||
c->memory(table, types.i4, targetFieldOffset(context, field)));
|
c->memory(table, types.i4, targetFieldOffset(context, field)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -5796,7 +5784,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
c->store(
|
c->store(
|
||||||
types.f8,
|
types.f8,
|
||||||
value,
|
value,
|
||||||
types.f8,
|
|
||||||
c->memory(table, types.f8, targetFieldOffset(context, field)));
|
c->memory(table, types.f8, targetFieldOffset(context, field)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -5804,7 +5791,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
c->store(
|
c->store(
|
||||||
types.i8,
|
types.i8,
|
||||||
value,
|
value,
|
||||||
types.i8,
|
|
||||||
c->memory(table, types.i8, targetFieldOffset(context, field)));
|
c->memory(table, types.i8, targetFieldOffset(context, field)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user