mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 761914 (part 1) - Remove UpvarCookie::UPVAR_LEVEL_LIMIT. r=jorendorff.
--HG-- extra : rebase_source : b5568305dbba62e8ee7ac65bd7104f66bc25c8b3
This commit is contained in:
parent
e2bcd0de61
commit
1d5b607ead
@ -34,7 +34,6 @@ class UpvarCookie
|
||||
|
||||
void checkInvariants() {
|
||||
JS_STATIC_ASSERT(sizeof(UpvarCookie) == sizeof(uint32_t));
|
||||
JS_STATIC_ASSERT(UPVAR_LEVEL_LIMIT < FREE_LEVEL);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -44,11 +43,6 @@ class UpvarCookie
|
||||
*/
|
||||
static const uint16_t FREE_LEVEL = 0x3fff;
|
||||
|
||||
/*
|
||||
* If a function has a higher static level than this limit, we will not
|
||||
* optimize it using UPVAR opcodes.
|
||||
*/
|
||||
static const uint16_t UPVAR_LEVEL_LIMIT = 16;
|
||||
static const uint16_t CALLEE_SLOT = 0xffff;
|
||||
static bool isLevelReserved(uint16_t level) { return level >= FREE_LEVEL; }
|
||||
|
||||
|
@ -3360,9 +3360,8 @@ js::EvaluateInEnv(JSContext *cx, Handle<Env*> env, StackFrame *fp, const jschar
|
||||
|
||||
/*
|
||||
* NB: This function breaks the assumption that the compiler can see all
|
||||
* calls and properly compute a static level. In order to get around this,
|
||||
* we use a static level that will cause us not to attempt to optimize
|
||||
* variable references made by this frame.
|
||||
* calls and properly compute a static level. In practice, any non-zero
|
||||
* static level will suffice.
|
||||
*/
|
||||
JSPrincipals *prin = fp->scopeChain()->principals(cx);
|
||||
bool compileAndGo = true;
|
||||
@ -3371,8 +3370,7 @@ js::EvaluateInEnv(JSContext *cx, Handle<Env*> env, StackFrame *fp, const jschar
|
||||
JSScript *script = frontend::CompileScript(cx, env, fp, prin, prin,
|
||||
compileAndGo, noScriptRval, needScriptGlobal,
|
||||
chars, length, filename, lineno,
|
||||
cx->findVersion(), NULL,
|
||||
UpvarCookie::UPVAR_LEVEL_LIMIT);
|
||||
cx->findVersion(), NULL, /* staticLimit = */ 1);
|
||||
if (!script)
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user