@@ -14877,7 +14877,7 @@ IR::RegOpnd *Lowerer::GenerateArrayTest(
14877
14877
14878
14878
///----------------------------------------------------------------------------
14879
14879
///
14880
- /// Instr ::HoistIndirOffset
14880
+ /// Lowerer ::HoistIndirOffset
14881
14881
///
14882
14882
/// Replace the offset of the given indir with a new symbol, which becomes the indir index.
14883
14883
/// Assign the new symbol by creating an assignment from the constant offset.
@@ -14927,7 +14927,10 @@ IR::Instr *Lowerer::HoistIndirOffsetAsAdd(IR::Instr* instr, IR::IndirOpnd *orgOp
14927
14927
IR::RegOpnd *newBaseOpnd = IR::RegOpnd::New(StackSym::New(TyMachPtr, instr->m_func), regNum, TyMachPtr, instr->m_func);
14928
14928
14929
14929
IR::IntConstOpnd *src2 = IR::IntConstOpnd::New(offset, TyInt32, instr->m_func);
14930
- IR::Instr * instrAdd = Lowerer::InsertAdd(false, newBaseOpnd, baseOpnd, src2, instr);
14930
+
14931
+ IR::Instr * instrAdd = IR::Instr::New(Js::OpCode::Add_A, newBaseOpnd, baseOpnd, src2, instr->m_func);
14932
+ LowererMD::ChangeToAdd(instrAdd, false);
14933
+ instr->InsertBefore(instrAdd);
14931
14934
14932
14935
orgOpnd->ReplaceBaseOpnd(newBaseOpnd);
14933
14936
orgOpnd->SetOffset(0);
@@ -14939,7 +14942,9 @@ IR::Instr *Lowerer::HoistIndirIndexOpndAsAdd(IR::Instr* instr, IR::IndirOpnd *or
14939
14942
{
14940
14943
IR::RegOpnd *newBaseOpnd = IR::RegOpnd::New(StackSym::New(TyMachPtr, instr->m_func), regNum, TyMachPtr, instr->m_func);
14941
14944
14942
- IR::Instr * instrAdd = Lowerer::InsertAdd(false, newBaseOpnd, baseOpnd, indexOpnd->UseWithNewType(TyMachPtr, instr->m_func), instr);
14945
+ IR::Instr * instrAdd = IR::Instr::New(Js::OpCode::Add_A, newBaseOpnd, baseOpnd, indexOpnd->UseWithNewType(TyMachPtr, instr->m_func), instr->m_func);
14946
+ LowererMD::ChangeToAdd(instrAdd, false);
14947
+ instr->InsertBefore(instrAdd);
14943
14948
14944
14949
orgOpnd->ReplaceBaseOpnd(newBaseOpnd);
14945
14950
orgOpnd->SetIndexOpnd(nullptr);
@@ -14949,7 +14954,7 @@ IR::Instr *Lowerer::HoistIndirIndexOpndAsAdd(IR::Instr* instr, IR::IndirOpnd *or
14949
14954
14950
14955
///----------------------------------------------------------------------------
14951
14956
///
14952
- /// Instr ::HoistSymOffset
14957
+ /// Lowerer ::HoistSymOffset
14953
14958
///
14954
14959
/// Replace the given sym with an indir using the given base and offset.
14955
14960
/// (This is used, for instance, to hoist a sym offset that is too large to encode.)
0 commit comments