mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-04 16:15:25 +00:00
Factor out js_ContinueRecording from js_LoopEdge.
This commit is contained in:
parent
1157b3a775
commit
471c0b9fbb
@ -1444,16 +1444,10 @@ js_AttemptToExtendTree(JSContext* cx, GuardRecord* lr, Fragment* f)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
js_LoopEdge(JSContext* cx, jsbytecode* oldpc, uintN& inlineCallCount)
|
||||
static bool
|
||||
js_ContinueRecording(JSContext* cx, TraceRecorder* r, jsbytecode* oldpc)
|
||||
{
|
||||
JSTraceMonitor* tm = &JS_TRACE_MONITOR(cx);
|
||||
|
||||
/* is the recorder currently active? */
|
||||
if (tm->recorder) {
|
||||
TraceRecorder* r = tm->recorder;
|
||||
#ifdef JS_THREADSAFE
|
||||
/* XXX should this test not be earlier, to avoid even recording? */
|
||||
if (OBJ_SCOPE(JS_GetGlobalForObject(cx, cx->fp->scopeChain))->title.ownercx != cx) {
|
||||
#ifdef DEBUG
|
||||
printf("Global object not owned by this context.\n");
|
||||
@ -1477,7 +1471,16 @@ js_LoopEdge(JSContext* cx, jsbytecode* oldpc, uintN& inlineCallCount)
|
||||
return false; /* done recording */
|
||||
}
|
||||
return true; /* keep recording (attempting to unroll inner loop) */
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
js_LoopEdge(JSContext* cx, jsbytecode* oldpc, uintN& inlineCallCount)
|
||||
{
|
||||
JSTraceMonitor* tm = &JS_TRACE_MONITOR(cx);
|
||||
|
||||
/* is the recorder currently active? */
|
||||
if (tm->recorder)
|
||||
return js_ContinueRecording(cx, tm->recorder, oldpc);
|
||||
|
||||
Fragment* f = tm->fragmento->getLoop(cx->fp->regs->pc);
|
||||
if (!f->code()) {
|
||||
|
Loading…
Reference in New Issue
Block a user