Remove unused isCse() and LirBuffer() args (bug 499260, r=edwsmith).

This commit is contained in:
Nicholas Nethercote 2009-06-22 14:48:16 +10:00
Родитель b7a14c0256
Коммит 3841384e3e
4 изменённых файлов: 16 добавлений и 22 удалений

Просмотреть файл

@ -5430,7 +5430,7 @@ js_InitJIT(JSTraceMonitor *tm)
Fragmento* fragmento = new (&gc) Fragmento(core, 32);
verbose_only(fragmento->labels = new (&gc) LabelMap(core, NULL);)
tm->fragmento = fragmento;
tm->lirbuf = new (&gc) LirBuffer(fragmento, NULL);
tm->lirbuf = new (&gc) LirBuffer(fragmento);
#ifdef DEBUG
tm->lirbuf->names = new (&gc) LirNameMap(&gc, tm->fragmento->labels);
#endif
@ -5446,7 +5446,7 @@ js_InitJIT(JSTraceMonitor *tm)
Fragmento* fragmento = new (&gc) Fragmento(core, 32);
verbose_only(fragmento->labels = new (&gc) LabelMap(core, NULL);)
tm->reFragmento = fragmento;
tm->reLirBuf = new (&gc) LirBuffer(fragmento, NULL);
tm->reLirBuf = new (&gc) LirBuffer(fragmento);
}
#if !defined XP_WIN
debug_only(memset(&jitstats, 0, sizeof(jitstats)));

Просмотреть файл

@ -59,8 +59,6 @@ namespace nanojit
class DeadCodeFilter: public LirFilter
{
const CallInfo *functions;
bool ignoreInstruction(LInsp ins)
{
LOpcode op = ins->opcode();
@ -75,12 +73,12 @@ namespace nanojit
}
public:
DeadCodeFilter(LirFilter *in, const CallInfo *f) : LirFilter(in), functions(f) {}
DeadCodeFilter(LirFilter *in) : LirFilter(in) {}
LInsp read() {
for (;;) {
LInsp i = in->read();
if (!i || i->isGuard() || i->isBranch()
|| (i->isCall() && !i->isCse(functions))
|| (i->isCall() && !i->isCse())
|| !ignoreInstruction(i))
return i;
}
@ -773,7 +771,7 @@ namespace nanojit
avmplus::GC *gc = core->gc;
StackFilter storefilter1(&bufreader, gc, frag->lirbuf, frag->lirbuf->sp);
StackFilter storefilter2(&storefilter1, gc, frag->lirbuf, frag->lirbuf->rp);
DeadCodeFilter deadfilter(&storefilter2, frag->lirbuf->_functions);
DeadCodeFilter deadfilter(&storefilter2);
LirFilter* rdr = &deadfilter;
verbose_only(
VerboseBlockReader vbr(rdr, this, frag->lirbuf->names);

Просмотреть файл

@ -98,12 +98,12 @@ namespace nanojit
#endif /* NJ_PROFILE */
// LCompressedBuffer
LirBuffer::LirBuffer(Fragmento* frago, const CallInfo* functions)
LirBuffer::LirBuffer(Fragmento* frago)
: _frago(frago),
#ifdef NJ_VERBOSE
names(NULL),
#endif
_functions(functions), abi(ABI_FASTCALL),
abi(ABI_FASTCALL),
state(NULL), param1(NULL), sp(NULL), rp(NULL),
_pages(frago->core()->GetGC())
{
@ -533,7 +533,7 @@ namespace nanojit
#endif
}
bool LIns::isCse(const CallInfo *functions) const
bool LIns::isCse() const
{
return nanojit::isCseOpcode(firstWord.code) || (isCall() && callInfo()->_cse);
}
@ -1531,7 +1531,7 @@ namespace nanojit
total++;
// first handle side-effect instructions
if (!i->isCse(frag->lirbuf->_functions))
if (!i->isCse())
{
live.add(i,0);
if (i->isGuard())
@ -1968,15 +1968,15 @@ namespace nanojit
return out->insCall(ci, args);
}
CseReader::CseReader(LirFilter *in, LInsHashSet *exprs, const CallInfo *functions)
: LirFilter(in), exprs(exprs), functions(functions)
CseReader::CseReader(LirFilter *in, LInsHashSet *exprs)
: LirFilter(in), exprs(exprs)
{}
LInsp CseReader::read()
{
LInsp i = in->read();
if (i) {
if (i->isCse(functions))
if (i->isCse())
exprs->replace(i);
}
return i;

Просмотреть файл

@ -282,7 +282,7 @@ namespace nanojit
#endif
}
bool isCse(const CallInfo *functions) const;
bool isCse() const;
bool isRet() const { return nanojit::isRetOpcode(firstWord.code); }
bool isop(LOpcode o) const { return firstWord.code == o; }
#if defined(_DEBUG)
@ -366,11 +366,10 @@ namespace nanojit
{
public:
LirWriter *out;
const CallInfo *_functions;
virtual ~LirWriter() {}
LirWriter(LirWriter* out)
: out(out), _functions(out?out->_functions : 0) {}
: out(out) {}
virtual LInsp ins0(LOpcode v) {
return out->ins0(v);
@ -672,7 +671,7 @@ namespace nanojit
{
public:
DWB(Fragmento*) _frago;
LirBuffer(Fragmento* frago, const CallInfo* functions);
LirBuffer(Fragmento* frago);
virtual ~LirBuffer();
void clear();
void rewind();
@ -692,7 +691,6 @@ namespace nanojit
}
_stats;
const CallInfo* _functions;
AbiKind abi;
LInsp state,param1,sp,rp;
LInsp savedRegs[NumSavedRegs];
@ -715,7 +713,6 @@ namespace nanojit
public:
LirBufWriter(LirBuffer* buf)
: LirWriter(0), _buf(buf) {
_functions = buf->_functions;
}
// LirWriter interface
@ -790,9 +787,8 @@ namespace nanojit
class CseReader: public LirFilter
{
LInsHashSet *exprs;
const CallInfo *functions;
public:
CseReader(LirFilter *in, LInsHashSet *exprs, const CallInfo*);
CseReader(LirFilter *in, LInsHashSet *exprs);
LInsp read();
};