зеркало из https://github.com/mozilla/pjs.git
[Bug 430871] Eliminating unused JSINVOKE_INTERNAL and JSFRAME_INTERNAL. r=brendan a1.9=dsicore
This commit is contained in:
Родитель
95b5ddd0f4
Коммит
791ffe64da
|
@ -1710,7 +1710,7 @@ sort_compare(void *arg, const void *a, const void *b, int *result)
|
|||
*sp++ = av;
|
||||
*sp++ = bv;
|
||||
|
||||
if (!js_Invoke(cx, 2, invokevp, JSINVOKE_INTERNAL))
|
||||
if (!js_Invoke(cx, 2, invokevp, 0))
|
||||
return JS_FALSE;
|
||||
|
||||
cmp = js_ValueToNumber(cx, invokevp);
|
||||
|
@ -2733,7 +2733,7 @@ array_extra(JSContext *cx, ArrayExtraMode mode, uintN argc, jsval *vp)
|
|||
*sp++ = OBJECT_TO_JSVAL(obj);
|
||||
|
||||
/* Do the call. */
|
||||
ok = js_Invoke(cx, argc, invokevp, JSINVOKE_INTERNAL);
|
||||
ok = js_Invoke(cx, argc, invokevp, 0);
|
||||
if (!ok)
|
||||
break;
|
||||
|
||||
|
|
|
@ -1586,7 +1586,7 @@ fun_call(JSContext *cx, uintN argc, jsval *vp)
|
|||
invokevp[1] = OBJECT_TO_JSVAL(obj);
|
||||
memcpy(invokevp + 2, argv, argc * sizeof *argv);
|
||||
|
||||
ok = js_Invoke(cx, argc, invokevp, JSINVOKE_INTERNAL);
|
||||
ok = js_Invoke(cx, argc, invokevp, 0);
|
||||
*vp = *invokevp;
|
||||
js_FreeStack(cx, mark);
|
||||
return ok;
|
||||
|
@ -1675,7 +1675,7 @@ fun_apply(JSContext *cx, uintN argc, jsval *vp)
|
|||
sp++;
|
||||
}
|
||||
|
||||
ok = js_Invoke(cx, argc, invokevp, JSINVOKE_INTERNAL);
|
||||
ok = js_Invoke(cx, argc, invokevp, 0);
|
||||
*vp = *invokevp;
|
||||
out:
|
||||
js_FreeStack(cx, mark);
|
||||
|
|
|
@ -970,8 +970,7 @@ NoSuchMethod(JSContext *cx, uintN argc, jsval *vp, uint32 flags)
|
|||
if (!argsobj)
|
||||
return JS_FALSE;
|
||||
args[1] = OBJECT_TO_JSVAL(argsobj);
|
||||
return js_InternalInvoke(cx, thisp, fval, flags | JSINVOKE_INTERNAL,
|
||||
2, args, &vp[0]);
|
||||
return js_InternalInvoke(cx, thisp, fval, flags, 2, args, &vp[0]);
|
||||
}
|
||||
|
||||
#endif /* JS_HAS_NO_SUCH_METHOD */
|
||||
|
@ -1352,7 +1351,7 @@ js_InternalInvoke(JSContext *cx, JSObject *obj, jsval fval, uintN flags,
|
|||
invokevp[1] = OBJECT_TO_JSVAL(obj);
|
||||
memcpy(invokevp + 2, argv, argc * sizeof *argv);
|
||||
|
||||
ok = js_Invoke(cx, argc, invokevp, flags | JSINVOKE_INTERNAL);
|
||||
ok = js_Invoke(cx, argc, invokevp, flags);
|
||||
if (ok) {
|
||||
/*
|
||||
* Store *rval in the a scoped local root if a scope is open, else in
|
||||
|
|
|
@ -103,7 +103,7 @@ typedef struct JSInlineFrame {
|
|||
|
||||
/* JS stack frame flags. */
|
||||
#define JSFRAME_CONSTRUCTING 0x01 /* frame is for a constructor invocation */
|
||||
#define JSFRAME_INTERNAL 0x02 /* internal call, not invoked by a script */
|
||||
#define JSFRAME_COMPUTED_THIS 0x02 /* frame.thisp was computed already */
|
||||
#define JSFRAME_ASSIGNING 0x04 /* a complex (not simplex JOF_ASSIGNING) op
|
||||
is currently assigning to a property */
|
||||
#define JSFRAME_DEBUGGER 0x08 /* frame for JS_EvaluateInStackFrame */
|
||||
|
@ -114,7 +114,6 @@ typedef struct JSInlineFrame {
|
|||
#define JSFRAME_POP_BLOCKS 0x100 /* scope chain contains blocks to pop */
|
||||
#define JSFRAME_GENERATOR 0x200 /* frame belongs to generator-iterator */
|
||||
#define JSFRAME_ROOTED_ARGV 0x400 /* frame.argv is rooted by the caller */
|
||||
#define JSFRAME_COMPUTED_THIS 0x800 /* frame.thisp was computed already */
|
||||
|
||||
#define JSFRAME_OVERRIDE_SHIFT 24 /* override bit-set params; see jsfun.c */
|
||||
#define JSFRAME_OVERRIDE_BITS 8
|
||||
|
@ -426,7 +425,6 @@ js_Invoke(JSContext *cx, uintN argc, jsval *vp, uintN flags);
|
|||
* See jsfun.h for the latter four and flag renaming macros.
|
||||
*/
|
||||
#define JSINVOKE_CONSTRUCT JSFRAME_CONSTRUCTING
|
||||
#define JSINVOKE_INTERNAL JSFRAME_INTERNAL
|
||||
#define JSINVOKE_ITERATOR JSFRAME_ITERATOR
|
||||
|
||||
/*
|
||||
|
|
|
@ -1462,7 +1462,7 @@ find_replen(JSContext *cx, ReplaceData *rdata, size_t *sizep)
|
|||
*sp++ = INT_TO_JSVAL((jsint)cx->regExpStatics.leftContext.length);
|
||||
*sp++ = STRING_TO_JSVAL(rdata->base.str);
|
||||
|
||||
ok = js_Invoke(cx, argc, invokevp, JSINVOKE_INTERNAL);
|
||||
ok = js_Invoke(cx, argc, invokevp, 0);
|
||||
if (ok) {
|
||||
/*
|
||||
* NB: we count on the newborn string root to hold any string
|
||||
|
|
|
@ -445,7 +445,7 @@ pre_call_clean_up:
|
|||
|
||||
if(!JSVAL_IS_PRIMITIVE(fval))
|
||||
{
|
||||
success = js_Invoke(cx, argc, stackbase, JSINVOKE_INTERNAL);
|
||||
success = js_Invoke(cx, argc, stackbase, 0);
|
||||
result = stackbase[0];
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1520,7 +1520,7 @@ pre_call_clean_up:
|
|||
{
|
||||
if(!JSVAL_IS_PRIMITIVE(fval))
|
||||
{
|
||||
success = js_Invoke(cx, argc, stackbase, JSINVOKE_INTERNAL);
|
||||
success = js_Invoke(cx, argc, stackbase, 0);
|
||||
result = *stackbase;
|
||||
}
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче