зеркало из https://github.com/mozilla/gecko-dev.git
Remove unused isCse() and LirBuffer() args (bug 499260, r=edwsmith).
This commit is contained in:
Родитель
b7a14c0256
Коммит
3841384e3e
|
@ -5430,7 +5430,7 @@ js_InitJIT(JSTraceMonitor *tm)
|
||||||
Fragmento* fragmento = new (&gc) Fragmento(core, 32);
|
Fragmento* fragmento = new (&gc) Fragmento(core, 32);
|
||||||
verbose_only(fragmento->labels = new (&gc) LabelMap(core, NULL);)
|
verbose_only(fragmento->labels = new (&gc) LabelMap(core, NULL);)
|
||||||
tm->fragmento = fragmento;
|
tm->fragmento = fragmento;
|
||||||
tm->lirbuf = new (&gc) LirBuffer(fragmento, NULL);
|
tm->lirbuf = new (&gc) LirBuffer(fragmento);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
tm->lirbuf->names = new (&gc) LirNameMap(&gc, tm->fragmento->labels);
|
tm->lirbuf->names = new (&gc) LirNameMap(&gc, tm->fragmento->labels);
|
||||||
#endif
|
#endif
|
||||||
|
@ -5446,7 +5446,7 @@ js_InitJIT(JSTraceMonitor *tm)
|
||||||
Fragmento* fragmento = new (&gc) Fragmento(core, 32);
|
Fragmento* fragmento = new (&gc) Fragmento(core, 32);
|
||||||
verbose_only(fragmento->labels = new (&gc) LabelMap(core, NULL);)
|
verbose_only(fragmento->labels = new (&gc) LabelMap(core, NULL);)
|
||||||
tm->reFragmento = fragmento;
|
tm->reFragmento = fragmento;
|
||||||
tm->reLirBuf = new (&gc) LirBuffer(fragmento, NULL);
|
tm->reLirBuf = new (&gc) LirBuffer(fragmento);
|
||||||
}
|
}
|
||||||
#if !defined XP_WIN
|
#if !defined XP_WIN
|
||||||
debug_only(memset(&jitstats, 0, sizeof(jitstats)));
|
debug_only(memset(&jitstats, 0, sizeof(jitstats)));
|
||||||
|
|
|
@ -59,8 +59,6 @@ namespace nanojit
|
||||||
|
|
||||||
class DeadCodeFilter: public LirFilter
|
class DeadCodeFilter: public LirFilter
|
||||||
{
|
{
|
||||||
const CallInfo *functions;
|
|
||||||
|
|
||||||
bool ignoreInstruction(LInsp ins)
|
bool ignoreInstruction(LInsp ins)
|
||||||
{
|
{
|
||||||
LOpcode op = ins->opcode();
|
LOpcode op = ins->opcode();
|
||||||
|
@ -75,12 +73,12 @@ namespace nanojit
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DeadCodeFilter(LirFilter *in, const CallInfo *f) : LirFilter(in), functions(f) {}
|
DeadCodeFilter(LirFilter *in) : LirFilter(in) {}
|
||||||
LInsp read() {
|
LInsp read() {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
LInsp i = in->read();
|
LInsp i = in->read();
|
||||||
if (!i || i->isGuard() || i->isBranch()
|
if (!i || i->isGuard() || i->isBranch()
|
||||||
|| (i->isCall() && !i->isCse(functions))
|
|| (i->isCall() && !i->isCse())
|
||||||
|| !ignoreInstruction(i))
|
|| !ignoreInstruction(i))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
@ -773,7 +771,7 @@ namespace nanojit
|
||||||
avmplus::GC *gc = core->gc;
|
avmplus::GC *gc = core->gc;
|
||||||
StackFilter storefilter1(&bufreader, gc, frag->lirbuf, frag->lirbuf->sp);
|
StackFilter storefilter1(&bufreader, gc, frag->lirbuf, frag->lirbuf->sp);
|
||||||
StackFilter storefilter2(&storefilter1, gc, frag->lirbuf, frag->lirbuf->rp);
|
StackFilter storefilter2(&storefilter1, gc, frag->lirbuf, frag->lirbuf->rp);
|
||||||
DeadCodeFilter deadfilter(&storefilter2, frag->lirbuf->_functions);
|
DeadCodeFilter deadfilter(&storefilter2);
|
||||||
LirFilter* rdr = &deadfilter;
|
LirFilter* rdr = &deadfilter;
|
||||||
verbose_only(
|
verbose_only(
|
||||||
VerboseBlockReader vbr(rdr, this, frag->lirbuf->names);
|
VerboseBlockReader vbr(rdr, this, frag->lirbuf->names);
|
||||||
|
|
|
@ -98,12 +98,12 @@ namespace nanojit
|
||||||
#endif /* NJ_PROFILE */
|
#endif /* NJ_PROFILE */
|
||||||
|
|
||||||
// LCompressedBuffer
|
// LCompressedBuffer
|
||||||
LirBuffer::LirBuffer(Fragmento* frago, const CallInfo* functions)
|
LirBuffer::LirBuffer(Fragmento* frago)
|
||||||
: _frago(frago),
|
: _frago(frago),
|
||||||
#ifdef NJ_VERBOSE
|
#ifdef NJ_VERBOSE
|
||||||
names(NULL),
|
names(NULL),
|
||||||
#endif
|
#endif
|
||||||
_functions(functions), abi(ABI_FASTCALL),
|
abi(ABI_FASTCALL),
|
||||||
state(NULL), param1(NULL), sp(NULL), rp(NULL),
|
state(NULL), param1(NULL), sp(NULL), rp(NULL),
|
||||||
_pages(frago->core()->GetGC())
|
_pages(frago->core()->GetGC())
|
||||||
{
|
{
|
||||||
|
@ -533,7 +533,7 @@ namespace nanojit
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LIns::isCse(const CallInfo *functions) const
|
bool LIns::isCse() const
|
||||||
{
|
{
|
||||||
return nanojit::isCseOpcode(firstWord.code) || (isCall() && callInfo()->_cse);
|
return nanojit::isCseOpcode(firstWord.code) || (isCall() && callInfo()->_cse);
|
||||||
}
|
}
|
||||||
|
@ -1531,7 +1531,7 @@ namespace nanojit
|
||||||
total++;
|
total++;
|
||||||
|
|
||||||
// first handle side-effect instructions
|
// first handle side-effect instructions
|
||||||
if (!i->isCse(frag->lirbuf->_functions))
|
if (!i->isCse())
|
||||||
{
|
{
|
||||||
live.add(i,0);
|
live.add(i,0);
|
||||||
if (i->isGuard())
|
if (i->isGuard())
|
||||||
|
@ -1968,15 +1968,15 @@ namespace nanojit
|
||||||
return out->insCall(ci, args);
|
return out->insCall(ci, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
CseReader::CseReader(LirFilter *in, LInsHashSet *exprs, const CallInfo *functions)
|
CseReader::CseReader(LirFilter *in, LInsHashSet *exprs)
|
||||||
: LirFilter(in), exprs(exprs), functions(functions)
|
: LirFilter(in), exprs(exprs)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
LInsp CseReader::read()
|
LInsp CseReader::read()
|
||||||
{
|
{
|
||||||
LInsp i = in->read();
|
LInsp i = in->read();
|
||||||
if (i) {
|
if (i) {
|
||||||
if (i->isCse(functions))
|
if (i->isCse())
|
||||||
exprs->replace(i);
|
exprs->replace(i);
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
|
|
|
@ -282,7 +282,7 @@ namespace nanojit
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isCse(const CallInfo *functions) const;
|
bool isCse() const;
|
||||||
bool isRet() const { return nanojit::isRetOpcode(firstWord.code); }
|
bool isRet() const { return nanojit::isRetOpcode(firstWord.code); }
|
||||||
bool isop(LOpcode o) const { return firstWord.code == o; }
|
bool isop(LOpcode o) const { return firstWord.code == o; }
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
|
@ -366,11 +366,10 @@ namespace nanojit
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LirWriter *out;
|
LirWriter *out;
|
||||||
const CallInfo *_functions;
|
|
||||||
|
|
||||||
virtual ~LirWriter() {}
|
virtual ~LirWriter() {}
|
||||||
LirWriter(LirWriter* out)
|
LirWriter(LirWriter* out)
|
||||||
: out(out), _functions(out?out->_functions : 0) {}
|
: out(out) {}
|
||||||
|
|
||||||
virtual LInsp ins0(LOpcode v) {
|
virtual LInsp ins0(LOpcode v) {
|
||||||
return out->ins0(v);
|
return out->ins0(v);
|
||||||
|
@ -672,7 +671,7 @@ namespace nanojit
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DWB(Fragmento*) _frago;
|
DWB(Fragmento*) _frago;
|
||||||
LirBuffer(Fragmento* frago, const CallInfo* functions);
|
LirBuffer(Fragmento* frago);
|
||||||
virtual ~LirBuffer();
|
virtual ~LirBuffer();
|
||||||
void clear();
|
void clear();
|
||||||
void rewind();
|
void rewind();
|
||||||
|
@ -692,7 +691,6 @@ namespace nanojit
|
||||||
}
|
}
|
||||||
_stats;
|
_stats;
|
||||||
|
|
||||||
const CallInfo* _functions;
|
|
||||||
AbiKind abi;
|
AbiKind abi;
|
||||||
LInsp state,param1,sp,rp;
|
LInsp state,param1,sp,rp;
|
||||||
LInsp savedRegs[NumSavedRegs];
|
LInsp savedRegs[NumSavedRegs];
|
||||||
|
@ -715,7 +713,6 @@ namespace nanojit
|
||||||
public:
|
public:
|
||||||
LirBufWriter(LirBuffer* buf)
|
LirBufWriter(LirBuffer* buf)
|
||||||
: LirWriter(0), _buf(buf) {
|
: LirWriter(0), _buf(buf) {
|
||||||
_functions = buf->_functions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// LirWriter interface
|
// LirWriter interface
|
||||||
|
@ -790,9 +787,8 @@ namespace nanojit
|
||||||
class CseReader: public LirFilter
|
class CseReader: public LirFilter
|
||||||
{
|
{
|
||||||
LInsHashSet *exprs;
|
LInsHashSet *exprs;
|
||||||
const CallInfo *functions;
|
|
||||||
public:
|
public:
|
||||||
CseReader(LirFilter *in, LInsHashSet *exprs, const CallInfo*);
|
CseReader(LirFilter *in, LInsHashSet *exprs);
|
||||||
LInsp read();
|
LInsp read();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче