Bug 510095 - allocate LirBuffer with Allocator instead of GC, don't extend GCFinalizedObject, r=gal.

--HG--
extra : rebase_source : 42aa431e0d795351860f0794ea0392e1f663132b
This commit is contained in:
Edwin Smith 2009-08-04 15:03:34 -04:00
Родитель 8a4fea3af0
Коммит 76e73d8022
4 изменённых файлов: 8 добавлений и 13 удалений

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

@ -6428,7 +6428,7 @@ js_InitJIT(JSTraceMonitor *tm)
Fragmento* fragmento = new (&gc) Fragmento(core, &js_LogController, 32, tm->codeAlloc);
verbose_only(fragmento->labels = new (alloc) LabelMap(alloc, &js_LogController);)
tm->fragmento = fragmento;
tm->lirbuf = new (&gc) LirBuffer(alloc);
tm->lirbuf = new LirBuffer(alloc);
#ifdef DEBUG
tm->lirbuf->names = new (alloc) LirNameMap(alloc, tm->fragmento->labels);
#endif
@ -6457,7 +6457,7 @@ js_InitJIT(JSTraceMonitor *tm)
Fragmento* fragmento = new (&gc) Fragmento(core, &js_LogController, 32, tm->reCodeAlloc);
verbose_only(fragmento->labels = new (reAlloc) LabelMap(reAlloc, &js_LogController);)
tm->reFragmento = fragmento;
tm->reLirBuf = new (&gc) LirBuffer(reAlloc);
tm->reLirBuf = new LirBuffer(reAlloc);
#ifdef DEBUG
tm->reLirBuf->names = new (reAlloc) LirNameMap(reAlloc, fragmento->labels);
#endif

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

@ -166,9 +166,10 @@ namespace nanojit
DWB(Fragment*) parent;
DWB(Fragment*) first;
DWB(Fragment*) peer;
DWB(LirBuffer*) lirbuf;
LIns* lastIns;
SideExit* spawnedFrom;
LirBuffer* lirbuf;
LIns* lastIns;
SideExit* spawnedFrom;
GuardRecord* outbound;
TraceKind kind;
const void* ip;

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

@ -120,11 +120,6 @@ namespace nanojit
clear();
}
LirBuffer::~LirBuffer()
{
clear();
}
void LirBuffer::clear()
{
// clear the stats, etc

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

@ -1081,11 +1081,10 @@ namespace nanojit
LIns* insGuard(LOpcode op, LInsp cond, LIns *x);
};
class LirBuffer : public GCFinalizedObject
class LirBuffer
{
public:
LirBuffer(Allocator&);
~LirBuffer();
void clear();
uintptr_t makeRoom(size_t szB); // make room for an instruction
@ -1137,7 +1136,7 @@ namespace nanojit
class LirBufWriter : public LirWriter
{
DWB(LirBuffer*) _buf; // underlying buffer housing the instructions
LirBuffer* _buf; // underlying buffer housing the instructions
public:
LirBufWriter(LirBuffer* buf)