Bug 723791 - remove now-unnecessary noteArgumentsPropertyAccess (r=jorendorff)

--HG--
extra : rebase_source : 66c7930d21f380a1ad885550239f20b890d24e78
This commit is contained in:
Luke Wagner 2012-02-03 00:11:31 -08:00
parent b41ddecdd5
commit d97e2cbe45
2 changed files with 0 additions and 30 deletions

View File

@ -434,10 +434,6 @@ struct TreeContext { /* tree context for semantic checks */
return flags & TCF_FUN_MUTATES_PARAMETER;
}
/*
* Accessing the implicit |arguments| local binding in a function must
* trigger appropriate code generation such that the access works.
*/
void noteArgumentsNameUse(ParseNode *node) {
JS_ASSERT(inFunction());
JS_ASSERT(node->isKind(PNK_NAME));
@ -448,23 +444,6 @@ struct TreeContext { /* tree context for semantic checks */
funbox->node->pn_dflags |= PND_FUNARG;
}
/*
* Non-dynamic accesses to a property named "arguments" inside a function
* have to deoptimize the function in case those accesses are to the
* function's arguments. (However, this is unnecessary in strict mode
* functions because of the f.arguments poison-pill. O frabjous day!)
*/
void noteArgumentsPropertyAccess(ParseNode *node) {
JS_ASSERT(inFunction());
JS_ASSERT(&node->asPropertyAccess().name() ==
parser->context->runtime->atomState.argumentsAtom);
if (!inStrictMode()) {
flags |= TCF_FUN_USES_ARGUMENTS;
if (funbox)
funbox->node->pn_dflags |= PND_FUNARG;
}
}
/*
* Uses of |arguments| must be noted so that such uses can be forbidden if
* they occur inside generator expressions (which desugar to functions and

View File

@ -5793,15 +5793,6 @@ Parser::memberExpr(JSBool allowCallSyntax)
tokenStream.currentToken().pos.end);
if (!nextMember)
return NULL;
/*
* A property access of the form |<expr>.arguments| might
* access this function's arguments, so we need to flag a
* potential arguments use to ensure an arguments object
* will be created. See bug 721322.
*/
if (tc->inFunction() && field == context->runtime->atomState.argumentsAtom)
tc->noteArgumentsPropertyAccess(nextMember);
}
}
#if JS_HAS_XML_SUPPORT