Revert "Fix IMGREL32 static field addr value-num blindspot"
authorJan Kotas <jkotas@microsoft.com>
Fri, 9 Sep 2016 00:58:55 +0000 (17:58 -0700)
committerGitHub <noreply@github.com>
Fri, 9 Sep 2016 00:58:55 +0000 (17:58 -0700)
src/jit/gentree.cpp
tests/src/GC/Scenarios/FinalizeTimeout/FinalizeTimeout.cs

index d97e67d58fe2ba9e4e7e08c33aa928f4a5b53ae7..9d717fb5ccdcd608d422a0d4e7df6c010685fe0c 100644 (file)
@@ -15789,23 +15789,19 @@ bool GenTree::IsFieldAddr(Compiler* comp, GenTreePtr* pObj, GenTreePtr* pStatic,
             baseAddr  = gtOp.gtOp1;
         }
     }
-    // Check if "this" has a zero-offset annotation.
-    else if (comp->GetZeroOffsetFieldMap()->Lookup(this, &newFldSeq))
-    {
-        baseAddr = this;
-        mustBeStatic = true;
-    }
-    else if (OperGet() == GT_CNS_INT && gtIntCon.gtFieldSeq != nullptr)
-    {
-        // Address is a literal constant; must be a static field.
-        newFldSeq = gtIntCon.gtFieldSeq;
-        baseAddr = this;
-        mustBeStatic = true;
-    }
     else
     {
-        // This is not a field address.
-        return false;
+        // Check if "this" has a zero-offset annotation.
+        if (!comp->GetZeroOffsetFieldMap()->Lookup(this, &newFldSeq))
+        {
+            // If not, this is not a field address.
+            return false;
+        }
+        else
+        {
+            baseAddr     = this;
+            mustBeStatic = true;
+        }
     }
 
     // If not we don't have a field seq, it's not a field address.
index 0935b4524f7fb6286387e80d427a67ac289166f3..0fda8172e49fc141e01acce4c3b4ec8105c6912e 100644 (file)
@@ -47,7 +47,7 @@ public class FinalizeTimeout
 
     private class BlockingFinalizerOnShutdown
     {
-        public volatile static bool finalizerCompletedOnce = false;
+        public static bool finalizerCompletedOnce = false;
         public bool isLastObject = false;
 
         ~BlockingFinalizerOnShutdown()