From 7a4a9ef9fbe1d8eb2b9139afa10e6d8f691ff976 Mon Sep 17 00:00:00 2001 From: maxim Date: Tue, 28 Jun 2022 13:02:50 +1200 Subject: Several lines of code were deleted (which were not deleted in previous commit by some unknown accident). --- .../MessagePack/MessagePackSerializer.NonGeneric.cs | 21 --------------------- .../MessagePack/MessagePackSerializerOptions.cs | 1 - 2 files changed, 22 deletions(-) diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.NonGeneric.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.NonGeneric.cs index 18c52d4e..019eb8e7 100644 --- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.NonGeneric.cs +++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.NonGeneric.cs @@ -220,41 +220,20 @@ namespace MessagePack { // public static void Serialize(ref MessagePackWriter writer, T obj, MessagePackSerializerOptions options) - MethodInfo serialize = GetMethod(nameof(Serialize), type, new Type[] { typeof(MessagePackWriter).MakeByRefType(), null, typeof(MessagePackSerializerOptions) }); MethodInfo serialize = GetMethod(nameof(SerializeSemiGeneric), type, new Type[] { typeof(MessagePackWriter).MakeByRefType(), typeof(Object), typeof(MessagePackSerializerOptions) }); #if ENABLE_IL2CPP this.Serialize_MessagePackWriter_T_Options = (ref MessagePackWriter x, object y, MessagePackSerializerOptions z) => ThrowRefStructNotSupported(); #else - ParameterExpression param1 = Expression.Parameter(typeof(MessagePackWriter).MakeByRefType(), "writer"); - ParameterExpression param2 = Expression.Parameter(typeof(object), "obj"); - ParameterExpression param3 = Expression.Parameter(typeof(MessagePackSerializerOptions), "options"); - - MethodCallExpression body = Expression.Call( - null, - serialize, - param1, - ti.IsValueType ? Expression.Unbox(param2, type) : Expression.Convert(param2, type), - param3); - MessagePackWriterSerialize lambda = Expression.Lambda(body, param1, param2, param3).Compile(PreferInterpretation); - - this.Serialize_MessagePackWriter_T_Options = lambda; this.Serialize_MessagePackWriter_T_Options = (MessagePackWriterSerialize)serialize.CreateDelegate(typeof(MessagePackWriterSerialize)); #endif } { // public static T Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) - MethodInfo deserialize = GetMethod(nameof(Deserialize), type, new Type[] { typeof(MessagePackReader).MakeByRefType(), typeof(MessagePackSerializerOptions) }); MethodInfo deserialize = GetMethod(nameof(DeserializeSemiGeneric), type, new Type[] { typeof(MessagePackReader).MakeByRefType(), typeof(MessagePackSerializerOptions) }); #if ENABLE_IL2CPP this.Deserialize_MessagePackReader_Options = (ref MessagePackReader reader, MessagePackSerializerOptions options) => { ThrowRefStructNotSupported(); return null; }; #else - ParameterExpression param1 = Expression.Parameter(typeof(MessagePackReader).MakeByRefType(), "reader"); - ParameterExpression param2 = Expression.Parameter(typeof(MessagePackSerializerOptions), "options"); - UnaryExpression body = Expression.Convert(Expression.Call(null, deserialize, param1, param2), typeof(object)); - MessagePackReaderDeserialize lambda = Expression.Lambda(body, param1, param2).Compile(); - - this.Deserialize_MessagePackReader_Options = lambda; this.Deserialize_MessagePackReader_Options = (MessagePackReaderDeserialize)deserialize.CreateDelegate(typeof(MessagePackReaderDeserialize)); #endif } diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializerOptions.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializerOptions.cs index f3117455..bc1557b0 100644 --- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializerOptions.cs +++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializerOptions.cs @@ -28,7 +28,6 @@ namespace MessagePack "System.Management.IWbemClassObjectFreeThreaded", }; -#if !DYNAMICCODEDUMPER #if DYNAMICCODEDUMPER static readonly MessagePackSerializerOptions _standard = new MessagePackSerializerOptions(Resolvers.BuiltinResolver.Instance); -- cgit v1.2.3