mirror of
https://github.com/corda/corda.git
synced 2025-02-09 12:21:22 +00:00
add more aggressive checks to Compiler::load*
This commit is contained in:
parent
27ea503233
commit
53b68a693d
@ -2632,6 +2632,8 @@ class MyCompiler: public Compiler {
|
|||||||
ir::Type dstType)
|
ir::Type dstType)
|
||||||
{
|
{
|
||||||
assert(&c, dstType.size() >= TargetBytesPerWord);
|
assert(&c, dstType.size() >= TargetBytesPerWord);
|
||||||
|
assert(&c, srcType.flavor() == srcSelectType.flavor());
|
||||||
|
assert(&c, srcType.flavor() == dstType.flavor());
|
||||||
|
|
||||||
Value* dst = value(&c, static_cast<Value*>(src)->type);
|
Value* dst = value(&c, static_cast<Value*>(src)->type);
|
||||||
appendMove(&c,
|
appendMove(&c,
|
||||||
@ -2650,6 +2652,8 @@ class MyCompiler: public Compiler {
|
|||||||
ir::Type dstType)
|
ir::Type dstType)
|
||||||
{
|
{
|
||||||
assert(&c, dstType.size() >= TargetBytesPerWord);
|
assert(&c, dstType.size() >= TargetBytesPerWord);
|
||||||
|
assert(&c, srcType.flavor() == srcSelectType.flavor());
|
||||||
|
assert(&c, srcType.flavor() == dstType.flavor());
|
||||||
|
|
||||||
Value* dst = value(&c, static_cast<Value*>(src)->type);
|
Value* dst = value(&c, static_cast<Value*>(src)->type);
|
||||||
appendMove(&c,
|
appendMove(&c,
|
||||||
|
@ -4103,7 +4103,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
c->load(types.f4,
|
c->load(types.f4,
|
||||||
types.f4,
|
types.f4,
|
||||||
c->memory(array, types.f4, TargetArrayBody, index),
|
c->memory(array, types.f4, TargetArrayBody, index),
|
||||||
types.address));
|
types.f8));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case iaload:
|
case iaload:
|
||||||
@ -4648,7 +4648,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
types.f4,
|
types.f4,
|
||||||
types.f4,
|
types.f4,
|
||||||
c->memory(table, types.f4, targetFieldOffset(context, field)),
|
c->memory(table, types.f4, targetFieldOffset(context, field)),
|
||||||
types.address));
|
types.f8));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IntField:
|
case IntField:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user