@@ -1597,6 +1597,11 @@ void LLVMCodeBuilder::createListAppend(List *list, CompilerValue *item)
15971597 if (m_listPtrs.find (list) == m_listPtrs.cend ())
15981598 m_listPtrs[list] = LLVMListPtr ();
15991599
1600+ if (m_loopScope >= 0 ) {
1601+ auto scope = m_loopScopes[m_loopScope];
1602+ m_listPtrs[list].loopListWrites [scope].push_back (m_instructions.back ());
1603+ }
1604+
16001605 m_listInstructions.push_back (m_instructions.back ());
16011606}
16021607
@@ -1609,6 +1614,11 @@ void LLVMCodeBuilder::createListInsert(List *list, CompilerValue *index, Compile
16091614 if (m_listPtrs.find (list) == m_listPtrs.cend ())
16101615 m_listPtrs[list] = LLVMListPtr ();
16111616
1617+ if (m_loopScope >= 0 ) {
1618+ auto scope = m_loopScopes[m_loopScope];
1619+ m_listPtrs[list].loopListWrites [scope].push_back (m_instructions.back ());
1620+ }
1621+
16121622 m_listInstructions.push_back (m_instructions.back ());
16131623}
16141624
@@ -1621,6 +1631,11 @@ void LLVMCodeBuilder::createListReplace(List *list, CompilerValue *index, Compil
16211631 if (m_listPtrs.find (list) == m_listPtrs.cend ())
16221632 m_listPtrs[list] = LLVMListPtr ();
16231633
1634+ if (m_loopScope >= 0 ) {
1635+ auto scope = m_loopScopes[m_loopScope];
1636+ m_listPtrs[list].loopListWrites [scope].push_back (m_instructions.back ());
1637+ }
1638+
16241639 m_listInstructions.push_back (m_instructions.back ());
16251640}
16261641
0 commit comments