зеркало из https://github.com/mozilla/gecko-dev.git
Remove unused flag TCF_NEED_MUTABLE_SCRIPT as suggested by Waldo in review. Bug 696953 comment 8. rs=Waldo over IRC.
--HG-- extra : rebase_source : 2da200e67b56453a6d15a58e8937c23c8ed8403e
This commit is contained in:
Родитель
9a2cb74eae
Коммит
effb4f91ed
|
@ -167,8 +167,8 @@ frontend::CompileScript(JSContext *cx, JSObject *scopeChain, StackFrame *callerF
|
|||
JSScript *script;
|
||||
bool inDirectivePrologue;
|
||||
|
||||
JS_ASSERT(!(tcflags & ~(TCF_COMPILE_N_GO | TCF_NO_SCRIPT_RVAL | TCF_NEED_MUTABLE_SCRIPT |
|
||||
TCF_COMPILE_FOR_EVAL | TCF_NEED_SCRIPT_GLOBAL)));
|
||||
JS_ASSERT(!(tcflags & ~(TCF_COMPILE_N_GO | TCF_NO_SCRIPT_RVAL | TCF_COMPILE_FOR_EVAL
|
||||
| TCF_NEED_SCRIPT_GLOBAL)));
|
||||
|
||||
/*
|
||||
* The scripted callerFrame can only be given for compile-and-go scripts
|
||||
|
|
|
@ -194,22 +194,14 @@ struct StmtInfo {
|
|||
*/
|
||||
#define TCF_DECL_DESTRUCTURING 0x10000
|
||||
|
||||
/*
|
||||
* A request flag passed to js::frontend::CompileScript and then down via
|
||||
* BytecodeEmitter to JSScript::NewScriptFromEmitter, from script_compile_sub
|
||||
* and any kindred functions that need to make mutable scripts (even empty
|
||||
* ones; i.e., they can't share the const JSScript::emptyScript() singleton).
|
||||
*/
|
||||
#define TCF_NEED_MUTABLE_SCRIPT 0x20000
|
||||
|
||||
/*
|
||||
* This function/global/eval code body contained a Use Strict Directive. Treat
|
||||
* certain strict warnings as errors, and forbid the use of 'with'. See also
|
||||
* TSF_STRICT_MODE_CODE, JSScript::strictModeCode, and JSREPORT_STRICT_ERROR.
|
||||
*/
|
||||
#define TCF_STRICT_MODE_CODE 0x40000
|
||||
#define TCF_STRICT_MODE_CODE 0x20000
|
||||
|
||||
/* bit 0x80000 is unused */
|
||||
/* bits 0x40000 and 0x80000 are unused */
|
||||
|
||||
/*
|
||||
* Flag signifying that the current function seems to be a constructor that
|
||||
|
|
|
@ -4585,7 +4585,7 @@ CompileUCScriptForPrincipalsCommon(JSContext *cx, JSObject *obj, JSPrincipals *p
|
|||
assertSameCompartment(cx, obj, principals);
|
||||
AutoLastFrameCheck lfc(cx);
|
||||
|
||||
uint32 tcflags = JS_OPTIONS_TO_TCFLAGS(cx) | TCF_NEED_MUTABLE_SCRIPT | TCF_NEED_SCRIPT_GLOBAL;
|
||||
uint32 tcflags = JS_OPTIONS_TO_TCFLAGS(cx) | TCF_NEED_SCRIPT_GLOBAL;
|
||||
return frontend::CompileScript(cx, obj, NULL, principals, tcflags, chars, length,
|
||||
filename, lineno, version);
|
||||
}
|
||||
|
@ -4762,7 +4762,7 @@ CompileFileHelper(JSContext *cx, JSObject *obj, JSPrincipals *principals,
|
|||
|
||||
JS_ASSERT(i <= len);
|
||||
len = i;
|
||||
uint32 tcflags = JS_OPTIONS_TO_TCFLAGS(cx) | TCF_NEED_MUTABLE_SCRIPT | TCF_NEED_SCRIPT_GLOBAL;
|
||||
uint32 tcflags = JS_OPTIONS_TO_TCFLAGS(cx) | TCF_NEED_SCRIPT_GLOBAL;
|
||||
script = frontend::CompileScript(cx, obj, NULL, principals, tcflags, buf, len, filename, 1,
|
||||
cx->findVersion());
|
||||
cx->free_(buf);
|
||||
|
|
|
@ -1272,7 +1272,7 @@ EvalKernel(JSContext *cx, const CallArgs &args, EvalType evalType, StackFrame *c
|
|||
evalType == DIRECT_EVAL
|
||||
? CALLED_FROM_JSOP_EVAL
|
||||
: NOT_CALLED_FROM_JSOP_EVAL);
|
||||
uint32 tcflags = TCF_COMPILE_N_GO | TCF_NEED_MUTABLE_SCRIPT | TCF_COMPILE_FOR_EVAL;
|
||||
uint32 tcflags = TCF_COMPILE_N_GO | TCF_COMPILE_FOR_EVAL;
|
||||
JSScript *compiled = frontend::CompileScript(cx, &scopeobj, caller, principals,
|
||||
tcflags, chars, length, filename,
|
||||
lineno, cx->findVersion(), linearStr,
|
||||
|
|
Загрузка…
Ссылка в новой задаче