Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 14628f3

Browse files
authored
Merge pull request #7118 from dotnet/revert-6889-StaticField
Revert "Fix IMGREL32 static field addr value-num blindspot"
2 parents 193c581 + 9f7eabe commit 14628f3

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

src/jit/gentree.cpp

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15789,23 +15789,19 @@ bool GenTree::IsFieldAddr(Compiler* comp, GenTreePtr* pObj, GenTreePtr* pStatic,
1578915789
baseAddr = gtOp.gtOp1;
1579015790
}
1579115791
}
15792-
// Check if "this" has a zero-offset annotation.
15793-
else if (comp->GetZeroOffsetFieldMap()->Lookup(this, &newFldSeq))
15794-
{
15795-
baseAddr = this;
15796-
mustBeStatic = true;
15797-
}
15798-
else if (OperGet() == GT_CNS_INT && gtIntCon.gtFieldSeq != nullptr)
15799-
{
15800-
// Address is a literal constant; must be a static field.
15801-
newFldSeq = gtIntCon.gtFieldSeq;
15802-
baseAddr = this;
15803-
mustBeStatic = true;
15804-
}
1580515792
else
1580615793
{
15807-
// This is not a field address.
15808-
return false;
15794+
// Check if "this" has a zero-offset annotation.
15795+
if (!comp->GetZeroOffsetFieldMap()->Lookup(this, &newFldSeq))
15796+
{
15797+
// If not, this is not a field address.
15798+
return false;
15799+
}
15800+
else
15801+
{
15802+
baseAddr = this;
15803+
mustBeStatic = true;
15804+
}
1580915805
}
1581015806

1581115807
// If not we don't have a field seq, it's not a field address.

tests/src/GC/Scenarios/FinalizeTimeout/FinalizeTimeout.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private static void ThreadMain()
4747

4848
private class BlockingFinalizerOnShutdown
4949
{
50-
public volatile static bool finalizerCompletedOnce = false;
50+
public static bool finalizerCompletedOnce = false;
5151
public bool isLastObject = false;
5252

5353
~BlockingFinalizerOnShutdown()

0 commit comments

Comments
 (0)