Skip to content

Commit 22028dc

Browse files
committed
Code review feedback
1 parent 75ae3b5 commit 22028dc

File tree

1 file changed

+6
-29
lines changed

1 file changed

+6
-29
lines changed

src/jit/morph.cpp

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6655,17 +6655,7 @@ GenTree* Compiler::fgMorphField(GenTree* tree, MorphAddrContext* mac)
66556655
#endif
66566656

66576657
// We expect 'addr' to be an address at this point.
6658-
// But there are also cases where we can see a GT_LCL_FLD or a GT_LCL_VAR:
6659-
//
6660-
// [001076] ----G------- /--* FIELD long m_constArray
6661-
// [001072] ----G------- | \--* ADDR byref
6662-
// [001073] ----G------- | \--* FIELD struct blob
6663-
// [001074] ------------ | \--* ADDR byref
6664-
// [001075] ------------ | \--* LCL_VAR struct V18 loc11
6665-
//
6666-
//
6667-
assert((addr->TypeGet() == TYP_BYREF) || (addr->TypeGet() == TYP_I_IMPL) || (addr->OperGet() == GT_LCL_FLD) ||
6668-
(addr->OperGet() == GT_LCL_VAR));
6658+
assert(addr->TypeGet() == TYP_BYREF || addr->TypeGet() == TYP_I_IMPL);
66696659

66706660
// Since we don't make a constant zero to attach the field sequence to, associate it with the "addr" node.
66716661
FieldSeqNode* fieldSeq =
@@ -6677,13 +6667,10 @@ GenTree* Compiler::fgMorphField(GenTree* tree, MorphAddrContext* mac)
66776667
GenTree* result = fgMorphSmpOp(tree, mac);
66786668

66796669
#ifdef DEBUG
6680-
if (fldOffset == 0)
6670+
if (verbose)
66816671
{
6682-
if (verbose)
6683-
{
6684-
printf("\nAfter calling fgMorphSmpOp (zero fldOffset case):\n");
6685-
gtDispTree(result);
6686-
}
6672+
printf("\nFinal value of Compiler::fgMorphField after calling fgMorphSmpOp:\n");
6673+
gtDispTree(result);
66876674
}
66886675
#endif
66896676

@@ -13517,7 +13504,7 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac)
1351713504
}
1351813505
else
1351913506
{
13520-
// Append 'fieldSeq' to the exsisting one
13507+
// Append 'fieldSeq' to the existing one
1352113508
temp->AsLclFld()->gtFieldSeq =
1352213509
GetFieldSeqStore()->Append(temp->AsLclFld()->gtFieldSeq, fieldSeq);
1352313510
}
@@ -18765,17 +18752,7 @@ class LocalAddressVisitor final : public GenTreeVisitor<LocalAddressVisitor>
1876518752
void Compiler::fgAddFieldSeqForZeroOffset(GenTree* addr, FieldSeqNode* fieldSeqZero)
1876618753
{
1876718754
// We expect 'addr' to be an address at this point.
18768-
// But there are also cases where we can see a GT_LCL_FLD or a GT_LCL_VAR:
18769-
//
18770-
// [001076] ----G------- /--* FIELD long m_constArray
18771-
// [001072] ----G------- | \--* ADDR byref
18772-
// [001073] ----G------- | \--* FIELD struct blob
18773-
// [001074] ------------ | \--* ADDR byref
18774-
// [001075] ------------ | \--* LCL_VAR struct V18 loc11
18775-
//
18776-
//
18777-
assert(addr->TypeGet() == TYP_BYREF || addr->TypeGet() == TYP_I_IMPL || addr->OperGet() == GT_LCL_FLD ||
18778-
addr->OperGet() == GT_LCL_VAR);
18755+
assert(addr->TypeGet() == TYP_BYREF || addr->TypeGet() == TYP_I_IMPL);
1877918756

1878018757
FieldSeqNode* fieldSeqUpdate = fieldSeqZero;
1878118758
GenTree* fieldSeqNode = addr;

0 commit comments

Comments
 (0)