Bug 497009 - Deallocate LIR after recording, r=gal.

--HG--
extra : rebase_source : 5fc9d76620f83d3bbf6ba7a4656c296654bb6323
This commit is contained in:
Graydon Hoare 2009-09-23 18:46:34 -07:00
parent df2ec67c4d
commit b5097e03aa
2 changed files with 4 additions and 2 deletions

View File

@ -3109,6 +3109,7 @@ class RegExpNativeCompiler {
~RegExpNativeCompiler() {
/* Purge the tempAlloc used during recording. */
tempAlloc.reset();
JS_TRACE_MONITOR(cx).reLirBuf->clear();
}
JSBool compile()

View File

@ -2290,6 +2290,7 @@ TraceRecorder::~TraceRecorder()
/* Purge the tempAlloc used during recording. */
tempAlloc.reset();
traceMonitor->lirbuf->clear();
#ifdef DEBUG
debug_only_stmt( delete verbose_filter; )
@ -2598,8 +2599,8 @@ JSTraceMonitor::flush()
}
assembler = new (alloc) Assembler(*codeAlloc, alloc, core, &js_LogController);
lirbuf = new (alloc) LirBuffer(alloc);
reLirBuf = new (alloc) LirBuffer(alloc);
lirbuf = new (alloc) LirBuffer(*tempAlloc);
reLirBuf = new (alloc) LirBuffer(*reTempAlloc);
verbose_only( branches = NULL; )
#ifdef DEBUG