Commit 00a6e428 authored by Marc Gravell's avatar Marc Gravell

Merge branch 'fsharp' of https://github.com/vosen/dapper-dot-net into vosen-fsharp

Also optimised ldloc/lodloca/stloc and fixed enum double-assignment
Signed-off-by: 's avatarMarc Gravell <marc.gravell@gmail.com>
parent 63d37477
...@@ -1737,7 +1737,7 @@ static List<FieldInfo> GetSettableFields(Type t) ...@@ -1737,7 +1737,7 @@ static List<FieldInfo> GetSettableFields(Type t)
il.Emit(OpCodes.Unbox_Any, unboxType); // stack is now [target][target][typed-value] il.Emit(OpCodes.Unbox_Any, unboxType); // stack is now [target][target][typed-value]
if (nullUnderlyingType != null) if (nullUnderlyingType != null)
{ {
il.Emit(OpCodes.Newobj, memberType.GetConstructor(new[] { nullUnderlyingType })); // stack is now [target][target][enum-value] il.Emit(OpCodes.Newobj, memberType.GetConstructor(new[] { nullUnderlyingType })); // stack is now [target][target][enum-value]
} }
} }
...@@ -1750,8 +1750,8 @@ static List<FieldInfo> GetSettableFields(Type t) ...@@ -1750,8 +1750,8 @@ static List<FieldInfo> GetSettableFields(Type t)
{ {
il.Emit(OpCodes.Unbox_Any, unboxType); // stack is now [target][target][typed-value] il.Emit(OpCodes.Unbox_Any, unboxType); // stack is now [target][target][typed-value]
} }
} }
if (specializedConstructor == null) if (specializedConstructor == null)
{ {
// Store the value in the property/field // Store the value in the property/field
if (item.Property != null) if (item.Property != null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment