File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -3464,6 +3464,11 @@ IR::Instr* Instr::GetBytecodeArgOutCapture()
3464
3464
this ->m_opcode == Js::OpCode::ArgOut_A_InlineBuiltIn);
3465
3465
Assert (this ->m_dst ->GetStackSym ()->m_isArgCaptured );
3466
3466
IR::Instr* instr = this ->GetSrc1 ()->GetStackSym ()->m_instrDef ;
3467
+ while (instr->m_opcode != Js::OpCode::BytecodeArgOutCapture)
3468
+ {
3469
+ Assert (instr->GetSrc1 () && instr->GetSrc1 ()->GetStackSym () && instr->GetSrc1 ()->GetStackSym ()->IsSingleDef ());
3470
+ instr = instr->GetSrc1 ()->GetStackSym ()->m_instrDef ;
3471
+ }
3467
3472
Assert (instr->m_opcode == Js::OpCode::BytecodeArgOutCapture);
3468
3473
return instr;
3469
3474
}
Original file line number Diff line number Diff line change @@ -72,3 +72,12 @@ test2();
72
72
test2 ( ) ;
73
73
test2 ( ) ;
74
74
WScript . Echo ( "PASSED\n" ) ;
75
+
76
+ function test3 ( a , b )
77
+ {
78
+ return String . prototype . replace . call ( a , b , "a" )
79
+ }
80
+ test3 ( "foobar" , / f o o / i)
81
+ test3 ( "foobar" , / f o o / i)
82
+ test3 ( "foobar" , / f o o / i)
83
+ print ( "passed" )
You can’t perform that action at this time.
0 commit comments