Skip to content

Commit c04787f

Browse files
pleathakroshg
authored andcommitted
1 parent 69a259c commit c04787f

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

lib/Backend/GlobOpt.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2852,12 +2852,6 @@ GlobOpt::OptDst(
28522852
{
28532853
this->FinishOptPropOp(instr, opnd->AsPropertySymOpnd());
28542854
}
2855-
else if (instr->m_opcode == Js::OpCode::StElemI_A ||
2856-
instr->m_opcode == Js::OpCode::StElemI_A_Strict ||
2857-
instr->m_opcode == Js::OpCode::InitComputedProperty)
2858-
{
2859-
this->KillObjectHeaderInlinedTypeSyms(this->currentBlock, false);
2860-
}
28612855

28622856
if (opnd->IsIndirOpnd() && !this->IsLoopPrePass())
28632857
{

lib/Backend/GlobOptFields.cpp

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,20 @@ GlobOpt::ProcessFieldKills(IR::Instr *instr, BVSparse<JitArenaAllocator> *bv, bo
328328
Assert(dstOpnd != nullptr);
329329
KillLiveFields(this->lengthEquivBv, bv);
330330
KillLiveElems(dstOpnd->AsIndirOpnd(), bv, inGlobOpt, instr->m_func);
331+
if (inGlobOpt)
332+
{
333+
KillObjectHeaderInlinedTypeSyms(this->currentBlock, false);
334+
}
331335
break;
332336

333337
case Js::OpCode::InitComputedProperty:
338+
case Js::OpCode::InitGetElemI:
339+
case Js::OpCode::InitSetElemI:
334340
KillLiveElems(dstOpnd->AsIndirOpnd(), bv, inGlobOpt, instr->m_func);
341+
if (inGlobOpt)
342+
{
343+
KillObjectHeaderInlinedTypeSyms(this->currentBlock, false);
344+
}
335345
break;
336346

337347
case Js::OpCode::DeleteElemI_A:
@@ -394,6 +404,10 @@ GlobOpt::ProcessFieldKills(IR::Instr *instr, BVSparse<JitArenaAllocator> *bv, bo
394404
case Js::OpCode::InlineArrayPush:
395405
case Js::OpCode::InlineArrayPop:
396406
KillLiveFields(this->lengthEquivBv, bv);
407+
if (inGlobOpt)
408+
{
409+
KillObjectHeaderInlinedTypeSyms(this->currentBlock, false);
410+
}
397411
break;
398412

399413
case Js::OpCode::InlineeStart:
@@ -410,10 +424,18 @@ GlobOpt::ProcessFieldKills(IR::Instr *instr, BVSparse<JitArenaAllocator> *bv, bo
410424
fnHelper = instr->GetSrc1()->AsHelperCallOpnd()->m_fnHelper;
411425

412426
// Kill length field for built-ins that can update it.
413-
if(nullptr != this->lengthEquivBv && (fnHelper == IR::JnHelperMethod::HelperArray_Shift || fnHelper == IR::JnHelperMethod::HelperArray_Splice
414-
|| fnHelper == IR::JnHelperMethod::HelperArray_Unshift))
427+
if(fnHelper == IR::JnHelperMethod::HelperArray_Shift
428+
|| fnHelper == IR::JnHelperMethod::HelperArray_Splice
429+
|| fnHelper == IR::JnHelperMethod::HelperArray_Unshift)
415430
{
416-
KillLiveFields(this->lengthEquivBv, bv);
431+
if (nullptr != this->lengthEquivBv)
432+
{
433+
KillLiveFields(this->lengthEquivBv, bv);
434+
}
435+
if (inGlobOpt)
436+
{
437+
KillObjectHeaderInlinedTypeSyms(this->currentBlock, false);
438+
}
417439
}
418440

419441
if ((fnHelper == IR::JnHelperMethod::HelperRegExp_Exec)

0 commit comments

Comments
 (0)