mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 492301 - nanojit: remove some dead code. r=edwsmith
This commit is contained in:
parent
9581ac0331
commit
1a33faa263
@ -2401,7 +2401,7 @@ class RegExpNativeCompiler {
|
|||||||
|
|
||||||
/* FIXME Use bug 463260 smart pointer when available. */
|
/* FIXME Use bug 463260 smart pointer when available. */
|
||||||
#ifdef NJ_VERBOSE
|
#ifdef NJ_VERBOSE
|
||||||
debug_only_v(fragment->lirbuf->names = new (&gc) LirNameMap(&gc, NULL, fragmento->labels);)
|
debug_only_v(fragment->lirbuf->names = new (&gc) LirNameMap(&gc, fragmento->labels);)
|
||||||
#endif
|
#endif
|
||||||
/* FIXME Use bug 463260 smart pointer when available. */
|
/* FIXME Use bug 463260 smart pointer when available. */
|
||||||
#ifdef NJ_VERBOSE
|
#ifdef NJ_VERBOSE
|
||||||
|
@ -5164,7 +5164,7 @@ js_InitJIT(JSTraceMonitor *tm)
|
|||||||
tm->fragmento = fragmento;
|
tm->fragmento = fragmento;
|
||||||
tm->lirbuf = new (&gc) LirBuffer(fragmento, NULL);
|
tm->lirbuf = new (&gc) LirBuffer(fragmento, NULL);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
tm->lirbuf->names = new (&gc) LirNameMap(&gc, NULL, tm->fragmento->labels);
|
tm->lirbuf->names = new (&gc) LirNameMap(&gc, tm->fragmento->labels);
|
||||||
#endif
|
#endif
|
||||||
for (size_t i = 0; i < MONITOR_N_GLOBAL_STATES; ++i) {
|
for (size_t i = 0; i < MONITOR_N_GLOBAL_STATES; ++i) {
|
||||||
tm->globalStates[i].globalShape = -1;
|
tm->globalStates[i].globalShape = -1;
|
||||||
|
@ -1856,11 +1856,6 @@ namespace nanojit
|
|||||||
debug_only(saved.used = 0); // marker that we are no longer in exit path
|
debug_only(saved.used = 0); // marker that we are no longer in exit path
|
||||||
}
|
}
|
||||||
|
|
||||||
void Assembler::setCallTable(const CallInfo* functions)
|
|
||||||
{
|
|
||||||
_functions = functions;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef NJ_VERBOSE
|
#ifdef NJ_VERBOSE
|
||||||
char Assembler::outline[8192];
|
char Assembler::outline[8192];
|
||||||
char Assembler::outlineEOL[512];
|
char Assembler::outlineEOL[512];
|
||||||
|
@ -162,7 +162,6 @@ namespace nanojit
|
|||||||
*/
|
*/
|
||||||
class Assembler MMGC_SUBCLASS_DECL
|
class Assembler MMGC_SUBCLASS_DECL
|
||||||
{
|
{
|
||||||
friend class DeadCodeFilter;
|
|
||||||
friend class VerboseBlockReader;
|
friend class VerboseBlockReader;
|
||||||
public:
|
public:
|
||||||
#ifdef NJ_VERBOSE
|
#ifdef NJ_VERBOSE
|
||||||
@ -262,8 +261,6 @@ namespace nanojit
|
|||||||
DWB(Fragment*) _thisfrag;
|
DWB(Fragment*) _thisfrag;
|
||||||
RegAllocMap* _branchStateMap;
|
RegAllocMap* _branchStateMap;
|
||||||
|
|
||||||
const CallInfo *_functions;
|
|
||||||
|
|
||||||
NIns* _nIns; // current native instruction
|
NIns* _nIns; // current native instruction
|
||||||
NIns* _nExitIns; // current instruction in exit fragment page
|
NIns* _nExitIns; // current instruction in exit fragment page
|
||||||
NIns* _startingIns; // starting location of code compilation for error handling
|
NIns* _startingIns; // starting location of code compilation for error handling
|
||||||
@ -341,7 +338,6 @@ namespace nanojit
|
|||||||
Register nRegisterAllocFromSet(int32_t set);
|
Register nRegisterAllocFromSet(int32_t set);
|
||||||
void nRegisterResetAll(RegAlloc& a);
|
void nRegisterResetAll(RegAlloc& a);
|
||||||
void nMarkExecute(Page* page, int flags);
|
void nMarkExecute(Page* page, int flags);
|
||||||
void nFrameRestore(RegisterMask rmask);
|
|
||||||
NIns* nPatchBranch(NIns* branch, NIns* location);
|
NIns* nPatchBranch(NIns* branch, NIns* location);
|
||||||
void nFragExit(LIns* guard);
|
void nFragExit(LIns* guard);
|
||||||
|
|
||||||
|
@ -226,13 +226,6 @@ namespace nanojit
|
|||||||
NJ_DELETE(f);
|
NJ_DELETE(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fragmento::clearFrag(const void* ip)
|
|
||||||
{
|
|
||||||
if (_frags.containsKey(ip)) {
|
|
||||||
clearFragment(_frags.remove(ip));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Fragmento::clearFrags()
|
void Fragmento::clearFrags()
|
||||||
{
|
{
|
||||||
// reclaim any dangling native pages
|
// reclaim any dangling native pages
|
||||||
@ -295,29 +288,6 @@ namespace nanojit
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Fragment *Fragmento::getMerge(GuardRecord *lr, const void* ip)
|
|
||||||
{
|
|
||||||
Fragment *anchor = lr->exit->from->anchor;
|
|
||||||
for (Fragment *f = anchor->branches; f != 0; f = f->nextbranch) {
|
|
||||||
if (f->kind == MergeTrace && f->ip == ip /*&& f->calldepth == lr->calldepth*/) {
|
|
||||||
// found existing shared branch on anchor
|
|
||||||
return f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Fragment *f = newBranch(anchor, ip);
|
|
||||||
f->root = f;
|
|
||||||
f->kind = MergeTrace;
|
|
||||||
verbose_only(
|
|
||||||
int mergeid = 1;
|
|
||||||
for (Fragment *g = anchor->branches; g != 0; g = g->nextbranch)
|
|
||||||
if (g->kind == MergeTrace)
|
|
||||||
mergeid++;
|
|
||||||
addLabel(f, "M", mergeid);
|
|
||||||
)
|
|
||||||
return f;
|
|
||||||
}
|
|
||||||
|
|
||||||
Fragment *Fragmento::createBranch(SideExit* exit, const void* ip)
|
Fragment *Fragmento::createBranch(SideExit* exit, const void* ip)
|
||||||
{
|
{
|
||||||
Fragment *f = newBranch(exit->from, ip);
|
Fragment *f = newBranch(exit->from, ip);
|
||||||
@ -561,7 +531,6 @@ namespace nanojit
|
|||||||
loopEntry(NULL),
|
loopEntry(NULL),
|
||||||
vmprivate(NULL),
|
vmprivate(NULL),
|
||||||
_code(NULL),
|
_code(NULL),
|
||||||
_links(NULL),
|
|
||||||
_hits(0),
|
_hits(0),
|
||||||
_pages(NULL)
|
_pages(NULL)
|
||||||
{
|
{
|
||||||
@ -573,12 +542,6 @@ namespace nanojit
|
|||||||
NanoAssert(_pages == 0);
|
NanoAssert(_pages == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fragment::resetHits()
|
|
||||||
{
|
|
||||||
blacklistLevel >>= 1;
|
|
||||||
_hits = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Fragment::blacklist()
|
void Fragment::blacklist()
|
||||||
{
|
{
|
||||||
blacklistLevel++;
|
blacklistLevel++;
|
||||||
|
@ -107,9 +107,7 @@ namespace nanojit
|
|||||||
// that this does not destroy any resources shared with other
|
// that this does not destroy any resources shared with other
|
||||||
// fragments (such as a LirBuffer or this fragment itself as a
|
// fragments (such as a LirBuffer or this fragment itself as a
|
||||||
// jump target).
|
// jump target).
|
||||||
void clearFrag(const void* ip);
|
|
||||||
void clearFrags(); // clear all fragments from the cache
|
void clearFrags(); // clear all fragments from the cache
|
||||||
Fragment* getMerge(GuardRecord *lr, const void* ip);
|
|
||||||
Fragment* createBranch(SideExit *exit, const void* ip);
|
Fragment* createBranch(SideExit *exit, const void* ip);
|
||||||
Fragment* newFrag(const void* ip);
|
Fragment* newFrag(const void* ip);
|
||||||
Fragment* newBranch(Fragment *from, const void* ip);
|
Fragment* newBranch(Fragment *from, const void* ip);
|
||||||
@ -180,12 +178,9 @@ namespace nanojit
|
|||||||
|
|
||||||
NIns* code() { return _code; }
|
NIns* code() { return _code; }
|
||||||
void setCode(NIns* codee, Page* pages) { _code = codee; _pages = pages; }
|
void setCode(NIns* codee, Page* pages) { _code = codee; _pages = pages; }
|
||||||
GuardRecord* links() { return _links; }
|
|
||||||
int32_t& hits() { return _hits; }
|
int32_t& hits() { return _hits; }
|
||||||
void resetHits();
|
|
||||||
void blacklist();
|
void blacklist();
|
||||||
bool isBlacklisted() { return _hits < 0; }
|
bool isBlacklisted() { return _hits < 0; }
|
||||||
debug_only( bool hasOnlyTreeLinks(); )
|
|
||||||
void releaseLirBuffer();
|
void releaseLirBuffer();
|
||||||
void releaseCode(Fragmento* frago);
|
void releaseCode(Fragmento* frago);
|
||||||
void releaseTreeMem(Fragmento* frago);
|
void releaseTreeMem(Fragmento* frago);
|
||||||
|
@ -499,16 +499,14 @@ namespace nanojit
|
|||||||
DRCWB(avmplus::String*) name;
|
DRCWB(avmplus::String*) name;
|
||||||
};
|
};
|
||||||
avmplus::SortedMap<LInsp, Entry*, avmplus::LIST_GCObjects> names;
|
avmplus::SortedMap<LInsp, Entry*, avmplus::LIST_GCObjects> names;
|
||||||
const CallInfo *_functions;
|
|
||||||
LabelMap *labels;
|
LabelMap *labels;
|
||||||
void formatImm(int32_t c, char *buf);
|
void formatImm(int32_t c, char *buf);
|
||||||
public:
|
public:
|
||||||
|
|
||||||
LirNameMap(avmplus::GC *gc, const CallInfo *_functions, LabelMap *r)
|
LirNameMap(avmplus::GC *gc, LabelMap *r)
|
||||||
: lircounts(gc),
|
: lircounts(gc),
|
||||||
funccounts(gc),
|
funccounts(gc),
|
||||||
names(gc),
|
names(gc),
|
||||||
_functions(_functions),
|
|
||||||
labels(r)
|
labels(r)
|
||||||
{}
|
{}
|
||||||
~LirNameMap();
|
~LirNameMap();
|
||||||
@ -708,7 +706,6 @@ namespace nanojit
|
|||||||
class LirBufWriter : public LirWriter
|
class LirBufWriter : public LirWriter
|
||||||
{
|
{
|
||||||
DWB(LirBuffer*) _buf; // underlying buffer housing the instructions
|
DWB(LirBuffer*) _buf; // underlying buffer housing the instructions
|
||||||
LInsp spref, rpref;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LirBufWriter(LirBuffer* buf)
|
LirBufWriter(LirBuffer* buf)
|
||||||
|
@ -64,12 +64,6 @@ namespace nanojit
|
|||||||
free |= rmask(r);
|
free |= rmask(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegAlloc::removeFree(Register r)
|
|
||||||
{
|
|
||||||
NanoAssert(isFree(r));
|
|
||||||
free &= ~rmask(r);
|
|
||||||
}
|
|
||||||
|
|
||||||
void RegAlloc::addActive(Register r, LIns* v)
|
void RegAlloc::addActive(Register r, LIns* v)
|
||||||
{
|
{
|
||||||
// Count++;
|
// Count++;
|
||||||
|
@ -55,7 +55,6 @@ namespace nanojit
|
|||||||
void clear();
|
void clear();
|
||||||
bool isFree(Register r);
|
bool isFree(Register r);
|
||||||
void addFree(Register r);
|
void addFree(Register r);
|
||||||
void removeFree(Register r);
|
|
||||||
void addActive(Register r, LIns* ins);
|
void addActive(Register r, LIns* ins);
|
||||||
void useActive(Register r);
|
void useActive(Register r);
|
||||||
void removeActive(Register r);
|
void removeActive(Register r);
|
||||||
|
Loading…
Reference in New Issue
Block a user