Imported Upstream version 4.8.0.395
Former-commit-id: bc4eb15577ba347ac08038f1ebaa41e253f5b948
This commit is contained in:
parent
006de68e1e
commit
693afccc61
@ -17,7 +17,7 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<!--The build requires this list of TFMs to determine what part of the lockfile to use.
|
||||
When it's updated in the future to no longer require it, this list can be removed. -->
|
||||
<NuGetTargetMoniker>.NETPlatform,Version=v5.0;.NETStandard,Version=v1.0;.NETStandard,Version=v1.1;.NETStandard,Version=v1.2;.NETStandard,Version=v1.3;.NETStandard,Version=v1.4;.NETStandard,Version=v1.5</NuGetTargetMoniker>
|
||||
<NuGetTargetMoniker>.NETPlatform,Version=v5.0;.NETStandard,Version=v1.0;.NETStandard,Version=v1.1;.NETStandard,Version=v1.2;.NETStandard,Version=v1.3;.NETStandard,Version=v1.4;.NETStandard,Version=v1.5;.NETStandard,Version=v1.6</NuGetTargetMoniker>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\Microsoft.Portable.Core.props" />
|
||||
|
||||
|
@ -93,8 +93,7 @@ namespace Microsoft.CSharp.RuntimeBinder
|
||||
module.SetDeclaringAssembly (temp);
|
||||
|
||||
var importer = new Compiler.ReflectionImporter (module, cc.BuiltinTypes) {
|
||||
IgnorePrivateMembers = false,
|
||||
IgnoreCompilerGeneratedField = false
|
||||
IgnorePrivateMembers = false
|
||||
};
|
||||
|
||||
// Import all currently loaded assemblies
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
@ -295,6 +296,36 @@ namespace MonoTests.System.Linq.Expressions {
|
||||
Assert.AreEqual ("foo42", lamda (42, "foo"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CallDynamicMethod_ToString ()
|
||||
{
|
||||
// Regression test for #49686
|
||||
var m = new DynamicMethod ("intIntId", typeof (int), new Type [] { typeof (int) });
|
||||
var ilg = m.GetILGenerator ();
|
||||
ilg.Emit (OpCodes.Ldarg_0);
|
||||
ilg.Emit (OpCodes.Ret);
|
||||
|
||||
var i = Expression.Parameter (typeof (int), "i");
|
||||
var e = Expression.Call (m, i);
|
||||
|
||||
Assert.IsNotNull (e.ToString ());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CallDynamicMethod_CompileInvoke ()
|
||||
{
|
||||
var m = new DynamicMethod ("intIntId", typeof (int), new Type [] { typeof (int) });
|
||||
var ilg = m.GetILGenerator ();
|
||||
ilg.Emit (OpCodes.Ldarg_0);
|
||||
ilg.Emit (OpCodes.Ret);
|
||||
|
||||
var i = Expression.Parameter (typeof (int), "i");
|
||||
var e = Expression.Call (m, i);
|
||||
|
||||
var lambda = Expression.Lambda<Func<int, int>> (e, i).Compile ();
|
||||
Assert.AreEqual (42, lambda (42));
|
||||
}
|
||||
|
||||
public static int Bang (Expression i)
|
||||
{
|
||||
return (int) (i as ConstantExpression).Value;
|
||||
|
@ -95,8 +95,15 @@ namespace Mono.Net.Security
|
||||
sslStream = provider.CreateSslStream (networkStream, false, settings);
|
||||
|
||||
try {
|
||||
var host = request.Host;
|
||||
if (!string.IsNullOrEmpty (host)) {
|
||||
var pos = host.IndexOf (':');
|
||||
if (pos > 0)
|
||||
host = host.Substring (0, pos);
|
||||
}
|
||||
|
||||
sslStream.AuthenticateAsClient (
|
||||
request.Host, request.ClientCertificates,
|
||||
host, request.ClientCertificates,
|
||||
(SslProtocols)ServicePointManager.SecurityProtocol,
|
||||
ServicePointManager.CheckCertificateRevocationList);
|
||||
|
||||
|
@ -210,15 +210,20 @@ namespace System.Reflection.Emit {
|
||||
return this;
|
||||
}
|
||||
|
||||
[MonoTODO("Not implemented")]
|
||||
public override object[] GetCustomAttributes (bool inherit) {
|
||||
throw new NotImplementedException ();
|
||||
// support for MethodImplAttribute PCA
|
||||
return new Object[] { new MethodImplAttribute(GetMethodImplementationFlags()) };
|
||||
}
|
||||
|
||||
[MonoTODO("Not implemented")]
|
||||
public override object[] GetCustomAttributes (Type attributeType,
|
||||
bool inherit) {
|
||||
throw new NotImplementedException ();
|
||||
if (attributeType == null)
|
||||
throw new ArgumentNullException ("attributeType");
|
||||
|
||||
if (attributeType.IsAssignableFrom (typeof (MethodImplAttribute)))
|
||||
return new Object[] { new MethodImplAttribute (GetMethodImplementationFlags()) };
|
||||
else
|
||||
return EmptyArray<Object>.Value;
|
||||
}
|
||||
|
||||
public DynamicILInfo GetDynamicILInfo () {
|
||||
@ -244,7 +249,7 @@ namespace System.Reflection.Emit {
|
||||
}
|
||||
|
||||
public override MethodImplAttributes GetMethodImplementationFlags () {
|
||||
return MethodImplAttributes.IL | MethodImplAttributes.Managed;
|
||||
return MethodImplAttributes.IL | MethodImplAttributes.Managed | MethodImplAttributes.NoInlining;
|
||||
}
|
||||
|
||||
public override ParameterInfo[] GetParameters ()
|
||||
@ -298,9 +303,14 @@ namespace System.Reflection.Emit {
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO("Not implemented")]
|
||||
public override bool IsDefined (Type attributeType, bool inherit) {
|
||||
throw new NotImplementedException ();
|
||||
if (attributeType == null)
|
||||
throw new ArgumentNullException ("attributeType");
|
||||
|
||||
if (attributeType.IsAssignableFrom (typeof (MethodImplAttribute)))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public override string ToString () {
|
||||
|
@ -11,6 +11,7 @@ using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.ExceptionServices;
|
||||
@ -442,6 +443,31 @@ namespace MonoTests.System.Reflection.Emit
|
||||
f.Method.GetMethodBody ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetCustomAttributes ()
|
||||
{
|
||||
var method = new DynamicMethod ("method", typeof (void), new Type [] { });
|
||||
|
||||
var methodImplAttrType = typeof (MethodImplAttribute);
|
||||
Assert.IsTrue (method.IsDefined (methodImplAttrType, true), "MethodImplAttribute is defined");
|
||||
|
||||
// According to the spec, MethodImplAttribute is the
|
||||
// only custom attr that's present on a DynamicMethod.
|
||||
// And it's always a managed method with no inlining.
|
||||
var a1 = method.GetCustomAttributes (true);
|
||||
Assert.AreEqual (a1.Length, 1, "a1.Length == 1");
|
||||
Assert.AreEqual (a1[0].GetType (), methodImplAttrType, "a1[0] is a MethodImplAttribute");
|
||||
var options = (a1[0] as MethodImplAttribute).Value;
|
||||
Assert.IsTrue ((options & MethodImplOptions.NoInlining) != 0, "NoInlining is set");
|
||||
Assert.IsTrue ((options & MethodImplOptions.Unmanaged) == 0, "Unmanaged isn't set");
|
||||
|
||||
|
||||
// any other custom attribute type
|
||||
var extensionAttrType = typeof (ExtensionAttribute);
|
||||
Assert.IsFalse (method.IsDefined (extensionAttrType, true));
|
||||
Assert.AreEqual (Array.Empty<object>(), method.GetCustomAttributes (extensionAttrType, true));
|
||||
}
|
||||
|
||||
public delegate object RetObj();
|
||||
[Test] //#640702
|
||||
public void GetCurrentMethodWorksWithDynamicMethods ()
|
||||
|
@ -1 +1 @@
|
||||
230b2c651b79678ba74491306ffda95a019edf9b
|
||||
b3586ea6fa1c0ea2a774b82321dc5ea824f48240
|
@ -1 +1 @@
|
||||
ac6dbc56417da4b2adacbcc7012d2ddad9b7fe18
|
||||
8ae0a08f19dd0b517b5c8c706e3f11044ba7440c
|
@ -48,6 +48,8 @@ namespace Mono.CSharp
|
||||
public ReflectionImporter (ModuleContainer module, BuiltinTypes builtin)
|
||||
: base (module)
|
||||
{
|
||||
IgnoreCompilerGeneratedField = false;
|
||||
|
||||
Initialize (builtin);
|
||||
}
|
||||
|
||||
|
@ -372,7 +372,7 @@ namespace Mono.Linker.Steps {
|
||||
// e.g. System.String[] -> System.String
|
||||
var ts = (type as TypeSpecification);
|
||||
if (ts != null) {
|
||||
MarkWithResolvedScope (ts.GetElementType ());
|
||||
MarkWithResolvedScope (ts.ElementType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -630,18 +630,19 @@ mono_object_hash (MonoObject* obj)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
mono_monitor_ensure_owned (LockWord lw, guint32 id)
|
||||
{
|
||||
if (lock_word_is_flat (lw)) {
|
||||
if (lock_word_get_owner (lw) == id)
|
||||
return;
|
||||
return TRUE;
|
||||
} else if (lock_word_is_inflated (lw)) {
|
||||
if (mon_status_get_owner (lock_word_get_inflated_lock (lw)->status) == id)
|
||||
return;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
mono_set_pending_exception (mono_get_exception_synchronization_lock ("Object synchronization method was called from an unsynchronized block of code."));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1038,7 +1039,8 @@ mono_monitor_exit (MonoObject *obj)
|
||||
|
||||
lw.sync = obj->synchronisation;
|
||||
|
||||
mono_monitor_ensure_owned (lw, mono_thread_info_get_small_id ());
|
||||
if (!mono_monitor_ensure_owned (lw, mono_thread_info_get_small_id ()))
|
||||
return;
|
||||
|
||||
if (G_UNLIKELY (lock_word_is_inflated (lw)))
|
||||
mono_monitor_exit_inflated (obj);
|
||||
@ -1185,7 +1187,8 @@ ves_icall_System_Threading_Monitor_Monitor_pulse (MonoObject *obj)
|
||||
id = mono_thread_info_get_small_id ();
|
||||
lw.sync = obj->synchronisation;
|
||||
|
||||
mono_monitor_ensure_owned (lw, id);
|
||||
if (!mono_monitor_ensure_owned (lw, id))
|
||||
return;
|
||||
|
||||
if (!lock_word_is_inflated (lw)) {
|
||||
/* No threads waiting. A wait would have inflated the lock */
|
||||
@ -1216,7 +1219,8 @@ ves_icall_System_Threading_Monitor_Monitor_pulse_all (MonoObject *obj)
|
||||
id = mono_thread_info_get_small_id ();
|
||||
lw.sync = obj->synchronisation;
|
||||
|
||||
mono_monitor_ensure_owned (lw, id);
|
||||
if (!mono_monitor_ensure_owned (lw, id))
|
||||
return;
|
||||
|
||||
if (!lock_word_is_inflated (lw)) {
|
||||
/* No threads waiting. A wait would have inflated the lock */
|
||||
@ -1252,7 +1256,8 @@ ves_icall_System_Threading_Monitor_Monitor_wait (MonoObject *obj, guint32 ms)
|
||||
|
||||
lw.sync = obj->synchronisation;
|
||||
|
||||
mono_monitor_ensure_owned (lw, id);
|
||||
if (!mono_monitor_ensure_owned (lw, id))
|
||||
return FALSE;
|
||||
|
||||
if (!lock_word_is_inflated (lw)) {
|
||||
mono_monitor_inflate_owned (obj, id);
|
||||
|
@ -860,7 +860,7 @@ EXTRA_DIST = TestDriver.cs \
|
||||
Makefile.am.in
|
||||
|
||||
version.h: Makefile
|
||||
echo "#define FULL_VERSION \"Stable 4.8.0.382/aca1492\"" > version.h
|
||||
echo "#define FULL_VERSION \"Stable 4.8.0.395/df81fe4\"" > version.h
|
||||
|
||||
# Utility target for patching libtool to speed up linking
|
||||
patch-libtool:
|
||||
|
@ -860,7 +860,7 @@ EXTRA_DIST = TestDriver.cs \
|
||||
Makefile.am.in
|
||||
|
||||
version.h: Makefile
|
||||
echo "#define FULL_VERSION \"Stable 4.8.0.382/aca1492\"" > version.h
|
||||
echo "#define FULL_VERSION \"Stable 4.8.0.395/df81fe4\"" > version.h
|
||||
|
||||
# Utility target for patching libtool to speed up linking
|
||||
patch-libtool:
|
||||
|
@ -1 +1 @@
|
||||
de8ec0d53c8240e10d3267814eb8ab2f2114e5db
|
||||
2128ee71f4bedcfbe65320e1befa9d3044dd5a0b
|
@ -1 +1 @@
|
||||
a1c359f96a9f1549227cba4f1d82f9b535458f19
|
||||
14bc01ca5a1c785611092113ce9726193bb24fd9
|
@ -66,26 +66,6 @@ known_kernel_helper (void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
dump_code (guint32 *ptr)
|
||||
{
|
||||
char current_impl [256];
|
||||
char hex [16];
|
||||
int i;
|
||||
guint32 page_mask = ~((guint32)mono_pagesize () - 1);
|
||||
|
||||
current_impl [0] = 0;
|
||||
for (i = 0; i < 16; i++) {
|
||||
/* Don't risk page fault since we don't know where the code ends */
|
||||
if (((guint32)&ptr [i] & page_mask) != ((guint32)ptr & page_mask))
|
||||
break;
|
||||
sprintf (hex, "0x%x ", ptr [i]);
|
||||
strcat (current_impl, hex);
|
||||
}
|
||||
|
||||
g_warning (current_impl);
|
||||
}
|
||||
|
||||
static MonoTlsImplementation
|
||||
mono_arm_get_tls_implementation (void)
|
||||
{
|
||||
@ -110,9 +90,6 @@ mono_arm_get_tls_implementation (void)
|
||||
}
|
||||
}
|
||||
|
||||
g_warning ("No fast tls on device. Using fallbacks. Current implementation : ");
|
||||
dump_code (check_addr);
|
||||
|
||||
return (MonoTlsImplementation) { NULL, 0, FALSE, mono_fallback_get_tls_key, NULL, mono_fallback_set_tls_key, NULL };
|
||||
#endif
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
e249d1215b974ea22b97135efc8865641fd6e064
|
||||
135519aac6d9aac84c8ac83259d5bb8ea8cc9c61
|
@ -1 +1 @@
|
||||
#define FULL_VERSION "Stable 4.8.0.382/aca1492"
|
||||
#define FULL_VERSION "Stable 4.8.0.395/df81fe4"
|
||||
|
@ -346,10 +346,16 @@ mono_sigctx_to_monoctx (void *sigctx, MonoContext *mctx)
|
||||
memcpy (mctx->regs, UCONTEXT_GREGS (sigctx), sizeof (mgreg_t) * 31);
|
||||
mctx->pc = UCONTEXT_REG_PC (sigctx);
|
||||
mctx->regs [ARMREG_SP] = UCONTEXT_REG_SP (sigctx);
|
||||
/*
|
||||
* We don't handle fp regs, this is not currrently a
|
||||
* problem, since we don't allocate them globally.
|
||||
*/
|
||||
#ifdef __linux__
|
||||
struct fpsimd_context *fpctx = (struct fpsimd_context*)&((ucontext_t*)sigctx)->uc_mcontext.__reserved;
|
||||
int i;
|
||||
|
||||
g_assert (fpctx->head.magic == FPSIMD_MAGIC);
|
||||
for (i = 0; i < 32; ++i)
|
||||
/* Only store the bottom 8 bytes for now */
|
||||
*(guint64*)&(mctx->fregs [i]) = fpctx->vregs [i];
|
||||
#endif
|
||||
/* FIXME: apple */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
BIN
po/mcs/de.gmo
BIN
po/mcs/de.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
470d10a95e73968e4ca69002f84128ce73370042
|
||||
d610898725042926616eda830bc1fe06716fddf4
|
BIN
po/mcs/es.gmo
BIN
po/mcs/es.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
87ec20f13077d1f449ce5298d25c43f68f5bfbe1
|
||||
00b28cb6852ac9514efee13af376b134bb9217cc
|
BIN
po/mcs/ja.gmo
BIN
po/mcs/ja.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
9779d03951635bee11c7bb3abeabfab8ea034814
|
||||
1e18717b72da0faecb084537f1a558d66dee33a0
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mono 4.8.0\n"
|
||||
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
|
||||
"POT-Creation-Date: 2016-12-15 12:17+0000\n"
|
||||
"POT-Creation-Date: 2017-01-03 14:50+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 @@
|
||||
209d5ef3ae3062473db1c6aad92f4655f893ac0d
|
||||
f471eb9df7fae003d5cb6083f4e03b934888134a
|
Loading…
x
Reference in New Issue
Block a user