Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit e69300f

Browse files
author
Sergey Andreenko
authored
if getter is under #ifdef, then the setter should be either. (#15581)
Signed-off-by: Sergey Andreenko <seandree@microsoft.com>
1 parent 5476baf commit e69300f

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

src/jit/compiler.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,33 +1412,32 @@ class fgArgInfo
14121412
}
14131413
#endif // FEATURE_FIXED_OUT_ARGS
14141414

1415+
#if defined(UNIX_X86_ABI)
14151416
void ComputeStackAlignment(unsigned curStackLevelInBytes)
14161417
{
1417-
#if defined(UNIX_X86_ABI)
14181418
padStkAlign = AlignmentPad(curStackLevelInBytes, STACK_ALIGN);
1419-
#endif // defined(UNIX_X86_ABI)
14201419
}
14211420

1422-
void SetStkSizeBytes(unsigned newStkSizeBytes)
1421+
unsigned GetStkAlign()
14231422
{
1424-
#if defined(UNIX_X86_ABI)
1425-
stkSizeBytes = newStkSizeBytes;
1426-
#endif // defined(UNIX_X86_ABI)
1423+
return padStkAlign;
14271424
}
14281425

1429-
#if defined(UNIX_X86_ABI)
1430-
unsigned GetStkAlign()
1426+
void SetStkSizeBytes(unsigned newStkSizeBytes)
14311427
{
1432-
return padStkAlign;
1428+
stkSizeBytes = newStkSizeBytes;
14331429
}
1430+
14341431
unsigned GetStkSizeBytes() const
14351432
{
14361433
return stkSizeBytes;
14371434
}
1435+
14381436
bool IsStkAlignmentDone() const
14391437
{
14401438
return alignmentDone;
14411439
}
1440+
14421441
void SetStkAlignmentDone()
14431442
{
14441443
alignmentDone = true;

src/jit/morph.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4498,7 +4498,9 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* call)
44984498
}
44994499

45004500
assert(fgPtrArgCntCur >= genPtrArgCntSav);
4501+
#if defined(UNIX_X86_ABI)
45014502
call->fgArgInfo->SetStkSizeBytes((fgPtrArgCntCur - genPtrArgCntSav) * TARGET_POINTER_SIZE);
4503+
#endif // UNIX_X86_ABI
45024504

45034505
/* The call will pop all the arguments we pushed */
45044506

@@ -5889,31 +5891,31 @@ BasicBlock* Compiler::fgSetRngChkTargetInner(SpecialCodeKind kind, bool delay, u
58895891
{
58905892
delay = false;
58915893

5892-
#ifdef _TARGET_X86_
5894+
#if !FEATURE_FIXED_OUT_ARGS
58935895
// we need to initialize this field
58945896
if (fgGlobalMorph && (stkDepth != nullptr))
58955897
{
58965898
*stkDepth = fgPtrArgCntCur;
58975899
}
5898-
#endif // _TARGET_X86_
5900+
#endif // !FEATURE_FIXED_OUT_ARGS
58995901
}
59005902

59015903
if (!opts.compDbgCode)
59025904
{
59035905
if (delay || compIsForInlining())
59045906
{
5905-
#ifdef _TARGET_X86_
5907+
#if !FEATURE_FIXED_OUT_ARGS
59065908
// We delay this until after loop-oriented range check analysis. For now we merely store the current stack
59075909
// level in the tree node.
59085910
if (stkDepth != nullptr)
59095911
{
59105912
*stkDepth = fgPtrArgCntCur;
59115913
}
5912-
#endif // _TARGET_X86_
5914+
#endif // !FEATURE_FIXED_OUT_ARGS
59135915
}
59145916
else
59155917
{
5916-
#ifdef _TARGET_X86_
5918+
#if !FEATURE_FIXED_OUT_ARGS
59175919
// fgPtrArgCntCur is only valid for global morph or if we walk full stmt.
59185920
noway_assert(fgGlobalMorph || (stkDepth != nullptr));
59195921
const unsigned theStkDepth = fgGlobalMorph ? fgPtrArgCntCur : *stkDepth;

0 commit comments

Comments
 (0)