remove redundant Compiler::initLocal footprint parameter

This commit is contained in:
Joshua Warner 2014-05-03 22:16:22 -06:00 committed by Joshua Warner
parent b6a3ed763c
commit 9273d5ca39
3 changed files with 11 additions and 11 deletions

View File

@ -93,10 +93,9 @@ class Compiler {
virtual void return_(ir::Value* value) = 0; virtual void return_(ir::Value* value) = 0;
virtual void return_() = 0; virtual void return_() = 0;
virtual void initLocal(unsigned size, unsigned index, ir::Type type) = 0; virtual void initLocal(unsigned index, ir::Type type) = 0;
virtual void initLocalsFromLogicalIp(unsigned logicalIp) = 0; virtual void initLocalsFromLogicalIp(unsigned logicalIp) = 0;
virtual void storeLocal(ir::Value* src, unsigned index) virtual void storeLocal(ir::Value* src, unsigned index) = 0;
= 0;
virtual ir::Value* loadLocal(ir::Type type, unsigned index) = 0; virtual ir::Value* loadLocal(ir::Type type, unsigned index) = 0;
virtual void saveLocals() = 0; virtual void saveLocals() = 0;

View File

@ -2490,9 +2490,10 @@ class MyCompiler: public Compiler {
v->home = frameIndex(&c, index); v->home = frameIndex(&c, index);
} }
virtual void initLocal(unsigned footprint, unsigned index, ir::Type type) virtual void initLocal(unsigned index, ir::Type type)
{ {
assert(&c, footprint == typeFootprint(&c, type)); unsigned footprint = typeFootprint(&c, type);
assert(&c, index + footprint <= c.localFootprint); assert(&c, index + footprint <= c.localFootprint);
Value* v = value(&c, type); Value* v = value(&c, type);

View File

@ -7030,7 +7030,7 @@ compile(MyThread* t, Context* context)
unsigned index = methodParameterFootprint(t, context->method); unsigned index = methodParameterFootprint(t, context->method);
if ((methodFlags(t, context->method) & ACC_STATIC) == 0) { if ((methodFlags(t, context->method) & ACC_STATIC) == 0) {
frame.set(--index, Frame::Object); frame.set(--index, Frame::Object);
c->initLocal(1, index, frame.types.object); c->initLocal(index, frame.types.object);
} }
for (MethodSpecIterator it for (MethodSpecIterator it
@ -7042,29 +7042,29 @@ compile(MyThread* t, Context* context)
case 'L': case 'L':
case '[': case '[':
frame.set(--index, Frame::Object); frame.set(--index, Frame::Object);
c->initLocal(1, index, frame.types.object); c->initLocal(index, frame.types.object);
break; break;
case 'J': case 'J':
frame.set(--index, Frame::Long); frame.set(--index, Frame::Long);
frame.set(--index, Frame::Long); frame.set(--index, Frame::Long);
c->initLocal(2, index, frame.types.i8); c->initLocal(index, frame.types.i8);
break; break;
case 'D': case 'D':
frame.set(--index, Frame::Long); frame.set(--index, Frame::Long);
frame.set(--index, Frame::Long); frame.set(--index, Frame::Long);
c->initLocal(2, index, frame.types.f8); c->initLocal(index, frame.types.f8);
break; break;
case 'F': case 'F':
frame.set(--index, Frame::Integer); frame.set(--index, Frame::Integer);
c->initLocal(1, index, frame.types.f4); c->initLocal(index, frame.types.f4);
break; break;
default: default:
frame.set(--index, Frame::Integer); frame.set(--index, Frame::Integer);
c->initLocal(1, index, frame.types.i4); c->initLocal(index, frame.types.i4);
break; break;
} }
} }