Imported Upstream version 4.2.2.29

Former-commit-id: f069081cc0821095435a845c961ae61cbbc95121
This commit is contained in:
Xamarin Public Jenkins
2016-01-18 21:29:19 -05:00
parent 8cb7d04924
commit 3c6daee652
1830 changed files with 496 additions and 305641 deletions

View File

@@ -315,6 +315,7 @@ OPDEF(CEE_MONO_JIT_ICALL_ADDR, "mono_jit_icall_addr", Pop0, PushI, InlineI, X, 2
OPDEF(CEE_MONO_LDPTR_INT_REQ_FLAG, "mono_ldptr_int_req_flag", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x14, NEXT)
OPDEF(CEE_MONO_LDPTR_CARD_TABLE, "mono_ldptr_card_table", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x15, NEXT)
OPDEF(CEE_MONO_LDPTR_NURSERY_START, "mono_ldptr_nursery_start", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x16, NEXT)
OPDEF(CEE_MONO_LDPTR_NURSERY_BITS, "mono_ldptr_nursery_bits", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x17, NEXT)
#ifndef OPALIAS
#define _MONO_CIL_OPALIAS_DEFINED_
#define OPALIAS(a,s,r)

View File

@@ -1 +1 @@
9292a1f14d206875dd19b3483d61333eedaa2207
f49032b6fbcf3c932ab7f6c10276180a7a5cf6cd

View File

@@ -220,12 +220,14 @@ emit_nursery_check (MonoMethodBuilder *mb, int *nursery_check_return_labels, gbo
*/
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
mono_mb_emit_byte (mb, CEE_MONO_LDPTR_NURSERY_START);
mono_mb_emit_icon (mb, DEFAULT_NURSERY_BITS);
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
mono_mb_emit_byte (mb, CEE_MONO_LDPTR_NURSERY_BITS);
mono_mb_emit_byte (mb, CEE_SHR_UN);
mono_mb_emit_stloc (mb, shifted_nursery_start);
mono_mb_emit_ldarg (mb, 0);
mono_mb_emit_icon (mb, DEFAULT_NURSERY_BITS);
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
mono_mb_emit_byte (mb, CEE_MONO_LDPTR_NURSERY_BITS);
mono_mb_emit_byte (mb, CEE_SHR_UN);
mono_mb_emit_ldloc (mb, shifted_nursery_start);
nursery_check_return_labels [0] = mono_mb_emit_branch (mb, CEE_BEQ);
@@ -234,7 +236,8 @@ emit_nursery_check (MonoMethodBuilder *mb, int *nursery_check_return_labels, gbo
// if (!ptr_in_nursery (*ptr)) return;
mono_mb_emit_ldarg (mb, 0);
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_icon (mb, DEFAULT_NURSERY_BITS);
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
mono_mb_emit_byte (mb, CEE_MONO_LDPTR_NURSERY_BITS);
mono_mb_emit_byte (mb, CEE_SHR_UN);
mono_mb_emit_ldloc (mb, shifted_nursery_start);
nursery_check_return_labels [1] = mono_mb_emit_branch (mb, CEE_BNE_UN);

View File

@@ -876,8 +876,18 @@ monitor_thread (void)
if (all_waitsleepjoin) {
ThreadPoolCounter counter;
COUNTER_ATOMIC (counter, { counter._.max_working ++; });
hill_climbing_force_change (counter._.max_working, TRANSITION_STARVATION);
gboolean limit_worker_max_reached = FALSE;
COUNTER_ATOMIC (counter, {
if (counter._.max_working >= threadpool->limit_worker_max) {
limit_worker_max_reached = TRUE;
break;
}
counter._.max_working ++;
});
if (!limit_worker_max_reached)
hill_climbing_force_change (counter._.max_working, TRANSITION_STARVATION);
}
threadpool->cpu_usage = mono_cpu_usage (threadpool->cpu_usage_state);
@@ -1421,12 +1431,16 @@ mono_threadpool_ms_resume (void)
void
ves_icall_System_Threading_ThreadPool_GetAvailableThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads)
{
ThreadPoolCounter counter;
if (!worker_threads || !completion_port_threads)
return;
mono_lazy_initialize (&status, initialize);
*worker_threads = threadpool->limit_worker_max;
counter.as_gint64 = COUNTER_READ ();
*worker_threads = MAX (0, threadpool->limit_worker_max - counter._.active);
*completion_port_threads = threadpool->limit_io_max;
}
@@ -1464,8 +1478,8 @@ ves_icall_System_Threading_ThreadPool_SetMinThreadsNative (gint32 worker_threads
if (completion_port_threads <= 0 || completion_port_threads > threadpool->limit_io_max)
return FALSE;
threadpool->limit_worker_max = worker_threads;
threadpool->limit_io_max = completion_port_threads;
threadpool->limit_worker_min = worker_threads;
threadpool->limit_io_min = completion_port_threads;
return TRUE;
}

View File

@@ -1 +1 @@
68fe0688774e03bdf70e4f80f566f1e98cc3abf8
43a938d0fc4a0e09757c04938cbbb2ba5b269639

View File

@@ -749,7 +749,7 @@ EXTRA_DIST = TestDriver.cs \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 4.2.2.10/7b87787\"" > version.h
echo "#define FULL_VERSION \"Stable 4.2.2.29/efae6a0\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@@ -749,7 +749,7 @@ EXTRA_DIST = TestDriver.cs \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 4.2.2.10/7b87787\"" > version.h
echo "#define FULL_VERSION \"Stable 4.2.2.29/efae6a0\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@@ -1 +1 @@
4b2d84dd6668bd0561add9df9659b3a3dbe4586b
89ae0acc368fbb5f2e5c94a7279510c1abc670f2

View File

@@ -1 +1 @@
f90e82ac07050949995cbc363bae19c32c00b64c
46c962d8d258bbbc41ba0eb536a665e655c91493

View File

@@ -1 +1 @@
8d2f08962c13e0e01c89cb1f9fd8d9c9fadc43d3
b7a04e595ac8e42f5912b4c52b21919472ebea6e

View File

@@ -292,82 +292,6 @@ class Tests
return 0;
}
enum LongEnum : ulong {
A = 1
}
public static int test_0_long_enum_eq_comparer () {
var c = EqualityComparer<LongEnum>.Default;
c.GetHashCode (LongEnum.A);
return 0;
}
enum UInt32Enum : uint {
A = 1
}
enum Int32Enum : int {
A = 1
}
enum Int16Enum : short {
A = 1
}
enum UInt16Enum : ushort {
A = 1
}
enum Int8Enum : sbyte {
A = 1
}
enum UInt8Enum : byte {
A = 1
}
public static int test_0_int_enum_eq_comparer () {
var t1 = new Dictionary<Int32Enum, object> ();
t1 [Int32Enum.A] = "foo";
var t2 = new Dictionary<UInt32Enum, object> ();
t2 [UInt32Enum.A] = "foo";
var t3 = new Dictionary<UInt16Enum, object> ();
t3 [UInt16Enum.A] = "foo";
var t4 = new Dictionary<Int16Enum, object> ();
t4 [Int16Enum.A] = "foo";
var t5 = new Dictionary<Int8Enum, object> ();
t5 [Int8Enum.A] = "foo";
var t6 = new Dictionary<UInt8Enum, object> ();
t6 [UInt8Enum.A] = "foo";
return 0;
}
public static int test_0_array_accessor_runtime_invoke_ref () {
var t = typeof (string[]);
var arr = Array.CreateInstance (typeof (string), 1);
arr.GetType ().GetMethod ("Set").Invoke (arr, new object [] { 0, "A" });
var res = (string)arr.GetType ().GetMethod ("Get").Invoke (arr, new object [] { 0 });
if (res != "A")
return 1;
return 0;
}
public static void SetArrayValue_<T> (T[] values) {
values.Select (x => x).ToArray ();
}
public static int test_0_delegate_invoke_wrappers_gsharedvt () {
var enums = new LongEnum [] { LongEnum.A };
SetArrayValue_ (enums);
return 0;
}
struct LargeStruct {
public int a, b, c, d;
}

View File

@@ -1718,6 +1718,33 @@ public class Tests
return 2;
return 0;
}
public interface IFaceTest {
int iface_method ();
}
public interface IFaceConstrainedIFace {
int foo<T, T2> (ref T val) where T: IFaceTest;
}
class ConstrainedIFace : IFaceConstrainedIFace {
public int foo<T, T2> (ref T val) where T: IFaceTest {
return val.iface_method ();
}
}
class ClassTest : IFaceTest {
public int iface_method () {
return 42;
}
}
// Test constrained calls on an interface made from gsharedvt methods
public static int test_42_gsharedvt_constrained_iface () {
IFaceConstrainedIFace obj = new ConstrainedIFace ();
IFaceTest t = new ClassTest ();
return obj.foo<IFaceTest, int> (ref t);
}
}
// #13191

View File

@@ -1204,11 +1204,16 @@ static MonoMethod*
constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *klass, gpointer *this_arg)
{
MonoMethod *m;
int vt_slot;
int vt_slot, iface_offset;
if (klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
mono_set_pending_exception (mono_get_exception_execution_engine ("Not yet supported."));
return NULL;
MonoObject *this_obj;
/* Have to use the receiver's type instead of klass, the receiver is a ref type */
this_obj = *(MonoObject**)mp;
g_assert (this_obj);
klass = this_obj->vtable->klass;
}
if (mono_method_signature (cmethod)->pinvoke) {
@@ -1220,8 +1225,6 @@ constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *k
g_assert (klass->vtable);
vt_slot = mono_method_get_vtable_slot (cmethod);
if (cmethod->klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
int iface_offset;
iface_offset = mono_class_interface_offset (klass, cmethod->klass);
g_assert (iface_offset != -1);
vt_slot += iface_offset;
@@ -1230,6 +1233,7 @@ constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *k
if (cmethod->is_inflated)
m = mono_class_inflate_generic_method (m, mono_method_get_context (cmethod));
}
if (klass->valuetype && (m->klass == mono_defaults.object_class || m->klass == mono_defaults.enum_class->parent || m->klass == mono_defaults.enum_class))
/*
* Calling a non-vtype method with a vtype receiver, has to box.

View File

@@ -1 +1 @@
cfb7eed7bb4f48fe36aa3b8c99187b233fb8ed25
83cb83354cc749cc41c0999b8e401a52ac1c9b01

View File

@@ -1 +1 @@
4ebbe548d71b7a3556b34b718274beb4d108c38a
4330a1ccf556813c171c55ef21cca201c69085f5

View File

@@ -1 +1 @@
2e5dc1ce3dbfe8e7af13b7ab7a5e73b37690cfdf
7997875cd2e2752bedaea6fda2516a670c2662b3

View File

@@ -55,4 +55,5 @@ PATCH_INFO(LDSTR_LIT, "ldstr_lit")
PATCH_INFO(GC_NURSERY_START, "gc_nursery_start")
PATCH_INFO(VIRT_METHOD, "virt_method")
PATCH_INFO(GC_SAFE_POINT_FLAG, "gc_safe_point_flag")
PATCH_INFO(GC_NURSERY_BITS, "gc_nursery_bits")
PATCH_INFO(NONE, "none")

View File

@@ -1 +1 @@
#define FULL_VERSION "Stable 4.2.2.10/7b87787"
#define FULL_VERSION "Stable 4.2.2.29/efae6a0"

View File

@@ -16,6 +16,10 @@ class Tests {
v += 4;
Console.WriteLine ("Test.F4");
}
static void F8 () {
v += 8;
Console.WriteLine ("Test.F8");
}
public static int Main () {
return TestDriver.RunTests (typeof (Tests));
@@ -33,6 +37,7 @@ class Tests {
SimpleDelegate d1 = new SimpleDelegate (F1);
SimpleDelegate d2 = new SimpleDelegate (F2);
SimpleDelegate d4 = new SimpleDelegate (F4);
SimpleDelegate d8 = new SimpleDelegate (F8);
if (d1 - d1 != null)
return 1;
@@ -82,21 +87,21 @@ class Tests {
if (d12 - d12 != null)
return 21;
if (!check_is_expected_v (d12 - d14, 2))
if (!check_is_expected_v (d12 - d14, 3))
return 22;
if (!check_is_expected_v (d12 - d24, 1))
if (!check_is_expected_v (d12 - d24, 3))
return 23;
if (!check_is_expected_v (d14 - d12, 4))
if (!check_is_expected_v (d14 - d12, 5))
return 24;
if (d14 - d14 != null)
return 25;
if (!check_is_expected_v (d14 - d24, 1))
if (!check_is_expected_v (d14 - d24, 5))
return 26;
if (!check_is_expected_v (d24 - d12, 4))
if (!check_is_expected_v (d24 - d12, 6))
return 27;
if (!check_is_expected_v (d24 - d14, 2))
if (!check_is_expected_v (d24 - d14, 6))
return 28;
if (d24 - d24 != null)
return 29;
@@ -112,7 +117,7 @@ class Tests {
if (!check_is_expected_v (d124 - d12, 4))
return 34;
if (!check_is_expected_v (d124 - d14, 2))
if (!check_is_expected_v (d124 - d14, 7))
return 35;
if (!check_is_expected_v (d124 - d24, 1))
return 36;
@@ -120,6 +125,35 @@ class Tests {
if (d124 - d124 != null)
return 37;
SimpleDelegate d1248 = d1 + d2 + d4 + d8;
if (!check_is_expected_v (d1248 - (d1 + d2), 12))
return 41;
if (!check_is_expected_v (d1248 - (d1 + d4), 15))
return 42;
if (!check_is_expected_v (d1248 - (d1 + d8), 15))
return 43;
if (!check_is_expected_v (d1248 - (d2 + d4), 9))
return 44;
if (!check_is_expected_v (d1248 - (d2 + d8), 15))
return 45;
if (!check_is_expected_v (d1248 - (d4 + d8), 3))
return 46;
if (!check_is_expected_v (d1248 - (d1 + d2 + d4), 8))
return 51;
if (!check_is_expected_v (d1248 - (d1 + d2 + d8), 15))
return 52;
if (!check_is_expected_v (d1248 - (d1 + d4 + d8), 15))
return 53;
if (!check_is_expected_v (d1248 - (d2 + d4 + d8), 1))
return 54;
if (!check_is_expected_v (d1248 - (d2 + d4 + d8), 1))
return 54;
if (d1248 - d1248 != null)
return 55;
return 0;
}

View File

@@ -1 +1 @@
0154d608954f93d6ed2e6b6ee373f26cfa68c19d
1c68c9031703e146bcdb2cfd2aeaf5de8a955704

Some files were not shown because too many files have changed in this diff Show More