@@ -8122,6 +8122,7 @@ void EmitCallTarget(
8122
8122
else
8123
8123
{
8124
8124
*thisLocation = pnodeBinTarget->pnode1 ->location ;
8125
+ EmitNullPropagation (pnodeBinTarget->pnode1 ->location , byteCodeGenerator, funcInfo, pnodeBinTarget->isNullPropagating );
8125
8126
EmitMethodFld (pnodeBinTarget, protoLocation, propertyId, byteCodeGenerator, funcInfo);
8126
8127
}
8127
8128
@@ -8130,22 +8131,24 @@ void EmitCallTarget(
8130
8131
8131
8132
case knopIndex:
8132
8133
{
8133
- funcInfo->AcquireLoc (pnodeTarget);
8134
+ ParseNodeBin *pnodeBinTarget = pnodeTarget->AsParseNodeBin ();
8135
+ funcInfo->AcquireLoc (pnodeBinTarget);
8134
8136
// Assign the call target operand(s), putting them into expression temps if necessary to protect
8135
8137
// them from side-effects.
8136
- if (fSideEffectArgs || !(ParseNode::Grfnop (pnodeTarget-> AsParseNodeBin () ->pnode2 ->nop ) & fnopLeaf))
8138
+ if (fSideEffectArgs || !(ParseNode::Grfnop (pnodeBinTarget ->pnode2 ->nop ) & fnopLeaf))
8137
8139
{
8138
8140
// Though we're done with target evaluation after this point, still protect opnd1 from
8139
8141
// arg or opnd2 side-effects as it's the "this" pointer.
8140
- SaveOpndValue (pnodeTarget-> AsParseNodeBin () ->pnode1 , funcInfo);
8142
+ SaveOpndValue (pnodeBinTarget ->pnode1 , funcInfo);
8141
8143
}
8142
- Emit (pnodeTarget->AsParseNodeBin ()->pnode1 , byteCodeGenerator, funcInfo, false );
8143
- Emit (pnodeTarget->AsParseNodeBin ()->pnode2 , byteCodeGenerator, funcInfo, false );
8144
+ Emit (pnodeBinTarget->pnode1 , byteCodeGenerator, funcInfo, false );
8145
+ EmitNullPropagation (pnodeBinTarget->pnode1 ->location , byteCodeGenerator, funcInfo, pnodeBinTarget->isNullPropagating );
8146
+ Emit (pnodeBinTarget->pnode2 , byteCodeGenerator, funcInfo, false );
8144
8147
8145
- Js::RegSlot indexLocation = pnodeTarget-> AsParseNodeBin () ->pnode2 ->location ;
8146
- Js::RegSlot protoLocation = pnodeTarget-> AsParseNodeBin () ->pnode1 ->location ;
8148
+ Js::RegSlot indexLocation = pnodeBinTarget ->pnode2 ->location ;
8149
+ Js::RegSlot protoLocation = pnodeBinTarget ->pnode1 ->location ;
8147
8150
8148
- if (ByteCodeGenerator::IsSuper (pnodeTarget-> AsParseNodeBin () ->pnode1 ))
8151
+ if (ByteCodeGenerator::IsSuper (pnodeBinTarget ->pnode1 ))
8149
8152
{
8150
8153
Emit (pnodeTarget->AsParseNodeSuperReference ()->pnodeThis , byteCodeGenerator, funcInfo, false );
8151
8154
protoLocation = byteCodeGenerator->EmitLdObjProto (Js::OpCode::LdHomeObjProto, protoLocation, funcInfo);
@@ -8157,16 +8160,16 @@ void EmitCallTarget(
8157
8160
}
8158
8161
else
8159
8162
{
8160
- *thisLocation = pnodeTarget-> AsParseNodeBin () ->pnode1 ->location ;
8163
+ *thisLocation = pnodeBinTarget ->pnode1 ->location ;
8161
8164
}
8162
8165
8163
8166
EmitMethodElem (pnodeTarget, protoLocation, indexLocation, byteCodeGenerator);
8164
8167
8165
- funcInfo->ReleaseLoc (pnodeTarget-> AsParseNodeBin () ->pnode2 ); // don't release indexLocation until after we use it.
8168
+ funcInfo->ReleaseLoc (pnodeBinTarget ->pnode2 ); // don't release indexLocation until after we use it.
8166
8169
8167
- if (ByteCodeGenerator::IsSuper (pnodeTarget-> AsParseNodeBin () ->pnode1 ))
8170
+ if (ByteCodeGenerator::IsSuper (pnodeBinTarget ->pnode1 ))
8168
8171
{
8169
- funcInfo->ReleaseLoc (pnodeTarget-> AsParseNodeBin () ->pnode1 );
8172
+ funcInfo->ReleaseLoc (pnodeBinTarget ->pnode1 );
8170
8173
}
8171
8174
break ;
8172
8175
}
0 commit comments