From 0366bc74bd3ffbacc0e7b9dc8709185678c2e3ff Mon Sep 17 00:00:00 2001 From: Sinan Kaya <41809318+franksinankaya@users.noreply.github.com> Date: Wed, 25 Sep 2019 20:31:19 -0400 Subject: [PATCH] Replace lateArgInx with GetLateArgInx (dotnet/coreclr#26887) * find src/jit -type f -exec sed -i -e 's/->lateArgInx/->GetLateArgInx()/g' {} \; * Format patch Commit migrated from https://github.com/dotnet/coreclr/commit/e26d89335f18beac55c9ce1fe201fab958548753 --- src/coreclr/src/jit/compiler.h | 5 ++-- src/coreclr/src/jit/gentree.cpp | 9 ++++--- src/coreclr/src/jit/morph.cpp | 60 ++++++++++++++++++++--------------------- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/coreclr/src/jit/compiler.h b/src/coreclr/src/jit/compiler.h index 4f232aa..b46682e 100644 --- a/src/coreclr/src/jit/compiler.h +++ b/src/coreclr/src/jit/compiler.h @@ -1392,13 +1392,12 @@ public: return isLate; } - __declspec(property(get = getLateArgInx, put = setLateArgInx)) unsigned lateArgInx; - unsigned getLateArgInx() + unsigned GetLateArgInx() { assert(isLateArg()); return _lateArgInx; } - void setLateArgInx(unsigned inx) + void SetLateArgInx(unsigned inx) { _lateArgInx = inx; } diff --git a/src/coreclr/src/jit/gentree.cpp b/src/coreclr/src/jit/gentree.cpp index a5ff292..3302b43 100644 --- a/src/coreclr/src/jit/gentree.cpp +++ b/src/coreclr/src/jit/gentree.cpp @@ -6254,7 +6254,7 @@ fgArgTabEntry* Compiler::gtArgEntryByLateArgIndex(GenTreeCall* call, unsigned la for (unsigned i = 0; i < argCount; i++) { curArgTabEntry = argTable[i]; - if (curArgTabEntry->isLateArg() && curArgTabEntry->lateArgInx == lateArgInx) + if (curArgTabEntry->isLateArg() && curArgTabEntry->GetLateArgInx() == lateArgInx) { return curArgTabEntry; } @@ -11641,13 +11641,14 @@ void Compiler::gtDispLIRNode(GenTree* node, const char* prefixMsg /* = nullptr * for (GenTreeArgList* element = operand->AsArgList(); element != nullptr; element = element->Rest()) { operand = element->Current(); - if (curArgTabEntry->lateArgInx == (unsigned)-1) + if (curArgTabEntry->GetLateArgInx() == (unsigned)-1) { gtGetArgMsg(call, operand, curArgTabEntry->argNum, listIndex, buf, sizeof(buf)); } else { - gtGetLateArgMsg(call, operand, curArgTabEntry->lateArgInx, listIndex, buf, sizeof(buf)); + gtGetLateArgMsg(call, operand, curArgTabEntry->GetLateArgInx(), listIndex, buf, + sizeof(buf)); } displayOperand(operand, buf, operandArc, indentStack, prefixIndent); @@ -11662,7 +11663,7 @@ void Compiler::gtDispLIRNode(GenTree* node, const char* prefixMsg /* = nullptr * } else { - gtGetLateArgMsg(call, operand, curArgTabEntry->lateArgInx, -1, buf, sizeof(buf)); + gtGetLateArgMsg(call, operand, curArgTabEntry->GetLateArgInx(), -1, buf, sizeof(buf)); } displayOperand(operand, buf, operandArc, indentStack, prefixIndent); diff --git a/src/coreclr/src/jit/morph.cpp b/src/coreclr/src/jit/morph.cpp index 259e4dc..f44ac6e 100644 --- a/src/coreclr/src/jit/morph.cpp +++ b/src/coreclr/src/jit/morph.cpp @@ -819,7 +819,7 @@ void fgArgTabEntry::Dump() printf(", align=%u", alignment); if (isLateArg()) { - printf(", lateArgInx=%u", lateArgInx); + printf(", lateArgInx=%u", GetLateArgInx()); } if (isSplit) { @@ -1110,21 +1110,21 @@ fgArgTabEntry* fgArgInfo::AddRegArg(unsigned argNum, // may actually be less. curArgTabEntry->setRegNum(0, regNum); - curArgTabEntry->argNum = argNum; - curArgTabEntry->node = node; - curArgTabEntry->argType = node->TypeGet(); - curArgTabEntry->use = use; - curArgTabEntry->slotNum = 0; - curArgTabEntry->numRegs = numRegs; - curArgTabEntry->numSlots = 0; - curArgTabEntry->alignment = alignment; - curArgTabEntry->lateArgInx = UINT_MAX; - curArgTabEntry->tmpNum = BAD_VAR_NUM; - curArgTabEntry->isSplit = false; - curArgTabEntry->isTmp = false; - curArgTabEntry->needTmp = false; - curArgTabEntry->needPlace = false; - curArgTabEntry->processed = false; + curArgTabEntry->argNum = argNum; + curArgTabEntry->node = node; + curArgTabEntry->argType = node->TypeGet(); + curArgTabEntry->use = use; + curArgTabEntry->slotNum = 0; + curArgTabEntry->numRegs = numRegs; + curArgTabEntry->numSlots = 0; + curArgTabEntry->alignment = alignment; + curArgTabEntry->SetLateArgInx(UINT_MAX); + curArgTabEntry->tmpNum = BAD_VAR_NUM; + curArgTabEntry->isSplit = false; + curArgTabEntry->isTmp = false; + curArgTabEntry->needTmp = false; + curArgTabEntry->needPlace = false; + curArgTabEntry->processed = false; #ifdef FEATURE_HFA curArgTabEntry->_hfaElemKind = HFA_ELEM_NONE; #endif @@ -1198,15 +1198,15 @@ fgArgTabEntry* fgArgInfo::AddStkArg(unsigned argNum, curArgTabEntry->structIntRegs = 0; curArgTabEntry->structFloatRegs = 0; #endif // defined(UNIX_AMD64_ABI) - curArgTabEntry->numSlots = numSlots; - curArgTabEntry->alignment = alignment; - curArgTabEntry->lateArgInx = UINT_MAX; - curArgTabEntry->tmpNum = BAD_VAR_NUM; - curArgTabEntry->isSplit = false; - curArgTabEntry->isTmp = false; - curArgTabEntry->needTmp = false; - curArgTabEntry->needPlace = false; - curArgTabEntry->processed = false; + curArgTabEntry->numSlots = numSlots; + curArgTabEntry->alignment = alignment; + curArgTabEntry->SetLateArgInx(UINT_MAX); + curArgTabEntry->tmpNum = BAD_VAR_NUM; + curArgTabEntry->isSplit = false; + curArgTabEntry->isTmp = false; + curArgTabEntry->needTmp = false; + curArgTabEntry->needPlace = false; + curArgTabEntry->processed = false; #ifdef FEATURE_HFA curArgTabEntry->_hfaElemKind = HFA_ELEM_NONE; #endif @@ -1257,7 +1257,7 @@ void fgArgInfo::UpdateRegArg(fgArgTabEntry* curArgTabEntry, GenTree* node, bool if (reMorphing) { // Find the arg in the late args list. - GenTree* argx = Compiler::gtArgNodeByLateArgInx(callTree, curArgTabEntry->lateArgInx); + GenTree* argx = Compiler::gtArgNodeByLateArgInx(callTree, curArgTabEntry->GetLateArgInx()); if (curArgTabEntry->node != argx) { curArgTabEntry->node = argx; @@ -1301,7 +1301,7 @@ void fgArgInfo::UpdateStkArg(fgArgTabEntry* curArgTabEntry, GenTree* node, bool if (isLateArg) { GenTree* argx = nullptr; - unsigned lateArgInx = curArgTabEntry->lateArgInx; + unsigned lateArgInx = curArgTabEntry->GetLateArgInx(); // Traverse the late argument list to find this argument so that we can update it. unsigned listInx = 0; @@ -1316,7 +1316,7 @@ void fgArgInfo::UpdateStkArg(fgArgTabEntry* curArgTabEntry, GenTree* node, bool listInx++; } assert(listInx == lateArgInx); - assert(lateArgInx == curArgTabEntry->lateArgInx); + assert(lateArgInx == curArgTabEntry->GetLateArgInx()); if (curArgTabEntry->node != argx) { @@ -2441,8 +2441,8 @@ void fgArgInfo::EvalArgsToTemps() tmpRegArgNext = tmpRegArgNext->GetNext(); } - curArgTabEntry->node = defArg; - curArgTabEntry->lateArgInx = regArgInx++; + curArgTabEntry->node = defArg; + curArgTabEntry->SetLateArgInx(regArgInx++); } #ifdef DEBUG -- 2.7.4