@@ -7734,27 +7734,20 @@ GenTree* Compiler::gtNewStringLiteralNode(InfoAccessType iat, void* pValue)
7734
7734
switch (iat)
7735
7735
{
7736
7736
case IAT_VALUE:
7737
- setMethodHasFrozenObjects();
7738
7737
tree = gtNewIconEmbHndNode(pValue, nullptr, GTF_ICON_OBJ_HDL, nullptr);
7739
- #ifdef DEBUG
7740
- tree->AsIntCon()->gtTargetHandle = (size_t)pValue;
7741
- #endif
7738
+ INDEBUG(tree->AsIntCon()->gtTargetHandle = (size_t)pValue);
7742
7739
break;
7743
7740
7744
7741
case IAT_PVALUE: // The value needs to be accessed via an indirection
7745
7742
// Create an indirection
7746
7743
tree = gtNewIndOfIconHandleNode(TYP_REF, (size_t)pValue, GTF_ICON_STR_HDL, true);
7747
- #ifdef DEBUG
7748
- tree->gtGetOp1()->AsIntCon()->gtTargetHandle = (size_t)pValue;
7749
- #endif
7744
+ INDEBUG(tree->gtGetOp1()->AsIntCon()->gtTargetHandle = (size_t)pValue);
7750
7745
break;
7751
7746
7752
7747
case IAT_PPVALUE: // The value needs to be accessed via a double indirection
7753
7748
// Create the first indirection.
7754
7749
tree = gtNewIndOfIconHandleNode(TYP_I_IMPL, (size_t)pValue, GTF_ICON_CONST_PTR, true);
7755
- #ifdef DEBUG
7756
- tree->gtGetOp1()->AsIntCon()->gtTargetHandle = (size_t)pValue;
7757
- #endif
7750
+ INDEBUG(tree->gtGetOp1()->AsIntCon()->gtTargetHandle = (size_t)pValue);
7758
7751
// Create the second indirection.
7759
7752
tree = gtNewIndir(TYP_REF, tree, GTF_IND_NONFAULTING | GTF_IND_INVARIANT | GTF_IND_NONNULL);
7760
7753
break;
@@ -8112,11 +8105,7 @@ GenTree* Compiler::gtNewGenericCon(var_types type, uint8_t* cnsVal)
8112
8105
}
8113
8106
else
8114
8107
{
8115
- // Even if the caller doesn't need the resulting tree let's still conservatively call
8116
- // setMethodHasFrozenObjects here to make caller's life easier.
8117
- setMethodHasFrozenObjects();
8118
- GenTree* tree = gtNewIconEmbHndNode((void*)val, nullptr, GTF_ICON_OBJ_HDL, nullptr);
8119
- return tree;
8108
+ return gtNewIconEmbHndNode((void*)val, nullptr, GTF_ICON_OBJ_HDL, nullptr);
8120
8109
}
8121
8110
}
8122
8111
#ifdef FEATURE_SIMD
@@ -9528,7 +9517,6 @@ GenTree* Compiler::gtCloneExpr(GenTree* tree)
9528
9517
GenTreeIndexAddr(asIndAddr->Arr(), asIndAddr->Index(), asIndAddr->gtElemType,
9529
9518
asIndAddr->gtStructElemClass, asIndAddr->gtElemSize, asIndAddr->gtLenOffset,
9530
9519
asIndAddr->gtElemOffset, asIndAddr->IsBoundsChecked());
9531
- copy->AsIndexAddr()->gtIndRngFailBB = asIndAddr->gtIndRngFailBB;
9532
9520
}
9533
9521
break;
9534
9522
@@ -9626,8 +9614,7 @@ GenTree* Compiler::gtCloneExpr(GenTree* tree)
9626
9614
copy = new (this, GT_BOUNDS_CHECK)
9627
9615
GenTreeBoundsChk(tree->AsBoundsChk()->GetIndex(), tree->AsBoundsChk()->GetArrayLength(),
9628
9616
tree->AsBoundsChk()->gtThrowKind);
9629
- copy->AsBoundsChk()->gtIndRngFailBB = tree->AsBoundsChk()->gtIndRngFailBB;
9630
- copy->AsBoundsChk()->gtInxType = tree->AsBoundsChk()->gtInxType;
9617
+ copy->AsBoundsChk()->gtInxType = tree->AsBoundsChk()->gtInxType;
9631
9618
break;
9632
9619
9633
9620
case GT_LEA:
@@ -11031,15 +11018,8 @@ void Compiler::gtDispNodeName(GenTree* tree)
11031
11018
switch (tree->AsBoundsChk()->gtThrowKind)
11032
11019
{
11033
11020
case SCK_RNGCHK_FAIL:
11034
- {
11035
11021
bufp += SimpleSprintf_s(bufp, buf, sizeof(buf), " %s_Rng", name);
11036
- if (tree->AsBoundsChk()->gtIndRngFailBB != nullptr)
11037
- {
11038
- bufp += SimpleSprintf_s(bufp, buf, sizeof(buf), " -> " FMT_BB,
11039
- tree->AsBoundsChk()->gtIndRngFailBB->bbNum);
11040
- }
11041
11022
break;
11042
- }
11043
11023
case SCK_ARG_EXCPN:
11044
11024
sprintf_s(bufp, sizeof(buf), " %s_Arg", name);
11045
11025
break;
@@ -12026,7 +12006,6 @@ void Compiler::gtDispConst(GenTree* tree)
12026
12006
}
12027
12007
else
12028
12008
{
12029
- assert(doesMethodHaveFrozenObjects());
12030
12009
printf(" 0x%llx", dspIconVal);
12031
12010
}
12032
12011
}
@@ -33412,8 +33391,6 @@ bool Compiler::gtCanSkipCovariantStoreCheck(GenTree* value, GenTree* array)
33412
33391
}
33413
33392
// Non-0 const refs can only occur with frozen objects
33414
33393
assert(value->IsIconHandle(GTF_ICON_OBJ_HDL));
33415
- assert(doesMethodHaveFrozenObjects() ||
33416
- (compIsForInlining() && impInlineInfo->InlinerCompiler->doesMethodHaveFrozenObjects()));
33417
33394
}
33418
33395
33419
33396
// Try and get a class handle for the array
0 commit comments