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
Родитель 85dd455a8b
Коммит 780179914c
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -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;
}