mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 11:21:08 -10:00
Compare commits
11
Commits
xcode8
...
mono-3.4.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4511ef6b5 | ||
|
|
d6cc1326bc | ||
|
|
61fec75147 | ||
|
|
704ca7886e | ||
|
|
77d00e19fc | ||
|
|
5ec989143f | ||
|
|
69419b4be2 | ||
|
|
2bd6fef770 | ||
|
|
ad325d4b1c | ||
|
|
64f1d09b65 | ||
|
|
94bc52a101 |
No files matched your search
+2
-2
@@ -3,10 +3,10 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
|
||||
|
||||
if CROSS_COMPILING
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir)
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
|
||||
# Keep in sync with SUBDIRS
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = m4 po libgc eglib mono ikvm-native data runtime scripts man samples tools msvc docs
|
||||
DIST_SUBDIRS = m4 po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
|
||||
else
|
||||
if ONLY_MONOTOUCH
|
||||
SUBDIRS = $(MONOTOUCH_SUBDIRS) runtime
|
||||
|
||||
+4
-5
@@ -386,7 +386,7 @@ static void GC_mark_togglerefs ()
|
||||
if (!GC_toggleref_array)
|
||||
return;
|
||||
|
||||
GC_set_mark_bit (GC_toggleref_array);
|
||||
GC_set_mark_bit ((GC_PTR)GC_toggleref_array);
|
||||
for (i = 0; i < GC_toggleref_array_size; ++i) {
|
||||
if (GC_toggleref_array [i].strong_ref) {
|
||||
GC_PTR object = GC_toggleref_array [i].strong_ref;
|
||||
@@ -424,7 +424,7 @@ ensure_toggleref_capacity (int capacity)
|
||||
{
|
||||
if (!GC_toggleref_array) {
|
||||
GC_toggleref_array_capacity = 32;
|
||||
GC_toggleref_array = (GCToggleRef *) GC_INTERNAL_MALLOC (GC_toggleref_array_capacity * sizeof (GCToggleRef), NORMAL);
|
||||
GC_toggleref_array = (GCToggleRef *) GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE (GC_toggleref_array_capacity * sizeof (GCToggleRef), NORMAL);
|
||||
}
|
||||
if (GC_toggleref_array_size + capacity >= GC_toggleref_array_capacity) {
|
||||
GCToggleRef *tmp;
|
||||
@@ -432,10 +432,9 @@ ensure_toggleref_capacity (int capacity)
|
||||
while (GC_toggleref_array_capacity < GC_toggleref_array_size + capacity)
|
||||
GC_toggleref_array_capacity *= 2;
|
||||
|
||||
tmp = (GCToggleRef *) GC_INTERNAL_MALLOC (GC_toggleref_array_capacity * sizeof (GCToggleRef), NORMAL);
|
||||
tmp = (GCToggleRef *) GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE (GC_toggleref_array_capacity * sizeof (GCToggleRef), NORMAL);
|
||||
memcpy (tmp, GC_toggleref_array, GC_toggleref_array_size * sizeof (GCToggleRef));
|
||||
|
||||
GC_free((GC_PTR)GC_toggleref_array);
|
||||
GC_INTERNAL_FREE (GC_toggleref_array);
|
||||
GC_toggleref_array = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
[Category ("NotWorkingInterpreter")]
|
||||
public void CompiledQuote ()
|
||||
{
|
||||
var quote42 = Expression.Lambda<Func<Expression<Func<int>>>> (
|
||||
|
||||
@@ -593,10 +593,11 @@ namespace System.Net
|
||||
get { return servicePoint; }
|
||||
}
|
||||
#if NET_4_0
|
||||
[MonoTODO ("for portable library support")]
|
||||
public virtual bool SupportsCookieContainer {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
// The managed implementation supports the cookie container
|
||||
// it is only Silverlight that returns false here
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -287,16 +287,26 @@ namespace System.Net
|
||||
return GetCreator (requestUri.Scheme).Create (requestUri);
|
||||
}
|
||||
#if NET_4_0
|
||||
[MonoTODO ("for portable library support")]
|
||||
static HttpWebRequest SharedCreateHttp (Uri uri)
|
||||
{
|
||||
if (uri.Scheme != "http" && uri.Scheme != "https")
|
||||
throw new NotSupportedException ("The uri should start with http or https");
|
||||
|
||||
return new HttpWebRequest (uri);
|
||||
}
|
||||
|
||||
public static HttpWebRequest CreateHttp (string requestUriString)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (requestUriString == null)
|
||||
throw new ArgumentNullException ("requestUriString");
|
||||
return SharedCreateHttp (new Uri (requestUriString));
|
||||
}
|
||||
|
||||
[MonoTODO ("for portable library support")]
|
||||
public static HttpWebRequest CreateHttp (Uri requestUri)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (requestUri == null)
|
||||
throw new ArgumentNullException ("requestUri");
|
||||
return SharedCreateHttp (requestUri);
|
||||
}
|
||||
#endif
|
||||
public virtual Stream EndGetRequestStream (IAsyncResult asyncResult)
|
||||
|
||||
@@ -86,9 +86,13 @@ namespace System.Net
|
||||
get { throw new NotSupportedException (); }
|
||||
}
|
||||
#if NET_4_0
|
||||
[MonoTODO ("for portable library support")]
|
||||
|
||||
public virtual bool SupportsHeaders {
|
||||
get { throw new NotImplementedException (); }
|
||||
get {
|
||||
// The managed stack always returns this as true, it is only
|
||||
// the Silverlight stack that does not support this.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// Methods
|
||||
|
||||
+3
-6
@@ -35,16 +35,13 @@ using Microsoft.Scripting.Runtime;
|
||||
using Microsoft.Scripting.Utils;
|
||||
|
||||
namespace Microsoft.Scripting.Interpreter {
|
||||
abstract class ConstantInstruction : Instruction {
|
||||
sealed class PushValueInstruction : Instruction {
|
||||
object value;
|
||||
|
||||
public override int ConsumedStack { get { return 0; } }
|
||||
public override int ProducedStack { get { return 1; } }
|
||||
}
|
||||
|
||||
sealed class PushIntegerValueInstruction : ConstantInstruction {
|
||||
int value;
|
||||
|
||||
public PushIntegerValueInstruction (int value)
|
||||
public PushValueInstruction (object value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@@ -365,6 +365,10 @@ namespace Microsoft.Scripting.Interpreter {
|
||||
Emit(PopInstruction.Instance);
|
||||
}
|
||||
|
||||
public void EmitStore(object value) {
|
||||
Emit (new PushValueInstruction (value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Locals
|
||||
@@ -665,7 +669,7 @@ namespace Microsoft.Scripting.Interpreter {
|
||||
#endregion
|
||||
|
||||
public void EmitIncrement (Type type) {
|
||||
Emit (new PushIntegerValueInstruction (1));
|
||||
Emit (new PushValueInstruction (1));
|
||||
EmitAdd (type, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -1478,6 +1478,10 @@ namespace Microsoft.Scripting.Interpreter {
|
||||
_instructions.EmitCreateDelegate(creator);
|
||||
}
|
||||
|
||||
private void CompileQuotedLambdaExpression(Expression expr) {
|
||||
_instructions.EmitStore (expr);
|
||||
}
|
||||
|
||||
private void CompileCoalesceBinaryExpression(Expression expr) {
|
||||
var node = (BinaryExpression)expr;
|
||||
|
||||
@@ -1531,9 +1535,9 @@ namespace Microsoft.Scripting.Interpreter {
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "expr")]
|
||||
private void CompileQuoteUnaryExpression(Expression expr) {
|
||||
throw new System.NotImplementedException();
|
||||
private void CompileQuoteUnaryExpression(Expression expr) {
|
||||
var qe = (UnaryExpression)expr;
|
||||
CompileQuotedLambdaExpression (qe.Operand);
|
||||
}
|
||||
|
||||
private void CompileUnboxUnaryExpression(Expression expr) {
|
||||
|
||||
@@ -1267,7 +1267,7 @@ namespace Mono.CSharp {
|
||||
throw new InternalErrorException (e, loc);
|
||||
}
|
||||
|
||||
if (!ec.IsInProbingMode) {
|
||||
if (!ec.IsInProbingMode && !etree_conversion) {
|
||||
compatibles.Add (type, am ?? EmptyExpression.Null);
|
||||
}
|
||||
|
||||
@@ -1599,6 +1599,7 @@ namespace Mono.CSharp {
|
||||
var da_ontrue = fc.DefiniteAssignmentOnTrue;
|
||||
var da_onfalse = fc.DefiniteAssignmentOnFalse;
|
||||
|
||||
fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = null;
|
||||
block.FlowAnalysis (fc);
|
||||
|
||||
fc.ParametersBlock = prev_pb;
|
||||
|
||||
+8
-2
@@ -334,7 +334,7 @@ namespace Mono.CSharp {
|
||||
|
||||
if (source == null) {
|
||||
ok = false;
|
||||
source = EmptyExpression.Null;
|
||||
source = ErrorExpression.Instance;
|
||||
}
|
||||
|
||||
target = target.ResolveLValue (ec, source);
|
||||
@@ -589,6 +589,12 @@ namespace Mono.CSharp {
|
||||
|
||||
public int AssignmentOffset { get; private set; }
|
||||
|
||||
public FieldBase Field {
|
||||
get {
|
||||
return mc;
|
||||
}
|
||||
}
|
||||
|
||||
public override Location StartLocation {
|
||||
get {
|
||||
return loc;
|
||||
@@ -601,8 +607,8 @@ namespace Mono.CSharp {
|
||||
if (source == null)
|
||||
return null;
|
||||
|
||||
var bc = (BlockContext) rc;
|
||||
if (resolved == null) {
|
||||
var bc = (BlockContext) rc;
|
||||
var ctx = new FieldInitializerContext (mc, bc);
|
||||
resolved = base.DoResolve (ctx) as ExpressionStatement;
|
||||
AssignmentOffset = ctx.AssignmentInfoOffset - bc.AssignmentInfoOffset;
|
||||
|
||||
+13
-1
@@ -1010,9 +1010,20 @@ namespace Mono.CSharp
|
||||
|
||||
for (int i = 0; i < initialized_fields.Count; ++i) {
|
||||
FieldInitializer fi = initialized_fields [i];
|
||||
|
||||
//
|
||||
// Clone before resolving otherwise when field initializer is needed
|
||||
// in more than 1 constructor any resolve after the initial one would
|
||||
// only took the resolved expression which is problem for expressions
|
||||
// that generate extra expressions or code during Resolve phase
|
||||
//
|
||||
var cloned = fi.Clone (new CloneContext ());
|
||||
|
||||
ExpressionStatement s = fi.ResolveStatement (ec);
|
||||
if (s == null)
|
||||
if (s == null) {
|
||||
initialized_fields [i] = new FieldInitializer (fi.Field, ErrorExpression.Instance, Location.Null);
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
// Field is re-initialized to its default value => removed
|
||||
@@ -1022,6 +1033,7 @@ namespace Mono.CSharp
|
||||
|
||||
ec.AssignmentInfoOffset += fi.AssignmentOffset;
|
||||
ec.CurrentBlock.AddScopeStatement (new StatementExpression (s));
|
||||
initialized_fields [i] = (FieldInitializer) cloned;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1467,6 +1467,7 @@ namespace Mono.CSharp {
|
||||
return e;
|
||||
|
||||
source.Error_ValueCannotBeConverted (ec, target_type, false);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -5792,6 +5792,14 @@ namespace Mono.CSharp {
|
||||
}
|
||||
}
|
||||
|
||||
protected override void CloneTo (CloneContext clonectx, Expression target)
|
||||
{
|
||||
var t = (FieldExpr) target;
|
||||
|
||||
if (InstanceExpression != null)
|
||||
t.InstanceExpression = InstanceExpression.Clone (clonectx);
|
||||
}
|
||||
|
||||
public override Expression CreateExpressionTree (ResolveContext ec)
|
||||
{
|
||||
return CreateExpressionTree (ec, true);
|
||||
|
||||
@@ -9999,6 +9999,10 @@ namespace Mono.CSharp
|
||||
loc = Location.Null;
|
||||
}
|
||||
|
||||
protected override void CloneTo (CloneContext clonectx, Expression target)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ContainsEmitWithAwait ()
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
public sealed class C
|
||||
{
|
||||
public C ()
|
||||
{
|
||||
}
|
||||
|
||||
public C (Action<object, object> tappedCallback)
|
||||
{
|
||||
}
|
||||
|
||||
public readonly string TappedCallbackProperty = Create<C, Action<object, object>> (o => o.TappedCallback);
|
||||
|
||||
public Action<object, object> TappedCallback {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public static string Create<T1, T2> (Expression<Func<T1, T2>> getter)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
new C (null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main ()
|
||||
{
|
||||
SomeMethod ();
|
||||
}
|
||||
|
||||
private static bool SomeMethod ()
|
||||
{
|
||||
int m;
|
||||
int n = 2;
|
||||
bool b_const = true;
|
||||
|
||||
bool b = F (() => F1 (n, out m) && Ferror (m)) && b_const;
|
||||
return b;
|
||||
}
|
||||
|
||||
protected static bool F (Func<bool> rule)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool F1 (int j, out int m)
|
||||
{
|
||||
m = 2;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool Ferror (int i)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool Fouter ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -219,7 +219,7 @@ output_char (FILE *f, char c) {
|
||||
if (isalnum (c))
|
||||
fprintf (f, "%c", c);
|
||||
else
|
||||
fprintf (f, "\\x%x\" \"", c);
|
||||
fprintf (f, "\\x%x\" \"", (guint8)c);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -64,9 +64,13 @@ mono_dead_letter_dealloc (id self, SEL _cmd)
|
||||
void
|
||||
mono_threads_install_dead_letter (void)
|
||||
{
|
||||
id cur = objc_msgSend ((id)nsthread, currentThread);
|
||||
id dict = objc_msgSend (cur, threadDictionary);
|
||||
if (objc_msgSend (dict, objectForKey, mono_dead_letter_key) == nil) {
|
||||
id cur, dict;
|
||||
|
||||
cur = objc_msgSend ((id)nsthread, currentThread);
|
||||
if (!cur)
|
||||
return;
|
||||
dict = objc_msgSend (cur, threadDictionary);
|
||||
if (dict && objc_msgSend (dict, objectForKey, mono_dead_letter_key) == nil) {
|
||||
id value = objc_msgSend (objc_msgSend ((id)mono_dead_letter_class, alloc), init);
|
||||
objc_msgSend (dict, setObjectForKey, value, mono_dead_letter_key);
|
||||
objc_msgSend (value, release);
|
||||
|
||||
Reference in new issue
Block a user