File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -7865,7 +7865,8 @@ BackwardPass::DeadStoreInstr(IR::Instr *instr)
7865
7865
7866
7866
if (instr->m_opcode == Js::OpCode::ArgIn_A)
7867
7867
{
7868
- // Ignore tracking ArgIn for "this", as argInsCount only tracks other params - unless it is a asmjs function(which doesn't have a "this").
7868
+ // Ignore tracking ArgIn for "this" as argInsCount only tracks other
7869
+ // params, unless it is a AsmJS function (which doesn't have a "this").
7869
7870
if (instr->GetSrc1 ()->AsSymOpnd ()->m_sym ->AsStackSym ()->GetParamSlotNum () != 1 || func->GetJITFunctionBody ()->IsAsmJsMode ())
7870
7871
{
7871
7872
Assert (this ->func ->argInsCount > 0 );
Original file line number Diff line number Diff line change @@ -165,7 +165,13 @@ void
165
165
GlobOpt::Optimize()
166
166
{
167
167
this->objectTypeSyms = nullptr;
168
- this->func->argInsCount = this->func->GetInParamsCount() - 1; //Don't include "this" pointer in the count.
168
+
169
+ this->func->argInsCount = this->func->GetInParamsCount();
170
+ if (!func->GetJITFunctionBody()->IsAsmJsMode())
171
+ {
172
+ // Don't include "this" pointer in the count when not in AsmJs mode (AsmJS does not have "this").
173
+ this->func->argInsCount--;
174
+ }
169
175
170
176
if (!func->DoGlobOpt())
171
177
{
You can’t perform that action at this time.
0 commit comments