Permalink
Browse files

2008-06-13 Mark Probst <mark.probst@gmail.com>

	* mini.c: Do pass VTable/RGCTX argument to static generic methods.

2008-06-13  Mark Probst  <mark.probst@gmail.com>

	* generic-static-methods.2.cs: Test case for static generic
	methods.

	* Makefile.am: Test added.

svn path=/trunk/mono/; revision=105760
  • Loading branch information...
1 parent 1c18351 commit f4ad78a10255a5d1fa84552a99cd5d1a68c46f79 @schani schani committed Jun 13, 2008
Showing with 29 additions and 3 deletions.
  1. +4 −0 mono/mini/ChangeLog
  2. +1 −2 mono/mini/mini.c
  3. +7 −0 mono/tests/ChangeLog
  4. +2 −1 mono/tests/Makefile.am
  5. +15 −0 mono/tests/generic-static-methods.2.cs
View
@@ -1,5 +1,9 @@
2008-06-13 Mark Probst <mark.probst@gmail.com>
+ * mini.c: Do pass VTable/RGCTX argument to static generic methods.
+
+2008-06-13 Mark Probst <mark.probst@gmail.com>
+
* mini.c: Generic sharing of the special case of ldtoken followed
by a call to GetTypeFromHandle.
View
@@ -5691,8 +5691,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
* context is sharable (and it's not a
* generic method).
*/
- if (sharing_enabled && context_sharable &&
- !mini_method_get_context (cmethod)->method_inst)
+ if (sharing_enabled && context_sharable)
pass_vtable = TRUE;
}
View
@@ -1,3 +1,10 @@
+2008-06-13 Mark Probst <mark.probst@gmail.com>
+
+ * generic-static-methods.2.cs: Test case for static generic
+ methods.
+
+ * Makefile.am: Test added.
+
2008-06-12 Bill Holmes <billholmes54@gmail.com>
* libtest.c, winx64structs.cs :
Changing winx64structs.cs to use the TestDriver.dll
View
@@ -271,6 +271,7 @@ BASE_TEST_CS_SRC= \
generic-interface-methods.2.cs \
generic-array-type.2.cs \
generic-method-patching.2.cs \
+ generic-static-methods.2.cs \
generic-null-call.2.cs \
recursive-generics.2.cs \
bug-80392.2.cs \
@@ -702,7 +703,7 @@ test-generic-sharing : generics-sharing.2.exe shared-generic-methods.2.exe \
generic-ldtoken-method.2.exe generic-ldtoken-field.2.exe \
generic-virtual.2.exe generic-tailcall.2.exe \
generic-interface-methods.2.exe generic-array-type.2.exe \
- generic-method-patching.2.exe \
+ generic-method-patching.2.exe generic-static-methods.2.exe \
generic-null-call.2.exe generic-tailcall2.2.exe \
generic-array-exc.2.exe
for fn in $+ ; do \
@@ -0,0 +1,15 @@
+using System;
+
+public class Gen<T> {
+ public static T [] method<S> () {
+ return new T [3];
+ }
+}
+
+public class main {
+ public static int Main () {
+ if (Gen<object>.method<string> ().GetType () != typeof (object []))
+ return 1;
+ return 0;
+ }
+}

0 comments on commit f4ad78a

Please sign in to comment.