mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Bug 1424946
- Move GeneralParser::declareFunctionThis into a baser class. r=arai
This commit is contained in:
parent
8f7b11ac56
commit
811d1f7fd6
@ -2300,9 +2300,9 @@ ParserBase::hasUsedFunctionSpecialName(HandlePropertyName name)
|
||||
return hasUsedName(name) || pc->functionBox()->bindingsAccessedDynamically();
|
||||
}
|
||||
|
||||
template <class ParseHandler, typename CharT>
|
||||
template <class ParseHandler>
|
||||
bool
|
||||
GeneralParser<ParseHandler, CharT>::declareFunctionThis()
|
||||
PerHandlerParser<ParseHandler>::declareFunctionThis()
|
||||
{
|
||||
// The asm.js validator does all its own symbol-table management so, as an
|
||||
// optimization, avoid doing any work here.
|
||||
|
@ -308,6 +308,8 @@ class PerHandlerParser
|
||||
// Required on Scope exit.
|
||||
bool propagateFreeNamesAndMarkClosedOverBindings(ParseContext::Scope& scope);
|
||||
|
||||
bool declareFunctionThis();
|
||||
|
||||
public:
|
||||
bool isValidSimpleAssignmentTarget(Node node,
|
||||
FunctionCallBehavior behavior = ForbidAssignmentToFunctionCalls);
|
||||
@ -388,6 +390,7 @@ class GeneralParser
|
||||
using Base::usedNames;
|
||||
|
||||
private:
|
||||
using Base::declareFunctionThis;
|
||||
using Base::hasUsedName;
|
||||
using Base::noteDestructuredPositionalFormalParameter;
|
||||
using Base::noteUsedName;
|
||||
@ -869,7 +872,6 @@ class GeneralParser
|
||||
bool matchInOrOf(bool* isForInp, bool* isForOfp);
|
||||
|
||||
bool declareFunctionArgumentsObject();
|
||||
bool declareFunctionThis();
|
||||
Node newInternalDotName(HandlePropertyName name);
|
||||
Node newThisName();
|
||||
Node newDotGeneratorName();
|
||||
|
Loading…
Reference in New Issue
Block a user