From: Mike Danes Date: Thu, 2 Jun 2016 04:38:46 +0000 (+0300) Subject: Address CR feedback X-Git-Tag: submit/tizen/20210909.063632~11030^2~10199^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ec48a965ad1181cb0da1386c5b497808218738b;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Address CR feedback Commit migrated from https://github.com/dotnet/coreclr/commit/e59999540b13544f6cc829cb2973bffbd3ff10a9 --- diff --git a/src/coreclr/src/jit/importer.cpp b/src/coreclr/src/jit/importer.cpp index 3e67afd..d8bd87e 100644 --- a/src/coreclr/src/jit/importer.cpp +++ b/src/coreclr/src/jit/importer.cpp @@ -2674,7 +2674,7 @@ BOOL Compiler::impLocAllocOnStack() // sig - The InitializeArray signature. // // Return Value: -// A pointer to the newly create GT_COPYBLK node if the replacement succeeds or +// A pointer to the newly created GT_COPYBLK node if the replacement succeeds or // nullptr otherwise. // // Notes: @@ -2848,7 +2848,7 @@ GenTreePtr Compiler::impInitializeArrayIntrinsic(CORINFO_SIG_INFO * sig) if ((beginArgs == nullptr) || (numArgsArg == nullptr) || - (numArgsArg->Current()->OperGet() != GT_CNS_INT) || + (!numArgsArg->Current()->IsCnsIntOrI()) || (numArgsArg->Current()->AsIntCon()->IconValue() < 1) || (numArgsArg->Current()->AsIntCon()->IconValue() > 64)) { @@ -2902,10 +2902,7 @@ GenTreePtr Compiler::impInitializeArrayIntrinsic(CORINFO_SIG_INFO * sig) { GenTree* lowerBoundNode = arg->Current(); - if (lowerBoundNode->OperGet() != GT_CNS_INT) - return nullptr; - - if (lowerBoundNode->AsIntCon()->IconValue() == 0) + if (lowerBoundNode->IsIntegralConst(0)) isMDArray = false; } @@ -2914,7 +2911,7 @@ GenTreePtr Compiler::impInitializeArrayIntrinsic(CORINFO_SIG_INFO * sig) GenTree* lengthNode = arg->Current(); - if (lengthNode->OperGet() != GT_CNS_INT) + if (!lengthNode->IsCnsIntOrI()) return nullptr; numElements *= S_SIZE_T(lengthNode->AsIntCon()->IconValue()); @@ -4972,6 +4969,7 @@ void Compiler::impImportNewObjArray(CORINFO_RESOLVED_TOKEN* pResolvedToken, } node->gtFlags |= args->gtFlags & GTF_GLOB_EFFECT; + node->gtCall.compileTimeHelperArgumentHandle = (CORINFO_GENERIC_HANDLE)pResolvedToken->hClass; // Remember that this basic block contains 'new' of a md array compCurBB->bbFlags |= BBF_HAS_NEWARRAY;