Backed out changeset 17eec5f30889 (bug 1145488) for ggc orange

This commit is contained in:
Wes Kocher 2015-03-20 22:40:05 -07:00
parent c016f4acbe
commit 3988d415c7
4 changed files with 15 additions and 19 deletions

View File

@ -697,13 +697,13 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
scopeChain = fun->environment();
}
} else {
// For global scripts without a polluted global scope the scope
// chain is the script's global (Ion does not compile scripts
// with a polluted global scope). Also note that it's invalid to
// resume into the prologue in this case because the prologue
// expects the scope chain in R1 for eval and global scripts.
// For global, compile-and-go scripts the scope chain is the
// script's global (Ion does not compile non-compile-and-go
// scripts). Also note that it's invalid to resume into the
// prologue in this case because the prologue expects the scope
// chain in R1 for eval and global scripts.
MOZ_ASSERT(!script->isForEval());
MOZ_ASSERT(!script->hasPollutedGlobalScope());
MOZ_ASSERT(script->compileAndGo());
scopeChain = &(script->global());
}
}

View File

@ -2035,12 +2035,11 @@ CheckScript(JSContext *cx, JSScript *script, bool osr)
return false;
}
if (script->hasPollutedGlobalScope() && !script->functionNonDelazifying()) {
// Support functions with a polluted global scope but not other
// scripts. For global scripts, IonBuilder currently uses the global
// object as scope chain, this is not valid when the script has a
// polluted global scope.
TrackAndSpewIonAbort(cx, script, "has polluted global scope");
if (!script->compileAndGo() && !script->functionNonDelazifying()) {
// Support non-CNG functions but not other scripts. For global scripts,
// IonBuilder currently uses the global object as scope chain, this is
// not valid for non-CNG code.
TrackAndSpewIonAbort(cx, script, "not compile-and-go");
return false;
}

View File

@ -1200,10 +1200,8 @@ IonBuilder::initScopeChain(MDefinition *callee)
return false;
}
} else {
// For global scripts without a polluted global scope, the scope chain
// is the global object.
MOZ_ASSERT(!script()->isForEval());
MOZ_ASSERT(!script()->hasPollutedGlobalScope());
// For CNG global scripts, the scope chain is the global object.
MOZ_ASSERT(script()->compileAndGo());
scope = constant(ObjectValue(script()->global()));
}

View File

@ -2494,10 +2494,9 @@ InlineFrameIterator::computeScopeChain(Value scopeChainValue, MaybeReadFallback
if (isFunctionFrame())
return callee(fallback)->environment();
// Ion does not handle non-function scripts that have anything other than
// the global on their scope chain.
// Ion does not handle scripts that are not compile-and-go.
MOZ_ASSERT(!script()->isForEval());
MOZ_ASSERT(!script()->hasPollutedGlobalScope());
MOZ_ASSERT(script()->compileAndGo());
return &script()->global();
}