Merge pull request #2039 from simonhartmann/dns_refresh_timeout
authorMarek Safar <marek.safar@gmail.com>
Tue, 8 Sep 2015 09:48:01 +0000 (11:48 +0200)
committerMarek Safar <marek.safar@gmail.com>
Tue, 8 Sep 2015 09:48:01 +0000 (11:48 +0200)
[class libs] Implemented DnsRefreshTimeout for ServicePointManager

mcs/class/Facades/Makefile
mcs/mcs/codegen.cs
mcs/tests/gtest-584.cs
mcs/tests/test-null-operator-18.cs [new file with mode: 0644]
mcs/tests/ver-il-net_4_x.xml

index 3b73b258d1fba5c9152be878ced8ea6f4116717c..37744ad64c8a2f8a0b1326963c2f2592a23d2c4d 100644 (file)
@@ -30,7 +30,7 @@ reflection_PARALLEL_SUBDIRS = System.Reflection.Emit.ILGeneration System.Reflect
 
 mobile_static_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
 
-net_4_5_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS) System.Diagnostics.PerformanceCounter \
+net_4_x_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS) System.Diagnostics.PerformanceCounter \
        System.IO.FileSystem.Watcher System.IO.Pipes System.Security.Cryptography.ProtectedData System.ServiceProcess.ServiceController System.Net.Http.WebRequestHandler
 
 monodroid_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
@@ -40,7 +40,7 @@ xammac_net_4_5_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PAR
 
 monotouch_watch_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
 
-PROFILE_SUBDIRS = $(net_4_5_PARALLEL_SUBDIRS)
+PROFILE_PARALLEL_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS)
 
 #OVERRIDE_TARGET_ALL = yes
 
@@ -66,7 +66,7 @@ include $(MCS_BUILD_DIR)/rules.make
 
 dist-local: dist-default
 
-DIST_SUBDIRS = $(net_4_5_PARALLEL_SUBDIRS)
+DIST_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS)
 
 doc-update-local:
        @echo "not doing docs"
index d86bf2c3d1eb1b81dbbabfad537bcef677935dc3..c224b0d636a7056fa2632b123768c36e69db10b3 100644 (file)
@@ -1260,10 +1260,12 @@ namespace Mono.CSharp
                                        instance_address.AddressOf (ec, AddressOp.Load);
                                } else if (unwrap != null) {
                                        unwrap.Emit (ec);
-                                       var tmp = ec.GetTemporaryLocal (unwrap.Type);
-                                       ec.Emit (OpCodes.Stloc, tmp);
-                                       ec.Emit (OpCodes.Ldloca, tmp);
-                                       ec.FreeTemporaryLocal (tmp, unwrap.Type);
+                                       if (addressRequired) {
+                                               var tmp = ec.GetTemporaryLocal (unwrap.Type);
+                                               ec.Emit (OpCodes.Stloc, tmp);
+                                               ec.Emit (OpCodes.Ldloca, tmp);
+                                               ec.FreeTemporaryLocal (tmp, unwrap.Type);
+                                       }
                                } else if (!conditional_access_dup) {
                                        instance.Emit (ec);
                                }
index e5367dfaaade451cf5d1cdbfb2ed4a476ae301d2..bc66d3dad63fe1e2747001c8e9c4af87747def1f 100644 (file)
@@ -79,7 +79,7 @@ class C
                        return 18;
 
                var r2 = E.V & a_n;
-               if (r1 != null)
+               if (r2 != null)
                        return 19;
 
                Console.WriteLine ("ok");
diff --git a/mcs/tests/test-null-operator-18.cs b/mcs/tests/test-null-operator-18.cs
new file mode 100644 (file)
index 0000000..ad0d72e
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+
+static class MainClass
+{
+       public static void Main()
+       {
+               TestBug();
+       }
+
+       public static void TestBug()
+       {
+               int? value = null;
+               value?.Test();
+       }
+
+       public static void Test(this int value)
+       {
+               Console.WriteLine("Not null");
+       }
+}
index 2f2884795e597e51fa3306233a034960d56c0595..cda463fd51f18f8b8f060437016487485b9a5f7c 100644 (file)
     </type>
   </test>
   <test name="test-null-operator-08.cs">
+    <type name="S">
+      <method name="Void Foo(Boolean)" attrs="486">
+        <size>38</size>
+      </method>
+    </type>
     <type name="Program">
       <method name="Void M[T](T)" attrs="145">
         <size>88</size>
       <method name="Void M3[T](System.Nullable`1[T])" attrs="145">
         <size>106</size>
       </method>
-      <method name="Void Main()" attrs="145">
-        <size>165</size>
-      </method>
-      <method name="Void .ctor()" attrs="6278">
-        <size>7</size>
-      </method>
-    </type>
-    <type name="S">
-      <method name="Void Foo(Boolean)" attrs="486">
-        <size>38</size>
-      </method>
-    </type>
-    <type name="Program">
       <method name="Void TestAddress_1[T](T)" attrs="145">
         <size>56</size>
       </method>
       <method name="Void TestAddress_2[T](T[])" attrs="145">
         <size>82</size>
       </method>
+      <method name="Void Main()" attrs="145">
+        <size>165</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
     </type>
   </test>
   <test name="test-null-operator-09.cs">
       </method>
     </type>
   </test>
+  <test name="test-null-operator-18.cs">
+    <type name="MainClass">
+      <method name="Void Main()" attrs="150">
+        <size>7</size>
+      </method>
+      <method name="Void TestBug()" attrs="150">
+        <size>38</size>
+      </method>
+      <method name="Void Test(Int32)" attrs="150">
+        <size>12</size>
+      </method>
+    </type>
+  </test>
   <test name="test-partial-01.cs">
     <type name="Foo.Hello">
       <method name="Void .ctor()" attrs="6278">