Skip to content

Commit aabee01

Browse files
author
Meghana Gupta
committed
[MERGE #5783 @meg-gupta] StrictEquals fastpath
Merge pull request #5783 from meg-gupta:sefastpath - Handle Neq case in TryGenerateFastCmSrXx - While generating fastpath IsConstRegOpnd was checking IsSingleDef, change it to value type check to check for undefined/null/boolean - Fast path for when one of the sources has a definite value type - Changed helper path to include fast paths for objects which are not GlobalObject, HostDispatch or External
2 parents aa5d7d3 + 1170fa3 commit aabee01

File tree

12 files changed

+431
-137
lines changed

12 files changed

+431
-137
lines changed

lib/Backend/GlobOpt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6512,7 +6512,7 @@ GlobOpt::GetConstantVar(IR::Opnd *opnd, Value *val)
65126512
else if (valueInfo->IsFloat())
65136513
{
65146514
IR::Instr * defInstr = opnd->AsRegOpnd()->m_sym->GetInstrDef();
6515-
if (defInstr->m_opcode == Js::OpCode::LdC_F8_R8 && defInstr->GetSrc1()->IsFloatConstOpnd())
6515+
if ((defInstr->m_opcode == Js::OpCode::LdC_F8_R8 || defInstr->m_opcode == Js::OpCode::LdC_A_R8) && defInstr->GetSrc1()->IsFloatConstOpnd())
65166516
{
65176517
return Js::JavascriptNumber::ToVar(defInstr->GetSrc1()->AsFloatConstOpnd()->m_value);
65186518
}

lib/Backend/IR.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2842,7 +2842,7 @@ Instr::IsByteCodeUsesInstrFor(IR::Instr * instr) const
28422842
IR::LabelInstr *
28432843
Instr::GetOrCreateContinueLabel(const bool isHelper)
28442844
{
2845-
if(m_next && m_next->IsLabelInstr() && m_next->AsLabelInstr()->isOpHelper == isHelper)
2845+
if (m_next && m_next->IsLabelInstr() && m_next->AsLabelInstr()->isOpHelper == isHelper)
28462846
{
28472847
return m_next->AsLabelInstr();
28482848
}

0 commit comments

Comments
 (0)