зеркало из https://github.com/mozilla/pjs.git
Bug 504705 - TM/nanojit: use NULL as the condition for unconditional guards. r=gal.
This commit is contained in:
Родитель
f5737ea311
Коммит
450104f1e6
|
@ -3044,7 +3044,7 @@ class RegExpNativeCompiler {
|
|||
exit->re_flags = re->flags;
|
||||
exit->re_length = re_length;
|
||||
memcpy(exit->re_chars, re_chars, re_length * sizeof(jschar));
|
||||
fragment->lastIns = lir->insGuard(LIR_loop, lir->insImm(1), skip);
|
||||
fragment->lastIns = lir->insGuard(LIR_loop, NULL, skip);
|
||||
return guard;
|
||||
}
|
||||
|
||||
|
|
|
@ -3607,7 +3607,7 @@ TraceRecorder::closeLoop(JSTraceMonitor* tm, bool& demote)
|
|||
}
|
||||
|
||||
if (!stable) {
|
||||
fragment->lastIns = lir->insGuard(LIR_x, lir->insImm(1), createGuardRecord(exit));
|
||||
fragment->lastIns = lir->insGuard(LIR_x, NULL, createGuardRecord(exit));
|
||||
|
||||
/*
|
||||
* If we didn't find a type stable peer, we compile the loop anyway and
|
||||
|
@ -3639,7 +3639,7 @@ TraceRecorder::closeLoop(JSTraceMonitor* tm, bool& demote)
|
|||
}
|
||||
} else {
|
||||
exit->target = fragment->root;
|
||||
fragment->lastIns = lir->insGuard(LIR_loop, lir->insImm(1), createGuardRecord(exit));
|
||||
fragment->lastIns = lir->insGuard(LIR_loop, NULL, createGuardRecord(exit));
|
||||
}
|
||||
compile(tm);
|
||||
|
||||
|
@ -3766,7 +3766,7 @@ TraceRecorder::endLoop(JSTraceMonitor* tm)
|
|||
}
|
||||
|
||||
fragment->lastIns =
|
||||
lir->insGuard(LIR_x, lir->insImm(1), createGuardRecord(snapshot(LOOP_EXIT)));
|
||||
lir->insGuard(LIR_x, NULL, createGuardRecord(snapshot(LOOP_EXIT)));
|
||||
compile(tm);
|
||||
|
||||
if (tm->fragmento->assm()->error() != nanojit::None)
|
||||
|
@ -4058,7 +4058,7 @@ nanojit::LirNameMap::formatGuard(LIns *i, char *out)
|
|||
"%s: %s %s -> pc=%p imacpc=%p sp%+ld rp%+ld",
|
||||
formatRef(i),
|
||||
lirNames[i->opcode()],
|
||||
i->oprnd1()->isCond() ? formatRef(i->oprnd1()) : "",
|
||||
i->oprnd1() ? formatRef(i->oprnd1()) : "",
|
||||
(void *)x->pc,
|
||||
(void *)x->imacpc,
|
||||
(long int)x->sp_adj,
|
||||
|
@ -8578,7 +8578,7 @@ TraceRecorder::emitNativeCall(JSTraceableNative* known, uintN argc, LIns* args[]
|
|||
|
||||
// Tell nanojit not to discard or defer stack writes before this call.
|
||||
LIns* guardRec = createGuardRecord(exit);
|
||||
lir->insGuard(LIR_xbarrier, guardRec, guardRec);
|
||||
lir->insGuard(LIR_xbarrier, NULL, guardRec);
|
||||
}
|
||||
|
||||
LIns* res_ins = lir->insCall(known->builtin, args);
|
||||
|
@ -10259,7 +10259,7 @@ TraceRecorder::denseArrayElement(jsval& oval, jsval& ival, jsval*& vp, LIns*& v_
|
|||
dslots_ins,
|
||||
-(int)sizeof(jsval))),
|
||||
NULL);
|
||||
lir->insGuard(LIR_x, lir->insImm(1), createGuardRecord(exit));
|
||||
lir->insGuard(LIR_x, NULL, createGuardRecord(exit));
|
||||
LIns* label = lir->ins0(LIR_label);
|
||||
if (br1)
|
||||
br1->setTarget(label);
|
||||
|
|
|
@ -581,7 +581,7 @@ endFragment(const Pipeline &writer,
|
|||
memset(exit, 0, sizeof(VMSideExit));
|
||||
exit->guards = NULL;
|
||||
exit->from = exit->target = frag;
|
||||
frag->lastIns = writer.lir->insGuard(LIR_loop, writer.lir->insImm(1), exitIns);
|
||||
frag->lastIns = writer.lir->insGuard(LIR_loop, NULL, exitIns);
|
||||
|
||||
::compile(fragmento->assm(), frag);
|
||||
|
||||
|
|
|
@ -906,7 +906,7 @@ namespace nanojit
|
|||
// so assert in debug builds.
|
||||
NanoAssertMsg(0, "Constantly false guard detected");
|
||||
#endif
|
||||
return out->insGuard(LIR_x, out->insImm(1), x);
|
||||
return out->insGuard(LIR_x, NULL, x);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче