Imported Upstream version 5.16.0.187
Former-commit-id: 83aefde7c5c1ce6488315d41de36788fd0e4e6aa
This commit is contained in:
parent
f454883e6c
commit
e52655b4dc
@ -1 +1 @@
|
||||
999e73cf432733444cb89303f164a7c1a7c08ff5
|
||||
ffc6859b8573983062da73baeea2360c777c88e5
|
@ -1 +1 @@
|
||||
e8f63a034e26d42f071edbd60249cb371a69fece
|
||||
1bf4fa1e23e690a37efb70df0e659d764a410d7d
|
@ -34,7 +34,7 @@ static class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "5.16.0.179";
|
||||
public const string MonoVersion = "5.16.0.187";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -1 +1 @@
|
||||
f1d656ddfaf4560951baf3471d0f0c6abd712997
|
||||
2e51e39aab9b64601e1a0b19399f140eb83e7ac6
|
@ -1 +1 @@
|
||||
09b031c252410334bfebed06278ad03f4d0a698d
|
||||
1804a5c84c5f147785a0ceed802469c78b2fd4b6
|
Binary file not shown.
@ -1 +1 @@
|
||||
8206ed60c16aebe63b2312e667ecee05f1054dd5
|
||||
9d8d7bb14a75f64d3a64d643783be576bb5e43c6
|
@ -1 +1 @@
|
||||
a83ae80f1e5353ac375faeaad5409c8e76959feb
|
||||
4991481149546f46b8b61e0127b87157a3cfbd6b
|
@ -1 +1 @@
|
||||
77305a05d5bf4370d4b0ffffa1a79e4e1ee6c9b2
|
||||
d0b9b2e27397649e7f31b46fdc04ab3f485eeefc
|
@ -1 +1 @@
|
||||
5fddc15872c6299200807541b3bad5bb4e58b722
|
||||
4c7a7604c0a8bab68cb2618e62c636c053befdef
|
@ -1 +1 @@
|
||||
341b615035c56b93ebc3f6857e1063661ff536ec
|
||||
6e86982da5093fbaa11aa4e693d449cff655d0b5
|
@ -1 +1 @@
|
||||
f1d656ddfaf4560951baf3471d0f0c6abd712997
|
||||
2e51e39aab9b64601e1a0b19399f140eb83e7ac6
|
@ -1 +1 @@
|
||||
09b031c252410334bfebed06278ad03f4d0a698d
|
||||
1804a5c84c5f147785a0ceed802469c78b2fd4b6
|
Binary file not shown.
@ -1 +1 @@
|
||||
8206ed60c16aebe63b2312e667ecee05f1054dd5
|
||||
9d8d7bb14a75f64d3a64d643783be576bb5e43c6
|
@ -1 +1 @@
|
||||
a83ae80f1e5353ac375faeaad5409c8e76959feb
|
||||
4991481149546f46b8b61e0127b87157a3cfbd6b
|
@ -1 +1 @@
|
||||
77305a05d5bf4370d4b0ffffa1a79e4e1ee6c9b2
|
||||
d0b9b2e27397649e7f31b46fdc04ab3f485eeefc
|
@ -1 +1 @@
|
||||
5fddc15872c6299200807541b3bad5bb4e58b722
|
||||
4c7a7604c0a8bab68cb2618e62c636c053befdef
|
@ -1 +1 @@
|
||||
341b615035c56b93ebc3f6857e1063661ff536ec
|
||||
6e86982da5093fbaa11aa4e693d449cff655d0b5
|
@ -1 +1 @@
|
||||
f1d656ddfaf4560951baf3471d0f0c6abd712997
|
||||
2e51e39aab9b64601e1a0b19399f140eb83e7ac6
|
@ -1 +1 @@
|
||||
09b031c252410334bfebed06278ad03f4d0a698d
|
||||
1804a5c84c5f147785a0ceed802469c78b2fd4b6
|
Binary file not shown.
@ -1 +1 @@
|
||||
8206ed60c16aebe63b2312e667ecee05f1054dd5
|
||||
9d8d7bb14a75f64d3a64d643783be576bb5e43c6
|
@ -1 +1 @@
|
||||
a83ae80f1e5353ac375faeaad5409c8e76959feb
|
||||
4991481149546f46b8b61e0127b87157a3cfbd6b
|
@ -1 +1 @@
|
||||
77305a05d5bf4370d4b0ffffa1a79e4e1ee6c9b2
|
||||
d0b9b2e27397649e7f31b46fdc04ab3f485eeefc
|
@ -1 +1 @@
|
||||
5fddc15872c6299200807541b3bad5bb4e58b722
|
||||
4c7a7604c0a8bab68cb2618e62c636c053befdef
|
@ -1 +1 @@
|
||||
341b615035c56b93ebc3f6857e1063661ff536ec
|
||||
6e86982da5093fbaa11aa4e693d449cff655d0b5
|
@ -1,5 +1,11 @@
|
||||
// #define ARCH_32
|
||||
#define NINT_JIT_OPTIMIZED
|
||||
|
||||
/* This is _NOT_ set by Xamarin.iOS. We can enable it in order to make sure
|
||||
* methods are intrinsified (by throwing NotImplementedException), but some
|
||||
* methods aren't intrinsified by JIT/interp. For example, conversion to
|
||||
* decimal. Therefore JIT/interp should fall back to managed implementation.
|
||||
*/
|
||||
// #define NINT_JIT_OPTIMIZED
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
@ -27,6 +33,7 @@ public class BuiltinTests {
|
||||
{
|
||||
var x = (nint)10;
|
||||
var y = (nint)20L;
|
||||
int z = 30;
|
||||
|
||||
if ((int)x != 10)
|
||||
return 1;
|
||||
@ -36,6 +43,8 @@ public class BuiltinTests {
|
||||
return 3;
|
||||
if ((long)y != 20L)
|
||||
return 4;
|
||||
if ((nint)z != 30)
|
||||
return 5;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -239,14 +248,47 @@ public class BuiltinTests {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// static int test_0_nint_call_boxed_equals ()
|
||||
// {
|
||||
// object x = new nint (10);
|
||||
// object y = new nint (10);
|
||||
// if (!x.Equals (y))
|
||||
// return 1;
|
||||
// return 0;
|
||||
// }
|
||||
static int test_0_nint_compareto ()
|
||||
{
|
||||
if (((nint) 0).CompareTo ((nint) 0) != 0)
|
||||
return 1;
|
||||
if (((nint) 0).CompareTo ((nint) 1) != -1)
|
||||
return 2;
|
||||
if (((nint) 1).CompareTo ((nint) 0) != 1)
|
||||
return 3;
|
||||
|
||||
if (((nint) 0).CompareTo ((object)(nint) 0) != 0)
|
||||
return 4;
|
||||
if (((nint) 0).CompareTo ((object)(nint) 1) != -1)
|
||||
return 5;
|
||||
if (((nint) 1).CompareTo ((object)(nint) 0) != 1)
|
||||
return 6;
|
||||
|
||||
if (((nint) 1).CompareTo (null) != 1)
|
||||
return 7;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nint_call_boxed_equals ()
|
||||
{
|
||||
object x = new nint (10);
|
||||
object y = new nint (10);
|
||||
if (!x.Equals (y))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nint_equals ()
|
||||
{
|
||||
if (!((nint) 0).Equals ((nint) 0))
|
||||
return 1;
|
||||
if (!((nint) 0).Equals ((object) (nint) 0))
|
||||
return 2;
|
||||
if (((nint) 0).Equals (null))
|
||||
return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nint_call_boxed_funs ()
|
||||
{
|
||||
@ -259,7 +301,41 @@ public class BuiltinTests {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int test_0_nint_unboxed_member_calls ()
|
||||
static int test_0_nint_tostring ()
|
||||
{
|
||||
int x = 1337;
|
||||
if (((nint) x).ToString () != "1337")
|
||||
return 1;
|
||||
x = -1337;
|
||||
if (((nint) x).ToString () != "-1337")
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
static bool decimal_cmp (decimal a, decimal b)
|
||||
{
|
||||
return a == b;
|
||||
}
|
||||
|
||||
static int test_0_nint_implicit_decimal ()
|
||||
{
|
||||
nint a = new nint (10);
|
||||
nint b = new nint (9);
|
||||
if (decimal_cmp (a, b))
|
||||
return 1;
|
||||
b++;
|
||||
if (!decimal_cmp (a, b))
|
||||
return 2;
|
||||
if (!decimal_cmp ((nint) 10, b))
|
||||
return 3;
|
||||
if (!decimal_cmp (a, (nint) 10))
|
||||
return 4;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nint_unboxed_member_calls ()
|
||||
{
|
||||
var x = (nint)10;
|
||||
#if FALSE
|
||||
@ -271,6 +347,81 @@ public class BuiltinTests {
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct SomeNativeStructWithNint {
|
||||
public nint a;
|
||||
public static nint b;
|
||||
|
||||
public SomeNativeStructWithNint (nint a)
|
||||
{
|
||||
this.a = a;
|
||||
b = a + 1;
|
||||
}
|
||||
|
||||
public static nint GetAStatic (SomeNativeStructWithNint x)
|
||||
{
|
||||
return x.a;
|
||||
}
|
||||
|
||||
public nint GetA ()
|
||||
{
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
class SomeClassWithNint {
|
||||
public nint a;
|
||||
|
||||
public SomeClassWithNint (nint a)
|
||||
{
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
public virtual nint GetAVirtual ()
|
||||
{
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
public int test_0_nint_fieldload ()
|
||||
{
|
||||
var x = new SomeNativeStructWithNint ((nint) 20f);
|
||||
|
||||
if ((float) x.a != 20f)
|
||||
return 1;
|
||||
|
||||
if ((int) x.a != 20)
|
||||
return 2;
|
||||
|
||||
if ((float) SomeNativeStructWithNint.GetAStatic (x) != 20f)
|
||||
return 3;
|
||||
|
||||
if ((float) x.GetA () != 20f)
|
||||
return 4;
|
||||
|
||||
if ((int) SomeNativeStructWithNint.GetAStatic (x) != 20)
|
||||
return 5;
|
||||
|
||||
if ((int) x.GetA () != 20)
|
||||
return 6;
|
||||
|
||||
if ((float) SomeNativeStructWithNint.b != 21f)
|
||||
return 7;
|
||||
|
||||
if ((int) SomeNativeStructWithNint.b != 21)
|
||||
return 8;
|
||||
|
||||
SomeClassWithNint y = new SomeClassWithNint ((nint) 30f);
|
||||
|
||||
if ((int) y.GetAVirtual () != 30)
|
||||
return 9;
|
||||
|
||||
if ((float) y.GetAVirtual () != 30f)
|
||||
return 10;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int test_0_nuint_ctor ()
|
||||
{
|
||||
var x = new nuint (10u);
|
||||
@ -289,6 +440,7 @@ public class BuiltinTests {
|
||||
{
|
||||
var x = (nuint)10;
|
||||
var y = (nuint)20L;
|
||||
int z = 30;
|
||||
|
||||
if ((uint)x != 10)
|
||||
return 1;
|
||||
@ -298,6 +450,8 @@ public class BuiltinTests {
|
||||
return 3;
|
||||
if ((ulong)y != 20L)
|
||||
return 4;
|
||||
if ((nuint)z != 30)
|
||||
return 5;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -501,14 +655,47 @@ public class BuiltinTests {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// static int test_0_nuint_call_boxed_equals ()
|
||||
// {
|
||||
// object x = new nuint (10);
|
||||
// object y = new nuint (10);
|
||||
// if (!x.Equals (y))
|
||||
// return 1;
|
||||
// return 0;
|
||||
// }
|
||||
static int test_0_nuint_compareto ()
|
||||
{
|
||||
if (((nuint) 0).CompareTo ((nuint) 0) != 0)
|
||||
return 1;
|
||||
if (((nuint) 0).CompareTo ((nuint) 1) != -1)
|
||||
return 2;
|
||||
if (((nuint) 1).CompareTo ((nuint) 0) != 1)
|
||||
return 3;
|
||||
|
||||
if (((nuint) 0).CompareTo ((object)(nuint) 0) != 0)
|
||||
return 4;
|
||||
if (((nuint) 0).CompareTo ((object)(nuint) 1) != -1)
|
||||
return 5;
|
||||
if (((nuint) 1).CompareTo ((object)(nuint) 0) != 1)
|
||||
return 6;
|
||||
|
||||
if (((nuint) 1).CompareTo (null) != 1)
|
||||
return 7;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nuint_call_boxed_equals ()
|
||||
{
|
||||
object x = new nuint (10);
|
||||
object y = new nuint (10);
|
||||
if (!x.Equals (y))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nuint_equals ()
|
||||
{
|
||||
if (!((nuint) 0).Equals ((nuint) 0))
|
||||
return 1;
|
||||
if (!((nuint) 0).Equals ((object) (nuint) 0))
|
||||
return 2;
|
||||
if (((nuint) 0).Equals (null))
|
||||
return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nuint_call_boxed_funs ()
|
||||
{
|
||||
@ -521,7 +708,35 @@ public class BuiltinTests {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int test_0_nuint_unboxed_member_calls ()
|
||||
static int test_0_nuint_tostring ()
|
||||
{
|
||||
int x = 1337;
|
||||
if (((nuint) x).ToString () != "1337")
|
||||
return 1;
|
||||
x = -1337;
|
||||
if (((nuint) x).ToString () == "-1337")
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nuint_implicit_decimal ()
|
||||
{
|
||||
nuint a = new nuint (10);
|
||||
nuint b = new nuint (9);
|
||||
if (decimal_cmp (a, b))
|
||||
return 1;
|
||||
b++;
|
||||
if (!decimal_cmp (a, b))
|
||||
return 2;
|
||||
if (!decimal_cmp ((nuint) 10, b))
|
||||
return 3;
|
||||
if (!decimal_cmp (a, (nuint) 10))
|
||||
return 4;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nuint_unboxed_member_calls ()
|
||||
{
|
||||
var x = (nuint)10;
|
||||
#if FALSE
|
||||
@ -533,6 +748,80 @@ public class BuiltinTests {
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct SomeNativeStructWithNuint {
|
||||
public nuint a;
|
||||
public static nuint b;
|
||||
|
||||
public SomeNativeStructWithNuint (nuint a)
|
||||
{
|
||||
this.a = a;
|
||||
b = a + 1;
|
||||
}
|
||||
|
||||
public static nuint GetAStatic (SomeNativeStructWithNuint x)
|
||||
{
|
||||
return x.a;
|
||||
}
|
||||
|
||||
public nuint GetA ()
|
||||
{
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
class SomeClassWithNuint {
|
||||
public nuint a;
|
||||
|
||||
public SomeClassWithNuint (nuint a)
|
||||
{
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
public virtual nuint GetAVirtual ()
|
||||
{
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
public int test_0_nuint_fieldload ()
|
||||
{
|
||||
var x = new SomeNativeStructWithNuint ((nuint) 20f);
|
||||
|
||||
if ((float) x.a != 20f)
|
||||
return 1;
|
||||
|
||||
if ((int) x.a != 20)
|
||||
return 2;
|
||||
|
||||
if ((float) SomeNativeStructWithNuint.GetAStatic (x) != 20f)
|
||||
return 3;
|
||||
|
||||
if ((float) x.GetA () != 20f)
|
||||
return 4;
|
||||
|
||||
if ((int) SomeNativeStructWithNuint.GetAStatic (x) != 20)
|
||||
return 5;
|
||||
|
||||
if ((int) x.GetA () != 20)
|
||||
return 6;
|
||||
|
||||
if ((float) SomeNativeStructWithNuint.b != 21f)
|
||||
return 7;
|
||||
|
||||
if ((int) SomeNativeStructWithNuint.b != 21)
|
||||
return 8;
|
||||
|
||||
SomeClassWithNuint y = new SomeClassWithNuint ((nuint) 30f);
|
||||
|
||||
if ((int) y.GetAVirtual () != 30)
|
||||
return 9;
|
||||
|
||||
if ((float) y.GetAVirtual () != 30f)
|
||||
return 10;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nfloat_ctor ()
|
||||
{
|
||||
var x = new nfloat (10.0f);
|
||||
@ -562,6 +851,12 @@ public class BuiltinTests {
|
||||
if ((double)y != 20)
|
||||
return 4;
|
||||
#endif
|
||||
int z = 30;
|
||||
if ((nfloat) z != 30f)
|
||||
return 5;
|
||||
|
||||
if ((int) x != 10)
|
||||
return 6;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -754,20 +1049,137 @@ public class BuiltinTests {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nfloat_isinfinity ()
|
||||
{
|
||||
var x = (nfloat) float.NaN;
|
||||
if (nfloat.IsInfinity (x))
|
||||
return 1;
|
||||
if (nfloat.IsInfinity (12))
|
||||
return 2;
|
||||
if (!nfloat.IsInfinity (nfloat.PositiveInfinity))
|
||||
return 3;
|
||||
if (!nfloat.IsInfinity (nfloat.NegativeInfinity))
|
||||
return 4;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nfloat_isnegativeinfinity ()
|
||||
{
|
||||
var x = (nfloat) float.NaN;
|
||||
if (nfloat.IsNegativeInfinity (x))
|
||||
return 1;
|
||||
if (nfloat.IsNegativeInfinity (12))
|
||||
return 2;
|
||||
if (nfloat.IsNegativeInfinity (nfloat.PositiveInfinity))
|
||||
return 3;
|
||||
if (!nfloat.IsNegativeInfinity (nfloat.NegativeInfinity))
|
||||
return 4;
|
||||
|
||||
float f = float.NegativeInfinity;
|
||||
nfloat n = (nfloat) f;
|
||||
if (!nfloat.IsNegativeInfinity (n))
|
||||
return 5;
|
||||
|
||||
double d = double.NegativeInfinity;
|
||||
n = (nfloat) d;
|
||||
if (!nfloat.IsNegativeInfinity (n))
|
||||
return 6;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nfloat_ispositiveinfinity ()
|
||||
{
|
||||
var x = (nfloat) float.NaN;
|
||||
if (nfloat.IsPositiveInfinity (x))
|
||||
return 1;
|
||||
if (nfloat.IsPositiveInfinity (12))
|
||||
return 2;
|
||||
if (!nfloat.IsPositiveInfinity (nfloat.PositiveInfinity))
|
||||
return 3;
|
||||
if (nfloat.IsPositiveInfinity (nfloat.NegativeInfinity))
|
||||
return 4;
|
||||
|
||||
float f = float.PositiveInfinity;
|
||||
nfloat n = (nfloat) f;
|
||||
if (!nfloat.IsPositiveInfinity (n))
|
||||
return 5;
|
||||
|
||||
double d = double.PositiveInfinity;
|
||||
n = (nfloat) d;
|
||||
if (!nfloat.IsPositiveInfinity (n))
|
||||
return 6;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nfloat_isnan ()
|
||||
{
|
||||
var x = (nfloat) float.NaN;
|
||||
return nfloat.IsNaN (x) ? 0 : 1;
|
||||
if (!nfloat.IsNaN (x))
|
||||
return 1;
|
||||
if (nfloat.IsNaN (12))
|
||||
return 2;
|
||||
if (nfloat.IsNaN (nfloat.PositiveInfinity))
|
||||
return 3;
|
||||
if (nfloat.IsNaN (nfloat.NegativeInfinity))
|
||||
return 4;
|
||||
|
||||
float f = float.NaN;
|
||||
nfloat n = (nfloat) f;
|
||||
if (!nfloat.IsNaN (n))
|
||||
return 5;
|
||||
|
||||
double d = double.NaN;
|
||||
n = (nfloat) d;
|
||||
if (!nfloat.IsNaN (n))
|
||||
return 6;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// static int test_0_nfloat_call_boxed_equals ()
|
||||
// {
|
||||
// object x = new nfloat (10f);
|
||||
// object y = new nfloat (10f);
|
||||
// if (!x.Equals (y))
|
||||
// return 1;
|
||||
// return 0;
|
||||
// }
|
||||
static int test_0_nfloat_compareto ()
|
||||
{
|
||||
if (((nfloat) 0).CompareTo ((nfloat) 0) != 0)
|
||||
return 1;
|
||||
if (((nfloat) 0).CompareTo ((nfloat) 1) != -1)
|
||||
return 2;
|
||||
if (((nfloat) 1).CompareTo ((nfloat) 0) != 1)
|
||||
return 3;
|
||||
|
||||
if (((nfloat) 0).CompareTo ((object)(nfloat) 0) != 0)
|
||||
return 4;
|
||||
if (((nfloat) 0).CompareTo ((object)(nfloat) 1) != -1)
|
||||
return 5;
|
||||
if (((nfloat) 1).CompareTo ((object)(nfloat) 0) != 1)
|
||||
return 6;
|
||||
|
||||
if (((nfloat) 1).CompareTo (null) != 1)
|
||||
return 7;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nfloat_call_boxed_equals ()
|
||||
{
|
||||
object x = new nfloat (10f);
|
||||
object y = new nfloat (10f);
|
||||
if (!x.Equals (y))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nfloat_equals ()
|
||||
{
|
||||
if (!((nfloat) 0).Equals ((nfloat) 0))
|
||||
return 1;
|
||||
if (!((nfloat) 0).Equals ((object) (nfloat) 0))
|
||||
return 2;
|
||||
if (((nfloat) 0).Equals (null))
|
||||
return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nfloat_call_boxed_funs ()
|
||||
{
|
||||
@ -780,7 +1192,36 @@ public class BuiltinTests {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int test_0_nfloat_unboxed_member_calls ()
|
||||
static int test_0_nfloat_tostring ()
|
||||
{
|
||||
float x = 1337.0f;
|
||||
nfloat y = (nfloat) x;
|
||||
if (y.ToString () != "1337")
|
||||
return 1;
|
||||
x = -1337.0f;
|
||||
if (((nfloat) x).ToString () != "-1337")
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nfloat_explicit_decimal ()
|
||||
{
|
||||
nfloat a = new nfloat (10);
|
||||
nfloat b = new nfloat (9);
|
||||
if (decimal_cmp ((decimal) a, (decimal) b))
|
||||
return 1;
|
||||
b += 1.0f;
|
||||
if (!decimal_cmp ((decimal) a, (decimal) b))
|
||||
return 2;
|
||||
if (!decimal_cmp ((decimal) (nfloat) 10.0f, (decimal) b))
|
||||
return 3;
|
||||
if (!decimal_cmp ((decimal) a, (decimal) (nfloat) 10.0f))
|
||||
return 4;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int test_0_nfloat_unboxed_member_calls ()
|
||||
{
|
||||
var x = (nfloat)10f;
|
||||
#if FALSE
|
||||
@ -792,6 +1233,80 @@ public class BuiltinTests {
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct SomeNativeStructWithNfloat {
|
||||
public nfloat a;
|
||||
public static nfloat b;
|
||||
|
||||
public SomeNativeStructWithNfloat (nfloat a)
|
||||
{
|
||||
this.a = a;
|
||||
b = a + 1;
|
||||
}
|
||||
|
||||
public static nfloat GetAStatic (SomeNativeStructWithNfloat x)
|
||||
{
|
||||
return x.a;
|
||||
}
|
||||
|
||||
public nfloat GetA ()
|
||||
{
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
class SomeClassWithNfloat {
|
||||
public nfloat a;
|
||||
|
||||
public SomeClassWithNfloat (nfloat a)
|
||||
{
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
public virtual nfloat GetAVirtual ()
|
||||
{
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
public int test_0_nfloat_fieldload ()
|
||||
{
|
||||
var x = new SomeNativeStructWithNfloat ((nfloat) 20f);
|
||||
|
||||
if ((float) x.a != 20f)
|
||||
return 1;
|
||||
|
||||
if ((int) x.a != 20)
|
||||
return 2;
|
||||
|
||||
if ((float) SomeNativeStructWithNfloat.GetAStatic (x) != 20f)
|
||||
return 3;
|
||||
|
||||
if ((float) x.GetA () != 20f)
|
||||
return 4;
|
||||
|
||||
if ((int) SomeNativeStructWithNfloat.GetAStatic (x) != 20)
|
||||
return 5;
|
||||
|
||||
if ((int) x.GetA () != 20)
|
||||
return 6;
|
||||
|
||||
if ((float) SomeNativeStructWithNfloat.b != 21f)
|
||||
return 7;
|
||||
|
||||
if ((int) SomeNativeStructWithNfloat.b != 21)
|
||||
return 8;
|
||||
|
||||
SomeClassWithNfloat y = new SomeClassWithNfloat ((nfloat) 30f);
|
||||
|
||||
if ((int) y.GetAVirtual () != 30)
|
||||
return 9;
|
||||
|
||||
if ((float) y.GetAVirtual () != 30f)
|
||||
return 10;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !__MOBILE__
|
||||
public static int Main (String[] args) {
|
||||
return TestDriver.RunTests (typeof (BuiltinTests), args);
|
||||
|
@ -59,6 +59,7 @@ typedef struct {
|
||||
gint32 lo;
|
||||
gint32 hi;
|
||||
} pair;
|
||||
float f_r4;
|
||||
double f;
|
||||
/* native size integer and pointer types */
|
||||
gpointer p;
|
||||
|
@ -1 +1 @@
|
||||
272c87416beb6b1f2c81432b9f635d7ead8264f5
|
||||
c5e269f4afe7f230bba93c2338bdb0c81f8727ef
|
@ -183,80 +183,104 @@ OPDEF(MINT_CHECKPOINT, "checkpoint", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_BRFALSE_I4, "brfalse.i4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BRFALSE_I8, "brfalse.i8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BRFALSE_R4, "brfalse.r4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BRFALSE_R8, "brfalse.r8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BRTRUE_I4, "brtrue.i4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BRTRUE_I8, "brtrue.i8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BRTRUE_R4, "brtrue.r4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BRTRUE_R8, "brtrue.r8", 3, MintOpBranch)
|
||||
|
||||
OPDEF(MINT_BRFALSE_I4_S, "brfalse.i4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BRFALSE_I8_S, "brfalse.i8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BRFALSE_R4_S, "brfalse.r4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BRFALSE_R8_S, "brfalse.r8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BRTRUE_I4_S, "brtrue.i4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BRTRUE_I8_S, "brtrue.i8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BRTRUE_R4_S, "brtrue.r4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BRTRUE_R8_S, "brtrue.r8.s", 2, MintOpShortBranch)
|
||||
|
||||
OPDEF(MINT_BEQ_I4, "beq.i4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BEQ_I8, "beq.i8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BEQ_R4, "beq.r4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BEQ_R8, "beq.r8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGE_I4, "bge.i4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGE_I8, "bge.i8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGE_R4, "bge.r4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGE_R8, "bge.r8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGT_I4, "bgt.i4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGT_I8, "bgt.i8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGT_R4, "bgt.r4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGT_R8, "bgt.r8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLT_I4, "blt.i4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLT_I8, "blt.i8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLT_R4, "blt.r4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLT_R8, "blt.r8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLE_I4, "ble.i4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLE_I8, "ble.i8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLE_R4, "ble.r4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLE_R8, "ble.r8", 3, MintOpBranch)
|
||||
|
||||
OPDEF(MINT_BNE_UN_I4, "bne.un.i4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BNE_UN_I8, "bne.un.i8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BNE_UN_R4, "bne.un.r4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BNE_UN_R8, "bne.un.r8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGE_UN_I4, "bge.un.i4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGE_UN_I8, "bge.un.i8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGE_UN_R4, "bge.un.r4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGE_UN_R8, "bge.un.r8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGT_UN_I4, "bgt.un.i4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGT_UN_I8, "bgt.un.i8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGT_UN_R4, "bgt.un.r4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BGT_UN_R8, "bgt.un.r8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLE_UN_I4, "ble.un.i4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLE_UN_I8, "ble.un.i8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLE_UN_R4, "ble.un.r4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLE_UN_R8, "ble.un.r8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLT_UN_I4, "blt.un.i4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLT_UN_I8, "blt.un.i8", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLT_UN_R4, "blt.un.r4", 3, MintOpBranch)
|
||||
OPDEF(MINT_BLT_UN_R8, "blt.un.r8", 3, MintOpBranch)
|
||||
|
||||
OPDEF(MINT_BEQ_I4_S, "beq.i4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BEQ_I8_S, "beq.i8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BEQ_R4_S, "beq.r4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BEQ_R8_S, "beq.r8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGE_I4_S, "bge.i4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGE_I8_S, "bge.i8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGE_R4_S, "bge.r4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGE_R8_S, "bge.r8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGT_I4_S, "bgt.i4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGT_I8_S, "bgt.i8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGT_R4_S, "bgt.r4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGT_R8_S, "bgt.r8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLT_I4_S, "blt.i4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLT_I8_S, "blt.i8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLT_R4_S, "blt.r4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLT_R8_S, "blt.r8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLE_I4_S, "ble.i4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLE_I8_S, "ble.i8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLE_R4_S, "ble.r4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLE_R8_S, "ble.r8.s", 2, MintOpShortBranch)
|
||||
|
||||
OPDEF(MINT_BNE_UN_I4_S, "bne.un.i4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BNE_UN_I8_S, "bne.un.i8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BNE_UN_R4_S, "bne.un.r4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BNE_UN_R8_S, "bne.un.r8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGE_UN_I4_S, "bge.un.i4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGE_UN_I8_S, "bge.un.i8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGE_UN_R4_S, "bge.un.r4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGE_UN_R8_S, "bge.un.r8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGT_UN_I4_S, "bgt.un.i4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGT_UN_I8_S, "bgt.un.i8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGT_UN_R4_S, "bgt.un.r4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BGT_UN_R8_S, "bgt.un.r8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLE_UN_I4_S, "ble.un.i4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLE_UN_I8_S, "ble.un.i8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLE_UN_R4_S, "ble.un.r4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLE_UN_R8_S, "ble.un.r8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLT_UN_I4_S, "blt.un.i4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLT_UN_I8_S, "blt.un.i8.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLT_UN_R4_S, "blt.un.r4.s", 2, MintOpShortBranch)
|
||||
OPDEF(MINT_BLT_UN_R8_S, "blt.un.r8.s", 2, MintOpShortBranch)
|
||||
|
||||
OPDEF(MINT_SWITCH, "switch", 0, MintOpSwitch)
|
||||
@ -335,6 +359,7 @@ OPDEF(MINT_GETITEM_SPAN, "getitem.span", 4, MintOpShortAndInt)
|
||||
|
||||
OPDEF(MINT_ADD_I4, "add.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_ADD_I8, "add.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_ADD_R4, "add.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_ADD_R8, "add.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_ADD1_I4, "add1.i4", 1, MintOpNoArgs)
|
||||
@ -342,6 +367,7 @@ OPDEF(MINT_ADD1_I8, "add1.i8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_SUB_I4, "sub.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_SUB_I8, "sub.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_SUB_R4, "sub.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_SUB_R8, "sub.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_SUB1_I4, "sub1.i4", 1, MintOpNoArgs)
|
||||
@ -349,10 +375,12 @@ OPDEF(MINT_SUB1_I8, "sub1.i8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_MUL_I4, "mul.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_MUL_I8, "mul.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_MUL_R4, "mul.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_MUL_R8, "mul.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_DIV_I4, "div.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_DIV_I8, "div.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_DIV_R4, "div.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_DIV_R8, "div.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_DIV_UN_I4, "div.un.i4", 1, MintOpNoArgs)
|
||||
@ -378,6 +406,7 @@ OPDEF(MINT_SUB_OVF_UN_I8, "sub.ovf.un.i8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_NEG_I4, "neg.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_NEG_I8, "neg.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_NEG_R4, "neg.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_NEG_R8, "neg.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_NOT_I4, "not.i4", 1, MintOpNoArgs)
|
||||
@ -394,6 +423,7 @@ OPDEF(MINT_XOR_I8, "xor.i8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_REM_I4, "rem.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_REM_I8, "rem.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_REM_R4, "rem.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_REM_R8, "rem.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_REM_UN_I4, "rem.un.i4", 1, MintOpNoArgs)
|
||||
@ -411,28 +441,35 @@ OPDEF(MINT_CONV_R_UN_I8, "conv.r.un.i8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_I1_I4, "conv.i1.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_I1_I8, "conv.i1.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_I1_R4, "conv.i1.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_I1_R8, "conv.i1.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_U1_I4, "conv.u1.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_U1_I8, "conv.u1.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_U1_R4, "conv.u1.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_U1_R8, "conv.u1.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_I2_I4, "conv.i2.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_I2_I8, "conv.i2.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_I2_R4, "conv.i2.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_I2_R8, "conv.i2.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_U2_I4, "conv.u2.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_U2_I8, "conv.u2.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_U2_R4, "conv.u2.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_U2_R8, "conv.u2.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_I4_I8, "conv.i4.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_I4_R4, "conv.i4.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_I4_R8, "conv.i4.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_U4_I8, "conv.u4.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_U4_R4, "conv.u4.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_U4_R8, "conv.u4.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_I8_I4, "conv.i8.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_I8_U4, "conv.i8.u4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_I8_R4, "conv.i8.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_I8_R8, "conv.i8.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_R4_I4, "conv.r4.i4", 1, MintOpNoArgs)
|
||||
@ -441,11 +478,14 @@ OPDEF(MINT_CONV_R4_R8, "conv.r4.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_R8_I4, "conv.r8.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_R8_I8, "conv.r8.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_R8_R4, "conv.r8.r4", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_I4_I8_SP, "conv.i4.i8.sp", 1, MintOpNoArgs) /* special for narrowing sp[-2] on 64 bits */
|
||||
OPDEF(MINT_CONV_I8_I4_SP, "conv.i8.i4.sp", 1, MintOpNoArgs) /* special for widening sp[-2] on 64 bits */
|
||||
OPDEF(MINT_CONV_R8_R4_SP, "conv.r8.r4.sp", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_U8_I4, "conv.u8.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_U8_R4, "conv.u8.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_U8_R8, "conv.u8.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_OVF_I1_I4, "conv.ovf.i1.i4", 1, MintOpNoArgs)
|
||||
@ -467,6 +507,7 @@ OPDEF(MINT_CONV_OVF_U2_R8, "conv.ovf.u2.r8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_I4_U4, "conv.ovf.i4.u4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_I4_I8, "conv.ovf.i4.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_I4_U8, "conv.ovf.i4.u8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_I4_R4, "conv.ovf.i4.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_I4_R8, "conv.ovf.i4.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_OVF_I4_UN_I8, "conv.ovf.i4.un.i8", 1, MintOpNoArgs)
|
||||
@ -474,33 +515,40 @@ OPDEF(MINT_CONV_OVF_I4_UN_R8, "conv.ovf.i4.un.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_OVF_U4_I4, "conv.ovf.u4.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_U4_I8, "conv.ovf.u4.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_U4_R4, "conv.ovf.u4.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_U4_R8, "conv.ovf.u4.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_OVF_I8_U8, "conv.ovf.i8.u8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_I8_R4, "conv.ovf.i8.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_I8_R8, "conv.ovf.i8.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_OVF_I8_UN_R8, "conv.ovf.i8.un.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CONV_OVF_U8_I4, "conv.ovf.u8.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_U8_I8, "conv.ovf.u8.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_U8_R4, "conv.ovf.u8.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CONV_OVF_U8_R8, "conv.ovf.u8.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CEQ_I4, "ceq.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CEQ_I8, "ceq.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CEQ_R4, "ceq.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CEQ_R8, "ceq.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CNE_I4, "cne.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CNE_I8, "cne.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CNE_R4, "cne.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CNE_R8, "cne.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CEQ0_I4, "ceq0.i4", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CGT_I4, "cgt.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CGT_I8, "cgt.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CGT_R4, "cgt.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CGT_R8, "cgt.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CGE_I4, "cge.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CGE_I8, "cge.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CGE_R4, "cge.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CGE_R8, "cge.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CGE_UN_I4, "cge.un.i4", 1, MintOpNoArgs)
|
||||
@ -508,14 +556,17 @@ OPDEF(MINT_CGE_UN_I8, "cge.un.i8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CGT_UN_I4, "cgt.un.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CGT_UN_I8, "cgt.un.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CGT_UN_R4, "cgt.un.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CGT_UN_R8, "cgt.un.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CLT_I4, "clt.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CLT_I8, "clt.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CLT_R4, "clt.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CLT_R8, "clt.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CLE_I4, "cle.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CLE_I8, "cle.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CLE_R4, "cle.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CLE_R8, "cle.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CLE_UN_I4, "cle.un.i4", 1, MintOpNoArgs)
|
||||
@ -523,6 +574,7 @@ OPDEF(MINT_CLE_UN_I8, "cle.un.i8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CLT_UN_I4, "clt.un.i4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CLT_UN_I8, "clt.un.i8", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CLT_UN_R4, "clt.un.r4", 1, MintOpNoArgs)
|
||||
OPDEF(MINT_CLT_UN_R8, "clt.un.r8", 1, MintOpNoArgs)
|
||||
|
||||
OPDEF(MINT_CKFINITE, "ckfinite", 1, MintOpNoArgs)
|
||||
|
@ -1 +1 @@
|
||||
77cce7da80d67381efcaaa44dca2990738cd9dd6
|
||||
0cfdf0afdcc0aba826255ac02d2a8ecbd50ed2e9
|
@ -127,14 +127,14 @@ static const MagicTypeInfo type_info[] = {
|
||||
};
|
||||
|
||||
|
||||
static inline gboolean
|
||||
type_size (MonoCompile *cfg, MonoType *type)
|
||||
gsize
|
||||
mini_magic_type_size (MonoCompile *cfg, MonoType *type)
|
||||
{
|
||||
if (type->type == MONO_TYPE_I4 || type->type == MONO_TYPE_U4)
|
||||
return 4;
|
||||
else if (type->type == MONO_TYPE_I8 || type->type == MONO_TYPE_U8)
|
||||
return 8;
|
||||
else if (type->type == MONO_TYPE_R4 && !type->byref && cfg->r4fp)
|
||||
else if (type->type == MONO_TYPE_R4 && !type->byref && (!cfg || cfg->r4fp))
|
||||
return 4;
|
||||
else if (type->type == MONO_TYPE_R8 && !type->byref)
|
||||
return 8;
|
||||
@ -143,9 +143,6 @@ type_size (MonoCompile *cfg, MonoType *type)
|
||||
|
||||
#ifndef DISABLE_JIT
|
||||
|
||||
static gboolean is_int_type (MonoType *t);
|
||||
static gboolean is_float_type (MonoType *t);
|
||||
|
||||
static MonoInst*
|
||||
emit_narrow (MonoCompile *cfg, const MagicTypeInfo *info, int sreg)
|
||||
{
|
||||
@ -195,16 +192,16 @@ emit_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
}
|
||||
|
||||
if (!strcmp ("op_Implicit", name) || !strcmp ("op_Explicit", name)) {
|
||||
int source_size = type_size (cfg, fsig->params [0]);
|
||||
int dest_size = type_size (cfg, fsig->ret);
|
||||
int source_size = mini_magic_type_size (cfg, fsig->params [0]);
|
||||
int dest_size = mini_magic_type_size (cfg, fsig->ret);
|
||||
|
||||
switch (info->big_stack_type) {
|
||||
case STACK_I8:
|
||||
if (!is_int_type (fsig->params [0]) || !is_int_type (fsig->ret))
|
||||
if (!mini_magic_is_int_type (fsig->params [0]) || !mini_magic_is_int_type (fsig->ret))
|
||||
return NULL;
|
||||
break;
|
||||
case STACK_R8:
|
||||
if (!is_float_type (fsig->params [0]) || !is_float_type (fsig->ret))
|
||||
if (!mini_magic_is_float_type (fsig->params [0]) || !mini_magic_is_float_type (fsig->ret))
|
||||
return NULL;
|
||||
break;
|
||||
default:
|
||||
@ -226,7 +223,7 @@ emit_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
if (!strcmp (".ctor", name)) {
|
||||
gboolean is_ldaddr = args [0]->opcode == OP_LDADDR;
|
||||
int arg0 = args [1]->dreg;
|
||||
int arg_size = type_size (cfg, fsig->params [0]);
|
||||
int arg_size = mini_magic_type_size (cfg, fsig->params [0]);
|
||||
|
||||
if (arg_size > SIZEOF_VOID_P) //8 -> 4
|
||||
arg0 = emit_narrow (cfg, info, arg0)->dreg;
|
||||
@ -449,16 +446,16 @@ mono_class_is_magic_float (MonoClass *klass)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_int_type (MonoType *t)
|
||||
gboolean
|
||||
mini_magic_is_int_type (MonoType *t)
|
||||
{
|
||||
if (t->type != MONO_TYPE_I4 && t->type != MONO_TYPE_I8 && t->type != MONO_TYPE_U4 && t->type != MONO_TYPE_U8 && !mono_class_is_magic_int (mono_class_from_mono_type (t)))
|
||||
if (t->type != MONO_TYPE_I && t->type != MONO_TYPE_I4 && t->type != MONO_TYPE_I8 && t->type != MONO_TYPE_U4 && t->type != MONO_TYPE_U8 && !mono_class_is_magic_int (mono_class_from_mono_type (t)))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_float_type (MonoType *t)
|
||||
gboolean
|
||||
mini_magic_is_float_type (MonoType *t)
|
||||
{
|
||||
if (t->type != MONO_TYPE_R4 && t->type != MONO_TYPE_R8 && !mono_class_is_magic_float (mono_class_from_mono_type (t)))
|
||||
return FALSE;
|
||||
|
@ -1 +1 @@
|
||||
64231b50d67cdac68b1aaee8cf93c7a07c0d1f46
|
||||
85d491f268d20c50330c06f6066525109e7161f8
|
@ -1 +1 @@
|
||||
#define FULL_VERSION "explicit/6e48ad4"
|
||||
#define FULL_VERSION "explicit/ab3c897"
|
||||
|
BIN
po/mcs/de.gmo
BIN
po/mcs/de.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
99f06f22b345a4505740acc987f6700c25b645e4
|
||||
cf9e2e56626a8b6fba6902dccd5670c228b674ac
|
BIN
po/mcs/es.gmo
BIN
po/mcs/es.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
1b7d9a8412bb10f151f61928233090e57e684ac2
|
||||
275d756effd5e5583f26d925b5e46bb51f48bc4e
|
BIN
po/mcs/ja.gmo
BIN
po/mcs/ja.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
67227401d36e219da4276354d1175f89079b02be
|
||||
926e0b80854ca61dda893d9287ba6ecd06961913
|
@ -6,9 +6,9 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mono 5.16.0.179\n"
|
||||
"Project-Id-Version: mono 5.16.0.187\n"
|
||||
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
|
||||
"POT-Creation-Date: 2018-10-04 08:14+0000\n"
|
||||
"POT-Creation-Date: 2018-10-06 08:05+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
BIN
po/mcs/pt_BR.gmo
BIN
po/mcs/pt_BR.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
062c9b67fc0c9b6785a93d79c94a2766b2873233
|
||||
caaffe22dd2f4534560267a441bbf325b490c902
|
Loading…
x
Reference in New Issue
Block a user