File tree Expand file tree Collapse file tree 3 files changed +38
-2
lines changed Expand file tree Collapse file tree 3 files changed +38
-2
lines changed Original file line number Diff line number Diff line change @@ -4854,13 +4854,15 @@ BasicBlock::CheckLegalityAndFoldPathDepBranches(GlobOpt* globOpt)
4854
4854
if (branchTarget != this ->GetLastInstr ()->GetNextRealInstrOrLabel ())
4855
4855
{
4856
4856
IR::Instr* lastInstr = this ->GetLastInstr ();
4857
+ // We add an empty ByteCodeUses with correct bytecodeoffset, for correct info on a post-op bailout of the previous instr
4858
+ IR::Instr* emptyByteCodeUse = IR::ByteCodeUsesInstr::New (lastInstr->m_func , lastInstr->GetByteCodeOffset ());
4859
+ lastInstr->InsertAfter (emptyByteCodeUse);
4857
4860
IR::BranchInstr * newBranch = IR::BranchInstr::New (Js::OpCode::Br, branchTarget, branchTarget->m_func );
4858
- newBranch->SetByteCodeOffset (lastInstr);
4859
4861
if (lastInstr->IsBranchInstr ())
4860
4862
{
4861
4863
globOpt->ConvertToByteCodeUses (lastInstr);
4862
4864
}
4863
- this -> GetLastInstr () ->InsertAfter (newBranch);
4865
+ emptyByteCodeUse ->InsertAfter (newBranch);
4864
4866
globOpt->func ->m_fg ->AddEdge (this , branchTarget->GetBasicBlock ());
4865
4867
this ->IncrementDataUseCount ();
4866
4868
}
Original file line number Diff line number Diff line change
1
+ //-------------------------------------------------------------------------------------------------------
2
+ // Copyright (C) Microsoft. All rights reserved.
3
+ // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4
+ //-------------------------------------------------------------------------------------------------------
5
+ function test0 ( ) {
6
+ var arrObj0 = { } ;
7
+ var func0 = function ( ) {
8
+ for ( ; arrObj0 . prop1 ; ) {
9
+ __loopSecondaryVar4_0 = 2 ;
10
+ break ;
11
+ }
12
+ return 1 ;
13
+ } ;
14
+ var func2 = function ( ) {
15
+ var __loopvar4 = 8 ;
16
+ for ( ; ; ) {
17
+ if ( __loopvar4 > 8 ) {
18
+ break ;
19
+ }
20
+ __loopvar4 ++ ;
21
+ func0 ( ) >= 0 ? func0 ( ) : 0 ;
22
+ }
23
+ } ;
24
+ return func2 ( func2 ( ) ) ;
25
+ }
26
+ test0 ( ) ;
27
+ test0 ( ) ;
28
+ print ( "Passed\n" ) ;
Original file line number Diff line number Diff line change 1562
1562
<compile-flags >-maxinterpretcount:1 -maxsimplejitruncount:1 -loopinterpretcount:1 -oopjit- -bgjit-</compile-flags >
1563
1563
</default >
1564
1564
</test >
1565
+ <test >
1566
+ <default >
1567
+ <files >pathdepbug.js</files >
1568
+ <compile-flags >-maxinterpretcount:1 -maxsimplejitruncount:1 -off:aggressiveinttypespec</compile-flags >
1569
+ </default >
1570
+ </test >
1565
1571
</regress-exe >
You can’t perform that action at this time.
0 commit comments