@@ -8399,17 +8399,9 @@ LowererMD::GenerateFastInlineBuiltInMathFloor(IR::Instr* instr)
8399
8399
IR::RegOpnd* floatOpnd = IR::RegOpnd::New (TyFloat64, this ->m_func );
8400
8400
this ->m_lowerer ->InsertMove (floatOpnd, src, instr);
8401
8401
8402
- IR::LabelInstr * bailoutLabel;
8402
+ IR::LabelInstr * bailoutLabel = IR::LabelInstr::New (Js::OpCode::Label, this -> m_func , /* helperLabel */ true ); ;
8403
8403
bool sharedBailout = (instr->GetBailOutInfo ()->bailOutInstr != instr) ? true : false ;
8404
- if (sharedBailout)
8405
- {
8406
- bailoutLabel = instr->GetBailOutInfo ()->bailOutInstr ->AsLabelInstr ();
8407
- }
8408
- else
8409
- {
8410
- bailoutLabel = IR::LabelInstr::New (Js::OpCode::Label, this ->m_func , true );
8411
- }
8412
-
8404
+
8413
8405
// NaN check
8414
8406
IR::Instr *instrCmp = IR::Instr::New (Js::OpCode::VCMPF64, this ->m_func );
8415
8407
instrCmp->SetSrc1 (floatOpnd);
@@ -8481,7 +8473,10 @@ LowererMD::GenerateFastInlineBuiltInMathFloor(IR::Instr* instr)
8481
8473
{
8482
8474
instr->InsertBefore (bailoutLabel);
8483
8475
}
8484
- this ->m_lowerer ->GenerateBailOut (instr);
8476
+
8477
+ // In case of a shared bailout, we should jump to the code that sets some data on the bailout record which is specific
8478
+ // to this bailout. Pass the bailoutLabel to GenerateFunction so that it may use the label as the collectRuntimeStatsLabel.
8479
+ this ->m_lowerer ->GenerateBailOut (instr, nullptr , nullptr , sharedBailout ? bailoutLabel : nullptr );
8485
8480
8486
8481
// MOV dst, intOpnd
8487
8482
IR::Instr* movInstr = IR::Instr::New (Js::OpCode::MOV, dst, intOpnd, this ->m_func );
@@ -8502,16 +8497,8 @@ LowererMD::GenerateFastInlineBuiltInMathCeil(IR::Instr* instr)
8502
8497
IR::RegOpnd* floatOpnd = IR::RegOpnd::New (TyFloat64, this ->m_func );
8503
8498
this ->m_lowerer ->InsertMove (floatOpnd, src, instr);
8504
8499
8505
- IR::LabelInstr * bailoutLabel;
8500
+ IR::LabelInstr * bailoutLabel = IR::LabelInstr::New (Js::OpCode::Label, this -> m_func , /* helperLabel */ true ); ;
8506
8501
bool sharedBailout = (instr->GetBailOutInfo ()->bailOutInstr != instr) ? true : false ;
8507
- if (sharedBailout)
8508
- {
8509
- bailoutLabel = instr->GetBailOutInfo ()->bailOutInstr ->AsLabelInstr ();
8510
- }
8511
- else
8512
- {
8513
- bailoutLabel = IR::LabelInstr::New (Js::OpCode::Label, this ->m_func , true );
8514
- }
8515
8502
8516
8503
// NaN check
8517
8504
IR::Instr *instrCmp = IR::Instr::New (Js::OpCode::VCMPF64, this ->m_func );
@@ -8589,7 +8576,10 @@ LowererMD::GenerateFastInlineBuiltInMathCeil(IR::Instr* instr)
8589
8576
{
8590
8577
instr->InsertBefore (bailoutLabel);
8591
8578
}
8592
- this ->m_lowerer ->GenerateBailOut (instr);
8579
+
8580
+ // In case of a shared bailout, we should jump to the code that sets some data on the bailout record which is specific
8581
+ // to this bailout. Pass the bailoutLabel to GenerateFunction so that it may use the label as the collectRuntimeStatsLabel.
8582
+ this ->m_lowerer ->GenerateBailOut (instr, nullptr , nullptr , sharedBailout ? bailoutLabel : nullptr );
8593
8583
8594
8584
// MOV dst, intOpnd
8595
8585
IR::Instr* movInstr = IR::Instr::New (Js::OpCode::MOV, dst, intOpnd, this ->m_func );
@@ -8610,17 +8600,9 @@ LowererMD::GenerateFastInlineBuiltInMathRound(IR::Instr* instr)
8610
8600
IR::RegOpnd* floatOpnd = IR::RegOpnd::New (TyFloat64, this ->m_func );
8611
8601
this ->m_lowerer ->InsertMove (floatOpnd, src, instr);
8612
8602
8613
- IR::LabelInstr * bailoutLabel;
8603
+ IR::LabelInstr * bailoutLabel = IR::LabelInstr::New (Js::OpCode::Label, this -> m_func , /* helperLabel */ true ); ;
8614
8604
bool sharedBailout = (instr->GetBailOutInfo ()->bailOutInstr != instr) ? true : false ;
8615
- if (sharedBailout)
8616
- {
8617
- bailoutLabel = instr->GetBailOutInfo ()->bailOutInstr ->AsLabelInstr ();
8618
- }
8619
- else
8620
- {
8621
- bailoutLabel = IR::LabelInstr::New (Js::OpCode::Label, this ->m_func , true );
8622
- }
8623
-
8605
+
8624
8606
// NaN check
8625
8607
IR::Instr *instrCmp = IR::Instr::New (Js::OpCode::VCMPF64, this ->m_func );
8626
8608
instrCmp->SetSrc1 (floatOpnd);
@@ -8701,7 +8683,10 @@ LowererMD::GenerateFastInlineBuiltInMathRound(IR::Instr* instr)
8701
8683
{
8702
8684
instr->InsertBefore (bailoutLabel);
8703
8685
}
8704
- this ->m_lowerer ->GenerateBailOut (instr);
8686
+
8687
+ // In case of a shared bailout, we should jump to the code that sets some data on the bailout record which is specific
8688
+ // to this bailout. Pass the bailoutLabel to GenerateFunction so that it may use the label as the collectRuntimeStatsLabel.
8689
+ this ->m_lowerer ->GenerateBailOut (instr, nullptr , nullptr , sharedBailout ? bailoutLabel : nullptr );
8705
8690
8706
8691
// MOV dst, intOpnd
8707
8692
IR::Instr* movInstr = IR::Instr::New (Js::OpCode::MOV, dst, intOpnd, this ->m_func );
0 commit comments