Imported Upstream version 5.2.0.209

Former-commit-id: 79ca95c189bbab714d05d31b88e606887569acb7
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-07-24 15:36:55 +00:00
parent bdb6e93184
commit af702198e1
26 changed files with 68 additions and 21 deletions

View File

@@ -1 +1 @@
91d2682dc6ca4a024ddf6b780aadc6390c5aa4f5
8cde6305565e88ec7e71e3242c5d16d87b28ee71

View File

@@ -683,6 +683,8 @@ w32handle_destroy (gpointer handle)
close_func (handle, handle_specific);
}
memset (handle_specific, 0, mono_w32handle_ops_typesize (type));
g_free (handle_specific);
}

View File

@@ -1314,6 +1314,13 @@ class Tests
return RuntimeHelpers.IsReferenceOrContainsReferences<T> ();
}
class IsRefClass<T> {
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public bool is_ref () {
return RuntimeHelpers.IsReferenceOrContainsReferences<T> ();
}
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static bool is_ref_or_contains_refs_gen_ref<T> () {
return RuntimeHelpers.IsReferenceOrContainsReferences<GenStruct<T>> ();
@@ -1343,6 +1350,12 @@ class Tests
int i;
}
struct AStruct3<T1, T2, T3> {
T1 t1;
T2 t2;
T3 t3;
}
public static int test_0_isreference_intrins () {
if (RuntimeHelpers.IsReferenceOrContainsReferences<int> ())
return 1;
@@ -1368,6 +1381,14 @@ class Tests
if (is_ref_or_contains_refs_gen_noref<string> ())
return 10;
// Complex type from shared class method
var c1 = new IsRefClass<AStruct3<int, int, int>> ();
if (c1.is_ref ())
return 11;
var c2 = new IsRefClass<AStruct3<string, int, int>> ();
if (!c2.is_ref ())
return 12;
return 0;
}
}

View File

@@ -1972,6 +1972,30 @@ public class Tests
gsharedvt_vphi (0);
return 0;
}
struct AStruct3<T1, T2, T3> {
T1 t1;
T2 t2;
T3 t3;
}
interface IFaceIsRef {
bool is_ref<T> ();
}
class ClassIsRef : IFaceIsRef {
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public bool is_ref<T> () {
return RuntimeHelpers.IsReferenceOrContainsReferences<T> ();
}
}
public static int test_0_isreference_intrins () {
IFaceIsRef iface = new ClassIsRef ();
Console.WriteLine ("X: " + iface.is_ref<AStruct3<int, int, int>> ());
Console.WriteLine ("X: " + iface.is_ref<AStruct3<string, int, int>> ());
return 0;
}
}
// #13191

View File

@@ -1 +1 @@
770bd88ea486b45ddf4e7b0b0853bb2919302a9a
326e6c1f9d2a80b0aee2b24acf87dcae411c4ffa

View File

@@ -1 +1 @@
#define FULL_VERSION "explicit/478c04a"
#define FULL_VERSION "explicit/3d531ba"

View File

@@ -215,7 +215,7 @@ mono_os_cond_timedwait (mono_cond_t *cond, mono_mutex_t *mutex, guint32 timeout_
res = pthread_cond_timedwait (cond, mutex, &ts);
if (G_UNLIKELY (res != 0 && res != ETIMEDOUT))
g_error ("%s: pthread_cond_timedwait failed with \"%s\" (%d)", __func__, g_strerror (res), res);
g_error ("%s: pthread_cond_timedwait failed with \"%s\" (%d) %ld %ld %d", __func__, g_strerror (res), res, ts.tv_sec, ts.tv_nsec, timeout_ms);
return res != 0 ? -1 : 0;
}