Bug 538593 - guardClass always does a JS_snprintf even though it usually doesn't use the result (r=dvander).

This commit is contained in:
Brendan Eich 2010-01-11 18:48:08 -08:00
parent 7d217b4429
commit a17ec0f3aa

View File

@ -9751,8 +9751,12 @@ TraceRecorder::guardClass(JSObject* obj, LIns* obj_ins, JSClass* clasp, VMSideEx
LIns* class_ins = lir->insLoad(LIR_ldp, obj_ins, offsetof(JSObject, classword));
class_ins = lir->ins2(LIR_piand, class_ins, INS_CONSTWORD(~JSSLOT_CLASS_MASK_BITS));
#ifdef JS_JIT_SPEW
char namebuf[32];
JS_snprintf(namebuf, sizeof namebuf, "guard(class is %s)", clasp->name);
#else
static const char namebuf[] = "";
#endif
guard(cond, addName(lir->ins2(LIR_peq, class_ins, INS_CONSTPTR(clasp)), namebuf), exit);
return cond;
}