Closed Bug 461101 Opened 17 years ago Closed 16 years ago

Compile warnings in <jstracer.cpp>

Categories

(Core :: JavaScript Engine, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 549010

People

(Reporter: sgautherie, Assigned: gal)

Details

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b2pre) Gecko/20081022 Minefield/3.1b2pre] (home, optim default) (W2Ksp4) { .../js/src/jstracer.cpp(328) : warning C4244: 'return' : conversion from 'unsigned long' to 'uint8', possible loss of data .../js/src/jstracer.cpp(1747) : warning C4800: 'nanojit::NIns *' : forcing value to bool 'true' or 'false' (performance warning) .../js/src/jstracer.cpp(1757) : warning C4244: '=' : conversion from 'unsigned long' to 'uint8', possible loss of data .../js/src/jstracer.cpp(2308) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) .../js/src/jstracer.cpp(2661) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning) .../js/src/jstracer.cpp(3431) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning) .../js/src/jstracer.cpp(4688) : warning C4146: unary minus operator applied to unsigned type, result still unsigned .../js/src/jstracer.cpp(5476) : warning C4800: 'nanojit::LIns *' : forcing value to bool 'true' or 'false' (performance warning) } The one at line 4688 is new; the others where already there "before".
This WFM now. All that are left are the following: .../js/src/jstracer.cpp(5236) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning) .../js/src/jstracer.cpp(5257) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning) .../js/src/jstracer.cpp(5317) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning)
Ftr, from FF and SM builds I did on 2009.02.11, this file had: { /js/src/jstracer.cpp(3159) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) /js/src/jstracer.cpp(5109) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning) /js/src/jstracer.cpp(5130) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning) /js/src/jstracer.cpp(5190) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning) /js/src/jstracer.cpp(9115) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning) /js/src/jstracer.cpp(9137) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning) /js/src/jstracer.cpp(9295) : warning C4146: unary minus operator applied to unsigned type, result still unsigned /js/src/jstracer.cpp(9301) : warning C4146: unary minus operator applied to unsigned type, result still unsigned }
Summary: 1 new warning in <jstracer.cpp> → Compile warnings in <jstracer.cpp>
Should have mentioned, comment #1 was a copy/paste from a recent win32 m-c tinderbox log.
.../js/src/jstracer.cpp(9389) : warning C4390: ';' : empty controlled statement found; is this the intent?
Could you post the corresponding source lines? Our source files seem to be slightly out of whack.
For comment #1 (line numbers are still the same): 5232 static bool 5233 evalCmp(LOpcode op, JSString* l, JSString* r) 5234 { 5235 if (op == LIR_feq) 5236 return js_EqualStrings(l, r); 5237 return evalCmp(op, js_CompareStrings(l, r)); 5238 } 5254 } else if (ltag == JSVAL_STRING) { 5255 LIns* args[] = { r_ins, l_ins }; 5256 x = lir->ins2i(LIR_eq, lir->insCall(&js_EqualStrings_ci, args), equal); 5257 cond = js_EqualStrings(JSVAL_TO_STRING(l), JSVAL_TO_STRING(r)); 5258 } else { 5313 } else if (JSVAL_IS_STRING(l)) { 5314 args[0] = r_ins, args[1] = l_ins; 5315 l_ins = lir->insCall(&js_EqualStrings_ci, args); 5316 r_ins = lir->insImm(1); 5317 cond = js_EqualStrings(JSVAL_TO_STRING(l), JSVAL_TO_STRING(r)); 5318 } else { For comment #4: Waldo just took care of it. http://hg.mozilla.org/tracemonkey/rev/22712c7e7587
Assignee: general → gal
Building on current mozilla-central: jstracer.cpp(3896) : warning C4805: '==' : unsafe mix of type 'int32_t' and type 'bool' in operation 3895 if (x->isconst()) { 3896 loop = (x->imm32() == cond); 3897 return; 3898 } jstracer.cpp(6911) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning) 6907 static bool 6908 evalCmp(LOpcode op, JSString* l, JSString* r) 6909 { 6910 if (op == LIR_feq) 6911 return js_EqualStrings(l, r); 6912 return evalCmp(op, js_CompareStrings(l, r)); 6913 } jstracer.cpp(6932) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning) 6929 } else if (ltag == TT_STRING) { 6930 LIns* args[] = { r_ins, l_ins }; 6931 x = lir->ins2i(LIR_eq, lir->insCall(&js_EqualStrings_ci, args), equal); 6932 cond = js_EqualStrings(JSVAL_TO_STRING(l), JSVAL_TO_STRING(r)); 6933 } else { jstracer.cpp(6992) : warning C4800: 'JSBool' : forcing value to bool 'true' or 'false' (performance warning) 6988 } else if (JSVAL_IS_STRING(l)) { 6989 args[0] = r_ins, args[1] = l_ins; 6990 l_ins = lir->insCall(&js_EqualStrings_ci, args); 6991 r_ins = lir->insImm(1); 6992 cond = js_EqualStrings(JSVAL_TO_STRING(l), JSVAL_TO_STRING(r)); 6993 } else { jstracer.cpp(8435) : warning C4800: 'uintN' : forcing value to bool 'true' or 'false' (performance warning) 8432 JS_REQUIRES_STACK JSRecordingStatus 8433 TraceRecorder::emitNativeCall(JSTraceableNative* known, uintN argc, LIns* args[]) 8434 { 8435 bool constructing = known->flags & JSTN_CONSTRUCTOR; 8436 jstracer.cpp(8620) : warning C4018: '>' : signed/unsigned mismatch 8619 // Allocate the vp vector and emit code to root it. 8620 uintN vplen = 2 + JS_MAX(argc, FUN_MINARGS(fun)) + fun->u.n.extra; 8621 if (!(fun->flags & JSFUN_FAST_NATIVE)) 8622 vplen++; // slow native return value slot
Work in this bug seems to have been supplanted by the work in bug 549010.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.