Fixed #ifdef to #if for various features defined in jsconfig.h -
JS_HAS_IN_OPERATOR, and JS_HAS_INITIALIZERS. git-svn-id: svn://10.0.0.236/trunk@5839 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1158,7 +1158,7 @@ js_Interpret(JSContext *cx, jsval *result)
|
||||
} \
|
||||
}
|
||||
|
||||
#ifdef JS_HAS_IN_OPERATOR
|
||||
#if JS_HAS_IN_OPERATOR
|
||||
case JSOP_IN:
|
||||
rval = POP();
|
||||
if (!JSVAL_IS_OBJECT(rval) || rval == JSVAL_NULL) {
|
||||
@@ -2460,7 +2460,7 @@ js_Interpret(JSContext *cx, jsval *result)
|
||||
*vp = sp[-1];
|
||||
break;
|
||||
|
||||
#ifdef JS_HAS_INITIALIZERS
|
||||
#if JS_HAS_INITIALIZERS
|
||||
case JSOP_NEWINIT:
|
||||
argc = 0;
|
||||
fp->sharpDepth++;
|
||||
@@ -2640,3 +2640,4 @@ out:
|
||||
cx->interpLevel--;
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
@@ -1691,7 +1691,7 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
|
||||
todo = -2;
|
||||
break;
|
||||
|
||||
#ifdef JS_HAS_INITIALIZERS
|
||||
#if JS_HAS_INITIALIZERS
|
||||
case JSOP_NEWINIT:
|
||||
LOCAL_ASSERT(ss->top >= 2);
|
||||
(void) PopOff(ss, op);
|
||||
|
||||
@@ -985,7 +985,7 @@ Statement(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
pn1 = NULL;
|
||||
} else {
|
||||
/* Set pn1 to a var list or an initializing expression. */
|
||||
#ifdef JS_HAS_IN_OPERATOR
|
||||
#if JS_HAS_IN_OPERATOR
|
||||
/*
|
||||
* Set the TCF_IN_FOR_INIT flag during parsing of the first clause
|
||||
* of the for statement. This flag will will be used by the
|
||||
@@ -1004,7 +1004,7 @@ Statement(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
} else {
|
||||
pn1 = Expr(cx, ts, tc);
|
||||
}
|
||||
#ifdef JS_HAS_IN_OPERATOR
|
||||
#if JS_HAS_IN_OPERATOR
|
||||
tc->flags &= ~TCF_IN_FOR_INIT;
|
||||
#endif /* JS_HAS_IN_OPERATOR */
|
||||
if (!pn1)
|
||||
@@ -1727,7 +1727,7 @@ static JSParseNode *
|
||||
CondExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
{
|
||||
JSParseNode *pn, *pn1, *pn2, *pn3;
|
||||
#ifdef JS_HAS_IN_OPERATOR
|
||||
#if JS_HAS_IN_OPERATOR
|
||||
uintN oldflags;
|
||||
#endif /* JS_HAS_IN_OPERATOR */
|
||||
|
||||
@@ -1737,7 +1737,7 @@ CondExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
pn = NewParseNode(cx, &ts->token, PN_TERNARY);
|
||||
if (!pn)
|
||||
return NULL;
|
||||
#ifdef JS_HAS_IN_OPERATOR
|
||||
#if JS_HAS_IN_OPERATOR
|
||||
/*
|
||||
* Always accept the 'in' operator in the middle clause of a ternary,
|
||||
* where it's unambiguous, even if we might be parsing the init of a
|
||||
@@ -1747,7 +1747,7 @@ CondExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
tc->flags &= ~TCF_IN_FOR_INIT;
|
||||
#endif /* JS_HAS_IN_OPERATOR */
|
||||
pn2 = AssignExpr(cx, ts, tc);
|
||||
#ifdef JS_HAS_IN_OPERATOR
|
||||
#if JS_HAS_IN_OPERATOR
|
||||
tc->flags = oldflags;
|
||||
#endif /* JS_HAS_IN_OPERATOR */
|
||||
|
||||
@@ -2360,13 +2360,13 @@ PrimaryExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
|
||||
case TOK_LP:
|
||||
{
|
||||
#ifdef JS_HAS_IN_OPERATOR
|
||||
#if JS_HAS_IN_OPERATOR
|
||||
uintN oldflags;
|
||||
#endif
|
||||
pn = NewParseNode(cx, &ts->token, PN_UNARY);
|
||||
if (!pn)
|
||||
return NULL;
|
||||
#ifdef JS_HAS_IN_OPERATOR
|
||||
#if JS_HAS_IN_OPERATOR
|
||||
/*
|
||||
* Always accept the 'in' operator in a parenthesized expression,
|
||||
* where it's unambiguous, even if we might be parsing the init of a
|
||||
@@ -2376,7 +2376,7 @@ PrimaryExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
tc->flags &= ~TCF_IN_FOR_INIT;
|
||||
#endif /* JS_HAS_IN_OPERATOR */
|
||||
pn2 = Expr(cx, ts, tc);
|
||||
#ifdef JS_HAS_IN_OPERATOR
|
||||
#if JS_HAS_IN_OPERATOR
|
||||
tc->flags = oldflags;
|
||||
#endif /* JS_HAS_IN_OPERATOR */
|
||||
if (!pn2)
|
||||
@@ -2679,3 +2679,4 @@ js_FoldConstants(JSContext *cx, JSParseNode *pn)
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user