Bug 1611777 - Part 3: Change emitOptionalCalleeAndThis() parameter to use CallNode. r=yulia

That way we don't need the explicit cast.

Differential Revision: https://phabricator.services.mozilla.com/D61148

--HG--
extra : moz-landing-system : lando
This commit is contained in:
André Bargull 2020-01-29 16:23:29 +00:00
parent d386e1b6f5
commit f06ccdae60
2 changed files with 4 additions and 5 deletions

View File

@ -7185,7 +7185,7 @@ bool BytecodeEmitter::isRestParameter(ParseNode* expr) {
* See emitCallOrNew and emitOptionalCall for more context.
*/
bool BytecodeEmitter::emitOptionalCalleeAndThis(ParseNode* callee,
ParseNode* call,
CallNode* call,
CallOrNewEmitter& cone,
OptionalEmitter& oe) {
if (!CheckRecursionLimit(cx)) {
@ -7267,8 +7267,8 @@ bool BytecodeEmitter::emitOptionalCalleeAndThis(ParseNode* callee,
break;
case ParseNodeKind::OptionalChain: {
return emitCalleeAndThisForOptionalChain(&callee->as<UnaryNode>(),
&call->as<CallNode>(), cone);
return emitCalleeAndThisForOptionalChain(&callee->as<UnaryNode>(), call,
cone);
}
default:

View File

@ -820,8 +820,7 @@ struct MOZ_STACK_CLASS BytecodeEmitter {
MOZ_MUST_USE bool emitCalleeAndThis(ParseNode* callee, ParseNode* call,
CallOrNewEmitter& cone);
MOZ_MUST_USE bool emitOptionalCalleeAndThis(ParseNode* callee,
ParseNode* call,
MOZ_MUST_USE bool emitOptionalCalleeAndThis(ParseNode* callee, CallNode* call,
CallOrNewEmitter& cone,
OptionalEmitter& oe);