Imported Upstream version 5.20.0.180

Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-02-04 20:11:37 +00:00
parent 0e2d47d1c8
commit 0510252385
3360 changed files with 83827 additions and 39243 deletions

View File

@@ -8,18 +8,13 @@ LIB_REFS = System Mono.Cecil System.Core
LIB_MCS_FLAGS = /unsafe -D:MONO_DATACONVERTER_STATIC_METHODS /publicsign
KEYFILE = $(LIBRARY_SNK)
TEST_MCS_FLAGS =
TEST_LIB_REFS = Mono.Cecil System System.Core
VALID_TEST_PROFILE := $(filter net_4_x, $(PROFILE))
# The test exe is not profile specific, and compiling a 2.0 will make the 4.5 tests fail
ifdef VALID_TEST_PROFILE
test-local: dtest-app.exe dtest-excfilter.exe
dtest-excfilter.exe: Test/dtest-excfilter.il
$(ILASM) -out:$@ /exe /debug Test/dtest-excfilter.il
test-local: build-dtest
else
@@ -28,20 +23,29 @@ check:
endif
test_output_dir=$(topdir)/class/lib/$(PROFILE)/tests
$(test_output_dir):
mkdir -p $@
build-dtest: $(test_output_dir)/dtest-app.exe $(test_output_dir)/dtest-excfilter.exe
$(test_output_dir)/dtest-excfilter.exe: Test/dtest-excfilter.il | $(test_output_dir)
$(ILASM) -out:$@ /exe /debug Test/dtest-excfilter.il
$(test_output_dir)/dtest-app.exe: Test/dtest-app.cs $(TEST_HELPERS_SOURCES) | $(test_output_dir)
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -out:$@ -unsafe $(PLATFORM_DEBUG_FLAGS) -optimize- Test/dtest-app.cs $(TEST_HELPERS_SOURCES)
TEST_HELPERS_SOURCES = \
../test-helpers/NetworkHelpers.cs \
Test/TypeLoadClass.cs
dtest-app.exe: Test/dtest-app.cs $(TEST_HELPERS_SOURCES)
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -out:$@ -unsafe $(PLATFORM_DEBUG_FLAGS) -optimize- Test/dtest-app.cs $(TEST_HELPERS_SOURCES)
CLEAN_FILES = dtest-app.exe dtest-app.exe.mdb dtest-app.pdb dtest-excfilter.exe dtest-excfilter.exe.mdb dtest-excfilter.pdb
EXTRA_DISTFILES = \
Test/dtest-app.cs \
Test/dtest.cs \
Test/dtest-excfilter.il
Test/dtest-excfilter.il \
$(TEST_HELPERS_SOURCES)
#NO_TEST = yes
CLEAN_FILES = $(addprefix $(test_output_dir)/, dtest-app.exe dtest-app.exe.mdb dtest-app.pdb dtest-excfilter.exe dtest-excfilter.exe.mdb dtest-excfilter.pdb)
include ../../build/library.make

View File

@@ -420,7 +420,7 @@ namespace Mono.Debugger.Soft
* with newer runtimes, and vice versa.
*/
internal const int MAJOR_VERSION = 2;
internal const int MINOR_VERSION = 47;
internal const int MINOR_VERSION = 48;
enum WPSuspendPolicy {
NONE = 0,
@@ -593,6 +593,11 @@ namespace Mono.Debugger.Soft
BINDING_FLAGS_IGNORE_CASE = 0x70000000,
}
enum MemberListTypeExtensions {
CaseSensitive = 1,
CaseInsensitive = 2
}
enum CmdStackFrame {
GET_VALUES = 1,
GET_THIS = 2,
@@ -2319,7 +2324,11 @@ namespace Mono.Debugger.Soft
public long[] Type_GetMethodsByNameFlags (long id, string name, int flags, bool ignoreCase) {
flags |= ignoreCase ? (int)BindingFlagsExtensions.BINDING_FLAGS_IGNORE_CASE : 0;
PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.CMD_TYPE_GET_METHODS_BY_NAME_FLAGS, new PacketWriter ().WriteId (id).WriteString (name).WriteInt (flags));
int listType = ignoreCase ? (int)MemberListTypeExtensions.CaseInsensitive : (int)MemberListTypeExtensions.CaseSensitive;
var w = new PacketWriter ().WriteId (id).WriteString (name).WriteInt (flags);
if (Version.AtLeast (2, 48))
w.WriteInt (listType);
PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.CMD_TYPE_GET_METHODS_BY_NAME_FLAGS, w);
int len = r.ReadInt ();
long[] res = new long [len];
for (int i = 0; i < len; ++i)

View File

@@ -0,0 +1,11 @@
class TypeLoadClass
{
static TypeLoadClass ()
{
}
}
class TypeLoadClass2
{
}

View File

@@ -394,6 +394,7 @@ public class Tests : TestsBase, ITest2
set_ip ();
step_filters ();
pointers ();
ref_return ();
if (args.Length > 0 && args [0] == "local-reflect")
local_reflect ();
if (args.Length > 0 && args [0] == "domain-test")
@@ -491,6 +492,8 @@ public class Tests : TestsBase, ITest2
ss_fp_clobber ();
ss_no_frames ();
ss_await ();
ss_nested_with_three_args_wrapper();
ss_nested_twice_with_two_args_wrapper();
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
@@ -602,6 +605,18 @@ public class Tests : TestsBase, ITest2
ss_nested_with_two_args(ss_nested_arg (), ss_nested_arg ());
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void ss_nested_with_three_args_wrapper () {
ss_nested_with_three_args(ss_nested_arg1 (), ss_nested_arg2 (), ss_nested_arg3 ());
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void ss_nested_twice_with_two_args_wrapper () {
ss_nested_with_two_args(ss_nested_arg1 (), ss_nested_with_two_args(ss_nested_arg2 (), ss_nested_arg3 ()));
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void inspect_enumerator_in_generic_struct() {
TestEnumeratorInsideGenericStruct<String, String> generic_struct = new TestEnumeratorInsideGenericStruct<String, String>(new KeyValuePair<string, string>("0", "f1"));
@@ -612,11 +627,31 @@ public class Tests : TestsBase, ITest2
return a1 + a2;
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static int ss_nested_with_three_args (int a1, int a2, int a3) {
return a1 + a2 + a3;
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static int ss_nested_arg () {
return 0;
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static int ss_nested_arg1 () {
return 0;
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static int ss_nested_arg2 () {
return 0;
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static int ss_nested_arg3 () {
return 0;
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void ss_nested_1 (int i) {
}
@@ -1828,6 +1863,27 @@ public class Tests : TestsBase, ITest2
fixed (int* pa = a)
pointer_arguments (pa, &s);
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void ref_return () {
}
static int ret_val = 1;
public static ref int get_ref_int() {
return ref ret_val;
}
static string ref_return_string = "byref";
public static ref string get_ref_string() {
return ref ref_return_string;
}
static BlittableStruct ref_return_struct = new BlittableStruct () { i = 1, d = 2.0 };
public static ref BlittableStruct get_ref_struct() {
return ref ref_return_struct;
}
}
public class SentinelClass : MarshalByRefObject {

View File

@@ -1 +1 @@
a57e595679838703ee0f1cc00d816eb02c1202dd
b1e11e72870372caded79930ec46585d2f79d6a0