anchor.diff:              x = typeof<double> ||
               x = typeof<bool> ||
               isTypeBlittable x ||
  -            x = typeof<string> -> 
  -                if typeof<'T>.GetTypeInfo().IsValueType then
  -                    GetValue (Clone.GetStructMethod<'T> meth)
  -                else
  -                    GetReference (Clone.GetMethod<'T> meth)
  -
  -        | typ -> 
  -            let helperMethods = moduleType.GetRuntimeMethods ()
  -            let createCloneMeth = helperMethods |> Seq.find (fun x -> x.Name = "createCloneMethod")
  -
  -            let generic = createCloneMeth.MakeGenericMethod ([|typ|])
  -
  -            let ret = generic.Invoke (null, [||])
  -            let ret = ret :?> (obj -> obj)
  -
  -            if typeof<'T>.GetTypeInfo().IsValueType then
  -                let copy = Clone.GetStructMethod<'T> meth
  -                GetValue (ByrefFunc<'T, obj> (fun (t : byref<'T>) -> ret (copy.Invoke (&t))))
  -             else
  -                let copy = Clone.GetMethod<'T> meth
  -                GetReference (Func<'T, obj> (fun t -> ret (copy.Invoke (t))))
  -
  -    let createSet<'T> (meth : MethodInfo) = 
  -        if typeof<'T>.GetTypeInfo().IsValueType then
  -            Clone.SetStructMethod<'T> meth
  -            |> SetValue
  -        else
  -            Clone.SetMethod<'T> meth
  -            |> SetReference
  +            x = typeof<string> -> true
  +        | _ -> false
  +
  +    type internal Marker = interface end
  +    let moduleType = typeof<Marker>.DeclaringType
  +
  +#if ECS_CLONING_EMIT_IL
  +    open System.Reflection.Emit
  +
  +    let createGet<'T> (meth : MethodInfo) =
  +        let typ = meth.ReturnType
  +        match isImmutableType typ with
  +        | true -> meth
  +        | _ -> failwith "not valid yet"
  +
  +    let createSet<'T> (meth : MethodInfo) = meth
   
       let createCloneMethod<'T> () =
           let typ = typeof<'T>
  +
           let ctors = typ.GetTypeInfo().DeclaredConstructors
           let ctor = ctors.ElementAt (0)
           let ctorParams = ctor.GetParameters ()
  
positive.code:             let ctorGets =
                  ctorGets
                  |> Array.map (function
                      | GetReference x -> x
                      | _ -> failwith "should not happen"
                  )
  
              let sets =
                  sets
                  |> Array.map (function
                      | SetReference x -> x
                      | _ -> failwith "should not happen"
                  )
  
              let gets =
                  gets
                  |> Array.map (function
                      | GetReference x -> x
                      | _ -> failwith "should not happen"
                  )
  
  
negative.code: 
          let ctorGets =
              ctorProps
              |> Array.map (fun x -> createGetIL<'T> x.GetMethod)
  
          let sets =
              props
              |> Array.map (fun x -> createSetIL<'T> x.SetMethod)
  
          let gets =
              props
              |> Array.map (fun x -> createGetIL<'T> x.GetMethod)
  
          /////////////////////////////////////////////////////
          ()
  
          let cloneMeth = DynamicMethod ("Clone", typ, [|typ|])
          let il = cloneMeth.GetILGenerator ()
  
          il.Emit (OpCodes.Ldarg_0)
          ctorGets |> Array.iteri (fun i ctorGet ->
              il.Emit (OpCodes.Callvirt, ctorGet)
          )
          il.Emit (OpCodes.Newobj, ctor)
          il.Emit (OpCodes.Ret)
  
          cloneMeth.CreateDelegate (typeof<Func<'T, 'T>>) :?> Func<'T, 'T>
  #else
      type GetMethod<'T> =
          | GetReference of Func<'T, obj>
          | GetValue of ByrefFunc<'T, obj>
  
      type SetMethod<'T> =
          | SetReference of Action<'T, obj>
          | SetValue of ByrefAction<'T, obj>
  
      let createGet<'T> (meth : MethodInfo) =
          let typ = meth.ReturnType
          match isImmutableType typ with
          | true ->
              if typeof<'T>.GetTypeInfo().IsValueType then
                  GetValue (Clone.GetStructMethod<'T> meth)
              else
                  GetReference (Clone.GetMethod<'T> meth)
          | _ -> 
              let helperMethods = moduleType.GetRuntimeMethods ()
              let createCloneMeth = helperMethods |> Seq.find (fun x -> x.Name = "createCloneMethod")
  
              let generic = createCloneMeth.MakeGenericMethod ([|typ|])
  
              let ret = generic.Invoke (null, [||])
              let ret = ret :?> (obj -> obj)
  
              if typeof<'T>.GetTypeInfo().IsValueType then
                  let copy = Clone.GetStructMethod<'T> meth
                  GetValue (ByrefFunc<'T, obj> (fun (t : byref<'T>) -> ret (copy.Invoke (&t))))
               else
                  let copy = Clone.GetMethod<'T> meth
                  GetReference (Func<'T, obj> (fun t -> ret (copy.Invoke (t))))
  
      let createSet<'T> (meth : MethodInfo) = 
          if typeof<'T>.GetTypeInfo().IsValueType then
              Clone.SetStructMethod<'T> meth
              |> SetValue
          else
              Clone.SetMethod<'T> meth
              |> SetReference
  
      let createCloneMethod<'T> () =
          let typ = typeof<'T>
          let ctors = typ.GetTypeInfo().DeclaredConstructors
          let ctor = ctors.ElementAt (0)
          let ctorParams = ctor.GetParameters ()
  
          let runtimeProps = typ.GetRuntimeProperties ()
  
          let ctorProps = 
              ctorParams
              |> Seq.map (fun param ->
                  runtimeProps 
                  |> Seq.find (fun x -> x.Name.ToLowerInvariant() = param.Name.ToLowerInvariant())
              )
              |> Seq.toArray
  
          let props =
              runtimeProps
              |> Seq.choose (fun prop ->
                  if prop.CanRead && prop.CanWrite && not (ctorProps.Contains prop) && not (prop.Name = "Owner") then
                      Some prop
                  else
                      None
              )
              |> Seq.toArray
  
          let ctorGets =
              ctorProps
              |> Array.map (fun x -> createGet<'T> x.GetMethod)
  
          let sets =
  