Disable code generation for object serialization under Full AOT.
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 6 Nov 2012 21:14:44 +0000 (16:14 -0500)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 6 Nov 2012 23:18:15 +0000 (18:18 -0500)
mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs
mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/CodeGenerator.cs
mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs

index 322d815efad196ee81439720df4b0b5a2bf7dffe..4d4756e150d5a16689db6d7109feaaad950c38eb 100644 (file)
@@ -37,7 +37,11 @@ using System.Security.Permissions;
 namespace System.Runtime.Serialization.Formatters.Binary {
 
        [ComVisible (true)]
-       public sealed class BinaryFormatter : IRemotingFormatter, IFormatter 
+       public sealed class BinaryFormatter :
+#if !FULL_AOT_RUNTIME
+                                               IRemotingFormatter,
+#endif
+                                               IFormatter
        {
                private FormatterAssemblyStyle assembly_format = FormatterAssemblyStyle.Simple;
                private SerializationBinder binder;
index feb8ffa6d4e48eab5239b2c317fe9b1e20d87844..fd38471644b2d7ec9f2e23c0e5273b920ceb9dac 100644 (file)
@@ -28,6 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !FULL_AOT_RUNTIME
 using System;
 using System.IO;
 using System.Collections;
@@ -401,3 +402,4 @@ namespace System.Runtime.Serialization.Formatters.Binary
        }
  }
  
+#endif
index d39348bd38d98f02fd1d1a66b024953a461ed0cd..9d3c42bbd19d6e3c85134a0c2639f20adc501bcc 100644 (file)
@@ -469,11 +469,13 @@ namespace System.Runtime.Serialization.Formatters.Binary
                
                TypeMetadata CreateMemberTypeMetadata (Type type)
                {
+#if !FULL_AOT_RUNTIME
                        if (!BinaryCommon.UseReflectionSerialization) {
                                Type metaType = CodeGenerator.GenerateMetadataType (type, _context);
                                return (TypeMetadata) Activator.CreateInstance (metaType);
                        }
                        else
+#endif
                                return new MemberTypeMetadata (type, _context);
                }