mirror of
https://github.com/corda/corda.git
synced 2025-01-07 05:28:51 +00:00
add type assert in load, fix ensuing problems
This commit is contained in:
parent
6fdd5d13ca
commit
69966f1d36
@ -2613,6 +2613,7 @@ class MyCompiler: public Compiler {
|
|||||||
{
|
{
|
||||||
assert(&c, srcType.flavor() == dstType.flavor());
|
assert(&c, srcType.flavor() == dstType.flavor());
|
||||||
assert(&c, src->type.flavor() == dstType.flavor());
|
assert(&c, src->type.flavor() == dstType.flavor());
|
||||||
|
assert(&c, src->type == srcType);
|
||||||
|
|
||||||
Value* dst = value(&c, dstType);
|
Value* dst = value(&c, dstType);
|
||||||
appendMove(&c,
|
appendMove(&c,
|
||||||
|
@ -4361,11 +4361,11 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
} goto next;
|
} goto next;
|
||||||
|
|
||||||
case arraylength: {
|
case arraylength: {
|
||||||
frame->pushInt(
|
frame->pushInt(c->load(
|
||||||
c->load(ir::SignExtend,
|
ir::SignExtend,
|
||||||
types.address,
|
types.address,
|
||||||
c->memory(frame->popObject(), types.i4, TargetArrayLength),
|
c->memory(frame->popObject(), types.address, TargetArrayLength),
|
||||||
types.i4));
|
types.i4));
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case astore:
|
case astore:
|
||||||
@ -4679,7 +4679,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
frame->pushInt(c->load(
|
frame->pushInt(c->load(
|
||||||
ir::SignExtend,
|
ir::SignExtend,
|
||||||
types.i1,
|
types.i1,
|
||||||
c->memory(table, types.i4, targetFieldOffset(context, field)),
|
c->memory(table, types.i1, targetFieldOffset(context, field)),
|
||||||
types.i4));
|
types.i4));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -4687,7 +4687,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
frame->pushInt(c->load(
|
frame->pushInt(c->load(
|
||||||
ir::ZeroExtend,
|
ir::ZeroExtend,
|
||||||
types.i2,
|
types.i2,
|
||||||
c->memory(table, types.i4, targetFieldOffset(context, field)),
|
c->memory(table, types.i2, targetFieldOffset(context, field)),
|
||||||
types.i4));
|
types.i4));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -4695,7 +4695,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
frame->pushInt(c->load(
|
frame->pushInt(c->load(
|
||||||
ir::SignExtend,
|
ir::SignExtend,
|
||||||
types.i2,
|
types.i2,
|
||||||
c->memory(table, types.i4, targetFieldOffset(context, field)),
|
c->memory(table, types.i2, targetFieldOffset(context, field)),
|
||||||
types.i4));
|
types.i4));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user