From e20cfa85aff5bb8efbd7f96adf516b47babd7e53 Mon Sep 17 00:00:00 2001 From: Sinan Kaya Date: Tue, 19 Mar 2019 03:24:53 +0000 Subject: [PATCH 1/2] find src/jit -type f -exec sed -i -e 's/->isVararg/->GetIsVararg()/g' {} \; --- src/jit/compiler.h | 6 +++--- src/jit/morph.cpp | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/jit/compiler.h b/src/jit/compiler.h index b4ab2db0c404..01cd7b825f3f 100644 --- a/src/jit/compiler.h +++ b/src/jit/compiler.h @@ -1446,8 +1446,8 @@ struct fgArgTabEntry #endif } - __declspec(property(get = getIsVararg, put = setIsVararg)) bool isVararg; - bool getIsVararg() + + bool GetIsVararg() { #ifdef FEATURE_VARARG return _isVararg; @@ -1455,7 +1455,7 @@ struct fgArgTabEntry return false; #endif } - void setIsVararg(bool value) + void SetIsVararg(bool value) { #ifdef FEATURE_VARARG _isVararg = value; diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index b318092ff00d..853a55f1d4f8 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -1131,7 +1131,7 @@ fgArgTabEntry* fgArgInfo::AddRegArg(unsigned argNum, curArgTabEntry->isBackFilled = false; curArgTabEntry->isNonStandard = false; curArgTabEntry->isStruct = isStruct; - curArgTabEntry->isVararg = isVararg; + curArgTabEntry->SetIsVararg(isVararg); hasRegArgs = true; AddArg(curArgTabEntry); @@ -1213,7 +1213,7 @@ fgArgTabEntry* fgArgInfo::AddStkArg(unsigned argNum, curArgTabEntry->isBackFilled = false; curArgTabEntry->isNonStandard = false; curArgTabEntry->isStruct = isStruct; - curArgTabEntry->isVararg = isVararg; + curArgTabEntry->SetIsVararg(isVararg); hasStackArgs = true; AddArg(curArgTabEntry); @@ -2080,7 +2080,7 @@ GenTree* Compiler::fgMakeTmpArgNode(fgArgTabEntry* curArgTabEntry) { CORINFO_CLASS_HANDLE clsHnd = varDsc->lvVerTypeInfo.GetClassHandle(); var_types structBaseType = - getPrimitiveTypeForStruct(lvaLclExactSize(tmpVarNum), clsHnd, curArgTabEntry->isVararg); + getPrimitiveTypeForStruct(lvaLclExactSize(tmpVarNum), clsHnd, curArgTabEntry->GetIsVararg()); if (structBaseType != TYP_UNKNOWN) { @@ -2123,7 +2123,7 @@ GenTree* Compiler::fgMakeTmpArgNode(fgArgTabEntry* curArgTabEntry) #if FEATURE_MULTIREG_ARGS #ifdef _TARGET_ARM64_ assert(varTypeIsStruct(type)); - if (lvaIsMultiregStruct(varDsc, curArgTabEntry->isVararg)) + if (lvaIsMultiregStruct(varDsc, curArgTabEntry->GetIsVararg())) { // ToDo-ARM64: Consider using: arg->ChangeOper(GT_LCL_FLD); // as that is how UNIX_AMD64_ABI works. @@ -2288,7 +2288,7 @@ void fgArgInfo::EvalArgsToTemps() unsigned structSize = varDsc->lvExactSize; scalarType = - compiler->getPrimitiveTypeForStruct(structSize, clsHnd, curArgTabEntry->isVararg); + compiler->getPrimitiveTypeForStruct(structSize, clsHnd, curArgTabEntry->GetIsVararg()); } #endif // _TARGET_ARMARCH_ || defined (UNIX_AMD64_ABI) } @@ -4529,7 +4529,7 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry hfaType = fgEntryPtr->hfaType; if (varTypeIsValidHfaType(hfaType) #if !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_) - && !fgEntryPtr->isVararg + && !fgEntryPtr->GetIsVararg() #endif // !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_) ) { @@ -4641,7 +4641,7 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry // This local variable must match the layout of the 'objClass' type exactly if (varDsc->lvIsHfa() #if !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_) - && !fgEntryPtr->isVararg + && !fgEntryPtr->GetIsVararg() #endif // !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_) ) { @@ -4696,7 +4696,7 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry // TODO-ARM64-CQ: Support struct promoted HFA types here if (varDsc->lvPromoted && (varDsc->lvFieldCnt == 2) && (!varDsc->lvIsHfa() #if !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_) - && !fgEntryPtr->isVararg + && !fgEntryPtr->GetIsVararg() #endif // !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_) )) { From b94978ee12af627c9bfa80513b2fed4168af518e Mon Sep 17 00:00:00 2001 From: Sinan Kaya Date: Wed, 25 Sep 2019 21:55:53 +0000 Subject: [PATCH 2/2] Format patch #2 --- src/jit/compiler.h | 1 - src/jit/morph.cpp | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/jit/compiler.h b/src/jit/compiler.h index 01cd7b825f3f..d8f3a8bc818c 100644 --- a/src/jit/compiler.h +++ b/src/jit/compiler.h @@ -1446,7 +1446,6 @@ struct fgArgTabEntry #endif } - bool GetIsVararg() { #ifdef FEATURE_VARARG diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index 853a55f1d4f8..259e4dcde15d 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -4531,7 +4531,7 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry #if !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_) && !fgEntryPtr->GetIsVararg() #endif // !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_) - ) + ) { elemType = hfaType; elemSize = genTypeSize(elemType); @@ -4643,7 +4643,7 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry #if !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_) && !fgEntryPtr->GetIsVararg() #endif // !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_) - ) + ) { // We have a HFA struct. // Note that GetHfaType may not be the same as elemType, since TYP_SIMD8 is handled the same as TYP_DOUBLE. @@ -4698,7 +4698,7 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry #if !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_) && !fgEntryPtr->GetIsVararg() #endif // !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_) - )) + )) { // See if we have two promoted fields that start at offset 0 and 8? unsigned loVarNum = lvaGetFieldLocal(varDsc, 0);