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()
34643464 this ->m_opcode == Js::OpCode::ArgOut_A_InlineBuiltIn);
34653465 Assert (this ->m_dst ->GetStackSym ()->m_isArgCaptured );
34663466 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+ }
34673472 Assert (instr->m_opcode == Js::OpCode::BytecodeArgOutCapture);
34683473 return instr;
34693474}
Original file line number Diff line number Diff line change @@ -72,3 +72,12 @@ test2();
7272test2 ( ) ;
7373test2 ( ) ;
7474WScript . 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