Fix warnings compiling with gcc 4.5. rs=brendan

This commit is contained in:
Jeff Walden 2010-11-22 11:53:38 -05:00
parent 76057406bf
commit c30fbdbb01
4 changed files with 21 additions and 19 deletions

View File

@ -1413,7 +1413,7 @@ JS_EvaluateUCInStackFrame(JSContext *cx, JSStackFrame *fp,
JS_ASSERT_NOT_ON_TRACE(cx);
if (!CheckDebugMode(cx))
return JS_FALSE;
return false;
JSObject *scobj = JS_GetFrameScopeChain(cx, fp);
if (!scobj)
@ -1421,7 +1421,7 @@ JS_EvaluateUCInStackFrame(JSContext *cx, JSStackFrame *fp,
js::AutoCompartment ac(cx, scobj);
if (!ac.enter())
return NULL;
return false;
/*
* NB: This function breaks the assumption that the compiler can see all

View File

@ -1014,14 +1014,8 @@ GetStr(SprintStack *ss, uintN i)
*/
#define PAREN_SLOP (2 + 1)
/*
* These pseudo-ops help js_DecompileValueGenerator decompile JSOP_SETNAME,
* JSOP_SETPROP, and JSOP_SETELEM, respectively. They are never stored in
* bytecode, so they don't preempt valid opcodes.
*/
#define JSOP_GETPROP2 JSOP_LIMIT
#define JSOP_GETELEM2 JSOP_LIMIT + 1
JS_STATIC_ASSERT(JSOP_GETELEM2 <= 255);
/* Fake opcodes (see jsopcode.h) must not overflow unsigned 8-bit space. */
JS_STATIC_ASSERT(JSOP_FAKE_LIMIT <= 255);
static void
AddParenSlop(SprintStack *ss)
@ -2120,14 +2114,13 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb, JSOp nextop)
saveop = op;
if (op >= JSOP_LIMIT) {
switch (op) {
case JSOP_GETPROP2:
if (op == JSOP_GETPROP2) {
saveop = JSOP_GETPROP;
break;
case JSOP_GETELEM2:
}
if (op == JSOP_GETELEM2) {
saveop = JSOP_GETELEM;
break;
default:;
}
}
LOCAL_ASSERT(js_CodeSpec[saveop].length == oplen ||

View File

@ -61,7 +61,16 @@ typedef enum JSOp {
op = val,
#include "jsopcode.tbl"
#undef OPDEF
JSOP_LIMIT
JSOP_LIMIT,
/*
* These pseudo-ops help js_DecompileValueGenerator decompile JSOP_SETNAME,
* JSOP_SETPROP, and JSOP_SETELEM, respectively. They are never stored in
* bytecode, so they don't preempt valid opcodes.
*/
JSOP_GETPROP2 = JSOP_LIMIT,
JSOP_GETELEM2 = JSOP_LIMIT + 1,
JSOP_FAKE_LIMIT = JSOP_GETELEM2
} JSOp;
/*

View File

@ -7022,7 +7022,7 @@ RecordLoopEdge(JSContext* cx, uintN& inlineCallCount)
* it will walk the peer list and find us a free slot or allocate a new
* tree if needed.
*/
bool rv = RecordTree(cx, f->first, NULL, 0, NULL, globalSlots);
bool rv = RecordTree(cx, f->first, NULL, NULL, 0, globalSlots);
#ifdef MOZ_TRACEVIS
if (!rv)
tvso.r = R_FAIL_RECORD_TREE;
@ -7074,7 +7074,7 @@ RecordLoopEdge(JSContext* cx, uintN& inlineCallCount)
bool rv;
switch (lr->exitType) {
case UNSTABLE_LOOP_EXIT:
rv = AttemptToStabilizeTree(cx, globalObj, lr, NULL, 0, NULL);
rv = AttemptToStabilizeTree(cx, globalObj, lr, NULL, NULL, 0);
#ifdef MOZ_TRACEVIS
if (!rv)
tvso.r = R_FAIL_STABILIZE;
@ -16308,7 +16308,7 @@ RecordTracePoint(JSContext* cx, uintN& inlineCallCount, bool* blacklist, bool ex
switch (lr->exitType) {
case UNSTABLE_LOOP_EXIT:
if (!AttemptToStabilizeTree(cx, globalObj, lr, NULL, 0, NULL))
if (!AttemptToStabilizeTree(cx, globalObj, lr, NULL, NULL, 0))
return TPA_RanStuff;
break;
@ -16352,7 +16352,7 @@ RecordTracePoint(JSContext* cx, uintN& inlineCallCount, bool* blacklist, bool ex
return TPA_Nothing;
if (!ScopeChainCheck(cx, tree))
return TPA_Nothing;
if (!RecordTree(cx, tree->first, NULL, 0, NULL, globalSlots))
if (!RecordTree(cx, tree->first, NULL, NULL, 0, globalSlots))
return TPA_Nothing;
interpret: