Skip to content

Instantly share code, notes, and snippets.

View kumpera's full-sized avatar

Rodrigo Kumpera kumpera

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Dynamic;
namespace ConsoleTest
{
public class Program
{
diff --git a/mcs/support.cs b/mcs/support.cs
index 433012e..bde81d0 100644
--- a/mcs/support.cs
+++ b/mcs/support.cs
@@ -344,7 +344,7 @@ namespace Mono.CSharp {
class DynamicType : Type
{
public override Assembly Assembly {
- get { return UnderlyingSystemType.Assembly; }
+ get { return CodeGen.Assembly.Builder; }
diff --git a/mono/mini/mini-amd64.c b/mono/mini/mini-amd64.c
index eb9b3ce..b2d1ce8 100644
--- a/mono/mini/mini-amd64.c
+++ b/mono/mini/mini-amd64.c
@@ -1423,6 +1423,14 @@ mono_arch_allocate_vars (MonoCompile *cfg)
/* Allocate locals */
if (!cfg->globalra) {
offsets = mono_allocate_stack_slots_full (cfg, cfg->arch.omit_fp ? FALSE: TRUE, &locals_stack_size, &locals_stack_align);
+ if (locals_stack_size > MONO_ARCH_MAX_FRAME_SIZE) {
+ char *mname = mono_method_full_name (cfg->method, TRUE);
diff --git a/mono/metadata/gc-internal.h b/mono/metadata/gc-internal.h
index f975762..cb8fb5a 100644
--- a/mono/metadata/gc-internal.h
+++ b/mono/metadata/gc-internal.h
@@ -74,6 +74,10 @@ void mono_gc_remove_weak_track_handle (guint32 gchandle) MONO_INTERNAL;
GSList* mono_gc_remove_weak_track_object (MonoDomain *domain, MonoObject *obj) MONO_INTERNAL;
#endif
+/*Ephemeron functionality*/
+void mono_gc_ephemeron_array_add (MonoObject *obj) MONO_INTERNAL;
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/EventLogger.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/EventLogger.cs
index f561b9e..f0ef5d2 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/EventLogger.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/EventLogger.cs
@@ -125,10 +125,14 @@ namespace MonoTests.System.Windows.Forms
TypeBuilder logType = module.DefineType ("Logger");
FieldBuilder logField = logType.DefineField ("log", ListType, FieldAttributes.Public);
- ConstructorBuilder logCtor = logType.DefineConstructor (MethodAttributes.Public, CallingConventions.HasThis, new Type [] {ListType, typeof (object)});
+ ConstructorBuilder logCtor = logType.DefineConstructor (MethodAttributes.Public, CallingConventions.HasThis, new Type [] {ListType, itemType});
static MonoObject*
create_custom_attr_data (MonoImage *image, MonoCustomAttrEntry *cattr)
{
static MonoMethod *ctor;
MonoDomain *domain;
MonoObject *attr;
void *params [4];
g_assert (image->assembly);
using System;
using Mono.Cecil;
using Mono.Cecil.Cil;
public class Driver {
public static void Main () {
new Weaver ("sample.exe").Weave ();
}
}
.assembly extern mscorlib
{
.ver 2:0:0:0
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
}
.assembly 'null_dele'
{
.custom instance void class [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::'.ctor'() = (
01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <math.h>
#define NUM_THREADS 1
enum {
X86_FPCW_INVOPEX_MASK = 0x1,
diff --git a/mono/utils/mach-support-arm.c b/mono/utils/mach-support-arm.c
index 51a07bd..f5824be 100644
--- a/mono/utils/mach-support-arm.c
+++ b/mono/utils/mach-support-arm.c
@@ -21,7 +21,7 @@ mono_mach_arch_get_ip (thread_state_t state)
{
arm_thread_state_t *arch_state = (arm_thread_state_t *) state;
- return (void *) arch_state->__eip;
+ return (void *) arch_state->__pc;