diff --git a/lib/Backend/GlobOpt.cpp b/lib/Backend/GlobOpt.cpp index e82439fb50b..3f636e9cf7e 100644 --- a/lib/Backend/GlobOpt.cpp +++ b/lib/Backend/GlobOpt.cpp @@ -2852,12 +2852,6 @@ GlobOpt::OptDst( { this->FinishOptPropOp(instr, opnd->AsPropertySymOpnd()); } - else if (instr->m_opcode == Js::OpCode::StElemI_A || - instr->m_opcode == Js::OpCode::StElemI_A_Strict || - instr->m_opcode == Js::OpCode::InitComputedProperty) - { - this->KillObjectHeaderInlinedTypeSyms(this->currentBlock, false); - } if (opnd->IsIndirOpnd() && !this->IsLoopPrePass()) { diff --git a/lib/Backend/GlobOptFields.cpp b/lib/Backend/GlobOptFields.cpp index 85c7fb35ac7..fade2e3e331 100644 --- a/lib/Backend/GlobOptFields.cpp +++ b/lib/Backend/GlobOptFields.cpp @@ -328,10 +328,20 @@ GlobOpt::ProcessFieldKills(IR::Instr *instr, BVSparse *bv, bo Assert(dstOpnd != nullptr); KillLiveFields(this->lengthEquivBv, bv); KillLiveElems(dstOpnd->AsIndirOpnd(), bv, inGlobOpt, instr->m_func); + if (inGlobOpt) + { + KillObjectHeaderInlinedTypeSyms(this->currentBlock, false); + } break; case Js::OpCode::InitComputedProperty: + case Js::OpCode::InitGetElemI: + case Js::OpCode::InitSetElemI: KillLiveElems(dstOpnd->AsIndirOpnd(), bv, inGlobOpt, instr->m_func); + if (inGlobOpt) + { + KillObjectHeaderInlinedTypeSyms(this->currentBlock, false); + } break; case Js::OpCode::DeleteElemI_A: @@ -394,6 +404,10 @@ GlobOpt::ProcessFieldKills(IR::Instr *instr, BVSparse *bv, bo case Js::OpCode::InlineArrayPush: case Js::OpCode::InlineArrayPop: KillLiveFields(this->lengthEquivBv, bv); + if (inGlobOpt) + { + KillObjectHeaderInlinedTypeSyms(this->currentBlock, false); + } break; case Js::OpCode::InlineeStart: @@ -410,10 +424,18 @@ GlobOpt::ProcessFieldKills(IR::Instr *instr, BVSparse *bv, bo fnHelper = instr->GetSrc1()->AsHelperCallOpnd()->m_fnHelper; // Kill length field for built-ins that can update it. - if(nullptr != this->lengthEquivBv && (fnHelper == IR::JnHelperMethod::HelperArray_Shift || fnHelper == IR::JnHelperMethod::HelperArray_Splice - || fnHelper == IR::JnHelperMethod::HelperArray_Unshift)) + if(fnHelper == IR::JnHelperMethod::HelperArray_Shift + || fnHelper == IR::JnHelperMethod::HelperArray_Splice + || fnHelper == IR::JnHelperMethod::HelperArray_Unshift) { - KillLiveFields(this->lengthEquivBv, bv); + if (nullptr != this->lengthEquivBv) + { + KillLiveFields(this->lengthEquivBv, bv); + } + if (inGlobOpt) + { + KillObjectHeaderInlinedTypeSyms(this->currentBlock, false); + } } if ((fnHelper == IR::JnHelperMethod::HelperRegExp_Exec)