mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-31 22:29:56 +00:00
Bug 1299519.
This commit is contained in:
@@ -7096,8 +7096,10 @@ Parser<ParseHandler>::generatorComprehensionLambda(GeneratorKind comprehensionKi
|
||||
* kid and could be removed from pc->sc.
|
||||
*/
|
||||
genFunbox->anyCxFlags = outerpc->sc->anyCxFlags;
|
||||
if (outerpc->sc->isFunctionBox())
|
||||
genFunbox->funCxFlags = outerpc->sc->asFunctionBox()->funCxFlags;
|
||||
if (outerpc->sc->isFunctionBox()) {
|
||||
genFunbox->funCxFlags =
|
||||
outerpc->sc->asFunctionBox()->flagsForNestedGeneratorComprehensionLambda();
|
||||
}
|
||||
|
||||
MOZ_ASSERT(genFunbox->generatorKind() == comprehensionKind);
|
||||
genFunbox->inGenexpLambda = true;
|
||||
|
||||
@@ -126,6 +126,16 @@ class FunctionContextFlags
|
||||
//
|
||||
bool definitelyNeedsArgsObj:1;
|
||||
|
||||
FunctionContextFlags flagsForNestedGeneratorComprehensionLambda() const {
|
||||
FunctionContextFlags flags;
|
||||
flags.mightAliasLocals = mightAliasLocals;
|
||||
flags.hasExtensibleScope = false;
|
||||
flags.needsDeclEnvObject = false;
|
||||
flags.argumentsHasLocalBinding = false;
|
||||
flags.definitelyNeedsArgsObj = false;
|
||||
return flags;
|
||||
}
|
||||
|
||||
public:
|
||||
FunctionContextFlags()
|
||||
: mightAliasLocals(false),
|
||||
@@ -299,6 +309,10 @@ class FunctionBox : public ObjectBox, public SharedContext
|
||||
void setDefinitelyNeedsArgsObj() { MOZ_ASSERT(funCxFlags.argumentsHasLocalBinding);
|
||||
funCxFlags.definitelyNeedsArgsObj = true; }
|
||||
|
||||
FunctionContextFlags flagsForNestedGeneratorComprehensionLambda() const {
|
||||
return funCxFlags.flagsForNestedGeneratorComprehensionLambda();
|
||||
}
|
||||
|
||||
bool hasDefaults() const {
|
||||
return length != function()->nargs() - function()->hasRest();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user