@@ -4524,9 +4524,7 @@ static bool IsCopyTypeInstr(IR::Instr *instr)
4524
4524
case Js::OpCode::LdC_A_I4:
4525
4525
case Js::OpCode::Ld_I4:
4526
4526
case Js::OpCode::Ld_A:
4527
- case Js::OpCode::StFld:
4528
- case Js::OpCode::LdFld:
4529
- case Js::OpCode::InitFld: return true ;
4527
+ case Js::OpCode::LdFld: return true ;
4530
4528
default :
4531
4529
return false ;
4532
4530
}
@@ -4686,30 +4684,6 @@ BasicBlock::CheckLegalityAndFoldPathDepBranches(GlobOpt* globOpt)
4686
4684
{
4687
4685
unskippedInlineeEnd = currentInlineeEnd = instr;
4688
4686
}
4689
- else if (instr->GetDst ())
4690
- {
4691
- if (instr->GetDst ()->GetSym ())
4692
- {
4693
- if (IsCopyTypeInstr (instr))
4694
- {
4695
- UpdateValueForCopyTypeInstr (instr);
4696
- }
4697
- else if (instr->m_opcode == Js::OpCode::NewScObjectLiteral)
4698
- {
4699
- Value **localValue = localSymToValueMap->FindOrInsertNew (instr->GetDst ()->GetSym ());
4700
- if (instr->GetDst ()->GetValueType () == ValueType::UninitializedObject)
4701
- {
4702
- *localValue = globOpt->NewGenericValue (ValueType::UninitializedObject, instr->GetDst ());
4703
- }
4704
- }
4705
- else
4706
- {
4707
- // complex instr, can't track value, insert nullptr
4708
- Value **localValue = localSymToValueMap->FindOrInsertNew (instr->GetDst ()->GetSym ());
4709
- *localValue = nullptr ;
4710
- }
4711
- }
4712
- }
4713
4687
} NEXT_INSTR_IN_BLOCK;
4714
4688
4715
4689
IR::Instr * instr = this ->GetLastInstr ();
@@ -4750,6 +4724,13 @@ BasicBlock::CheckLegalityAndFoldPathDepBranches(GlobOpt* globOpt)
4750
4724
if (IsCopyTypeInstr (instr))
4751
4725
{
4752
4726
UpdateValueForCopyTypeInstr (instr);
4727
+
4728
+ Value *dstValue = UpdateValueForCopyTypeInstr (instr);
4729
+ if (instr->m_opcode == Js::OpCode::LdFld && !dstValue)
4730
+ {
4731
+ // We cannot skip a LdFld if we didnt find its valueInfo in the localValueTable
4732
+ return ;
4733
+ }
4753
4734
}
4754
4735
else
4755
4736
{
@@ -4850,6 +4831,14 @@ BasicBlock::CheckLegalityAndFoldPathDepBranches(GlobOpt* globOpt)
4850
4831
if (currentInlineeEnd != nullptr && currentInlineeEnd != unskippedInlineeEnd)
4851
4832
{
4852
4833
this ->GetLastInstr ()->InsertBefore (currentInlineeEnd->Copy ());
4834
+ if (currentInlineeEnd->m_func ->m_hasInlineArgsOpt )
4835
+ {
4836
+ globOpt->RecordInlineeFrameInfo (currentInlineeEnd);
4837
+ }
4838
+ globOpt->EndTrackingOfArgObjSymsForInlinee ();
4839
+
4840
+ Assert (globOpt->currentBlock ->globOptData .inlinedArgOutSize >= currentInlineeEnd->GetArgOutSize (/* getInterpreterArgOutCount*/ false ));
4841
+ globOpt->currentBlock ->globOptData .inlinedArgOutSize -= currentInlineeEnd->GetArgOutSize (/* getInterpreterArgOutCount*/ false );
4853
4842
currentInlineeEnd = nullptr ;
4854
4843
}
4855
4844
// We are adding an unconditional branch, go over all the current successors and remove the ones that are dead now
0 commit comments