Skip to content

Commit 17f8741

Browse files
committed
make inline SAL annotation more precise
1 parent c580ce0 commit 17f8741

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/Backend/Inline.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,7 +2575,6 @@ IR::Instr * Inline::InlineApplyBuiltInTargetWithArray(IR::Instr * callInstr, con
25752575
{
25762576
return callInstr;
25772577
}
2578-
AnalysisAssert(applyTargetLdInstr != nullptr);
25792578
// Fixed function/function object checks for target built-in
25802579
callInstr->ReplaceSrc1(applyTargetLdInstr->GetDst());
25812580
EmitFixedMethodOrFunctionObjectChecksForBuiltIns(callInstr, callInstr, builtInInfo, false /*isPolymorphic*/, true /*isBuiltIn*/, false /*isCtor*/, true /*isInlined*/);
@@ -2718,7 +2717,8 @@ void Inline::GetArgInstrsForCallAndApply(IR::Instr* callInstr, IR::Instr** impli
27182717
linkOpnd->AsRegOpnd()->m_sym->m_isInlinedArgSlot = true;
27192718
}
27202719

2721-
bool Inline::TryGetApplyAndTargetLdInstrs(IR::Instr * callInstr, _Outptr_result_maybenull_ IR::Instr ** applyLdInstr, _Outptr_result_maybenull_ IR::Instr ** applyTargetLdInstr)
2720+
_Success_(return != false)
2721+
bool Inline::TryGetApplyAndTargetLdInstrs(IR::Instr * callInstr, _Outptr_result_nullonfailure_ IR::Instr ** applyLdInstr, _Outptr_result_nullonfailure_ IR::Instr ** applyTargetLdInstr)
27222722
{
27232723
IR::Opnd* applyOpnd = callInstr->GetSrc1();
27242724
Assert(applyOpnd->IsRegOpnd());
@@ -2761,7 +2761,6 @@ bool Inline::InlineApplyScriptTarget(IR::Instr *callInstr, const FunctionJITTime
27612761
{
27622762
return false;
27632763
}
2764-
AnalysisAssert(applyTargetLdInstr != nullptr);
27652764

27662765
if(applyTargetLdInstr->m_opcode != Js::OpCode::LdFldForCallApplyTarget ||
27672766
((applyTargetLdInstr->AsProfiledInstr()->u.FldInfo().flags & Js::FldInfo_FromAccessor) != 0))

lib/Backend/Inline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Inline
5353
bool InlineApplyScriptTarget(IR::Instr *callInstr, const FunctionJITTimeInfo* inlinerData, const FunctionJITTimeInfo** pInlineeData, const FunctionJITTimeInfo * applyFuncInfo,
5454
const StackSym *symThis, IR::Instr ** returnInstr, uint recursiveInlineDepth, bool isArrayOpndArgumentsObject, uint argsCount);
5555
void GetArgInstrsForCallAndApply(IR::Instr* callInstr, IR::Instr** implicitThisArgOut, IR::Instr** explicitThisArgOut, IR::Instr** argumentsOrArrayArgOut, uint &argOutCount);
56-
bool TryGetApplyAndTargetLdInstrs(IR::Instr * callInstr, _Outptr_result_maybenull_ IR::Instr ** applyLdInstr, _Outptr_result_maybenull_ IR::Instr ** applyTargetLdInstr);
56+
_Success_(return != false) bool TryGetApplyAndTargetLdInstrs(IR::Instr * callInstr, _Outptr_result_nullonfailure_ IR::Instr ** applyLdInstr, _Outptr_result_nullonfailure_ IR::Instr ** applyTargetLdInstr);
5757
IR::Instr * InlineCall(IR::Instr *callInstr, const FunctionJITTimeInfo * inlineeData, const FunctionJITTimeInfo * inlinerData, const StackSym *symThis, bool* pIsInlined, uint callSiteId, uint recursiveInlineDepth);
5858
bool InlineCallTarget(IR::Instr *callInstr, const FunctionJITTimeInfo* inlinerData, const FunctionJITTimeInfo** pInlineeData, const FunctionJITTimeInfo *callFuncInfo,
5959
const StackSym *symThis, IR::Instr ** returnInstr, uint recursiveInlineDepth);

0 commit comments

Comments
 (0)