add more aggressive checks to Compiler::load*

This commit is contained in:
Joshua Warner 2014-05-01 00:20:39 -06:00 committed by Joshua Warner
parent 27ea503233
commit 53b68a693d
2 changed files with 6 additions and 2 deletions

View File

@ -2632,6 +2632,8 @@ class MyCompiler: public Compiler {
ir::Type dstType)
{
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);
appendMove(&c,
@ -2650,6 +2652,8 @@ class MyCompiler: public Compiler {
ir::Type dstType)
{
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);
appendMove(&c,

View File

@ -4103,7 +4103,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->load(types.f4,
types.f4,
c->memory(array, types.f4, TargetArrayBody, index),
types.address));
types.f8));
break;
case iaload:
@ -4648,7 +4648,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.f4,
types.f4,
c->memory(table, types.f4, targetFieldOffset(context, field)),
types.address));
types.f8));
break;
case IntField: