mirror of
https://github.com/corda/corda.git
synced 2025-01-05 20:54:13 +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, src->type.flavor() == dstType.flavor());
|
||||
assert(&c, src->type == srcType);
|
||||
|
||||
Value* dst = value(&c, dstType);
|
||||
appendMove(&c,
|
||||
|
@ -4361,11 +4361,11 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
} goto next;
|
||||
|
||||
case arraylength: {
|
||||
frame->pushInt(
|
||||
c->load(ir::SignExtend,
|
||||
types.address,
|
||||
c->memory(frame->popObject(), types.i4, TargetArrayLength),
|
||||
types.i4));
|
||||
frame->pushInt(c->load(
|
||||
ir::SignExtend,
|
||||
types.address,
|
||||
c->memory(frame->popObject(), types.address, TargetArrayLength),
|
||||
types.i4));
|
||||
} break;
|
||||
|
||||
case astore:
|
||||
@ -4679,7 +4679,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
frame->pushInt(c->load(
|
||||
ir::SignExtend,
|
||||
types.i1,
|
||||
c->memory(table, types.i4, targetFieldOffset(context, field)),
|
||||
c->memory(table, types.i1, targetFieldOffset(context, field)),
|
||||
types.i4));
|
||||
break;
|
||||
|
||||
@ -4687,7 +4687,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
frame->pushInt(c->load(
|
||||
ir::ZeroExtend,
|
||||
types.i2,
|
||||
c->memory(table, types.i4, targetFieldOffset(context, field)),
|
||||
c->memory(table, types.i2, targetFieldOffset(context, field)),
|
||||
types.i4));
|
||||
break;
|
||||
|
||||
@ -4695,7 +4695,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
frame->pushInt(c->load(
|
||||
ir::SignExtend,
|
||||
types.i2,
|
||||
c->memory(table, types.i4, targetFieldOffset(context, field)),
|
||||
c->memory(table, types.i2, targetFieldOffset(context, field)),
|
||||
types.i4));
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user