[Pkg-cli-apps-commits] [fsharp] 02/71: Integrate changes from Microsoft Visual F# source code drop http://fsharppowerpack.codeplex.com up to change 71609, including changes for VS2012 Update 2 - Portable Async and Query fixes
Christopher Halse Rogers
raof-guest at moszumanska.debian.org
Fri Jan 17 05:18:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
raof-guest pushed a commit to tag 3.1.0
in repository fsharp.
commit 07781b99bdd625203b53bc153b55497fdf784f29
Author: Don Syme <donsyme at fastmail.fm>
Date: Fri May 3 16:06:23 2013 +0200
Integrate changes from Microsoft Visual F# source code drop http://fsharppowerpack.codeplex.com up to change 71609, including changes for VS2012 Update 2 - Portable Async and Query fixes
---
src/absil/il.fs | 3 +++
src/fsharp/FSharp.Core/Linq.fs | 19 ++++++++++---------
src/fsharp/FSharp.Core/control.fs | 3 ++-
src/fsharp/FSharp.Core/prim-types.fs | 4 ++++
src/fsharp/FSharp.Core/quotations.fs | 6 +-----
5 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/src/absil/il.fs b/src/absil/il.fs
index 0dc3194..699bee0 100755
--- a/src/absil/il.fs
+++ b/src/absil/il.fs
@@ -515,6 +515,9 @@ type ILAssemblyRef(data) =
let v = pkt.[i]
addC (convDigit(System.Convert.ToInt32(v)/16))
addC (convDigit(System.Convert.ToInt32(v)%16))
+ // retargetable can be true only for system assemblies that definitely have Version
+ if aref.Retargetable then
+ add ", Retargetable=Yes"
b.ToString()
diff --git a/src/fsharp/FSharp.Core/Linq.fs b/src/fsharp/FSharp.Core/Linq.fs
index 7fcf563..7fbaa71 100755
--- a/src/fsharp/FSharp.Core/Linq.fs
+++ b/src/fsharp/FSharp.Core/Linq.fs
@@ -207,14 +207,15 @@ module LeafExpressionConverter =
let gmd = if isg1 then minfo.GetGenericMethodDefinition() else null
(fun tm ->
match tm with
+ | Call(obj,minfo2,args)
+ when (
#if FX_NO_REFLECTION_METADATA_TOKENS
- | Call(obj,minfo2,args) when (minfo = minfo2) ->
- ignore gmd
#else
- | Call(obj,minfo2,args) when (minfo.MetadataToken = minfo2.MetadataToken &&
- if isg1 then minfo2.IsGenericMethod && gmd = minfo2.GetGenericMethodDefinition()
- else minfo = minfo2) ->
-#endif
+ minfo.MetadataToken = minfo2.MetadataToken &&
+#endif
+ if isg1 then minfo2.IsGenericMethod && gmd = minfo2.GetGenericMethodDefinition()
+ else minfo = minfo2
+ ) ->
Some(obj,(minfo2.GetGenericArguments() |> Array.toList),args)
| _ -> None)
@@ -733,9 +734,9 @@ module LeafExpressionConverter =
let vP = ConvVarToLinq v
let env = { env with varEnv = Map.add v (vP |> asExpr) env.varEnv }
#if FX_NO_CONVERTER
- let tyargs = [| v.Type |]
+ let tyargs = [| v.Type; body.Type |]
let bodyP = ConvExprToLinqInContext env body
- let convType = typedefof<Action<_>>.MakeGenericType tyargs
+ let convType = typedefof<Func<_, _>>.MakeGenericType tyargs
#else
let tyargs = [| v.Type; body.Type |]
let bodyP = ConvExprToLinqInContext env body
@@ -796,4 +797,4 @@ module LeafExpressionConverter =
#endif
-
\ No newline at end of file
+
diff --git a/src/fsharp/FSharp.Core/control.fs b/src/fsharp/FSharp.Core/control.fs
index ff33292..4a02557 100755
--- a/src/fsharp/FSharp.Core/control.fs
+++ b/src/fsharp/FSharp.Core/control.fs
@@ -445,6 +445,7 @@ namespace Microsoft.FSharp.Control
loop firstAction
finally
#if FX_NO_THREAD_STATIC
+ ()
#else
if thisIsTopTrampoline then
Trampoline.thisThreadHasTrampoline <- false
@@ -1816,7 +1817,7 @@ namespace Microsoft.FSharp.Control
resultCell.RegisterResult(res,reuseThread=true) |> unfake)
and del =
#if FX_ATLEAST_PORTABLE
- let invokeMeth = (typeof<Closure<'T>>).GetMethod("Invoke")
+ let invokeMeth = (typeof<Closure<'T>>).GetMethod("Invoke", System.Reflection.BindingFlags.NonPublic ||| System.Reflection.BindingFlags.Public ||| System.Reflection.BindingFlags.Instance)
System.Delegate.CreateDelegate(typeof<'Delegate>, obj, invokeMeth) :?> 'Delegate
#else
System.Delegate.CreateDelegate(typeof<'Delegate>, obj, "Invoke") :?> 'Delegate
diff --git a/src/fsharp/FSharp.Core/prim-types.fs b/src/fsharp/FSharp.Core/prim-types.fs
index 5fa0179..5b31256 100755
--- a/src/fsharp/FSharp.Core/prim-types.fs
+++ b/src/fsharp/FSharp.Core/prim-types.fs
@@ -3112,6 +3112,10 @@ namespace Microsoft.FSharp.Core
type FSharpFunc<'T,'Res> with
#if FX_NO_CONVERTER
+ [<CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates")>]
+ static member op_Implicit(f : System.Func<_,_>) : ('T -> 'Res) = (fun t -> f.Invoke(t))
+ [<CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates")>]
+ static member op_Implicit( f : ('T -> 'Res) ) = new System.Func<'T,'Res>(f)
#else
[<CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates")>]
static member op_Implicit(f : System.Converter<_,_>) : ('T -> 'Res) = (fun t -> f.Invoke(t))
diff --git a/src/fsharp/FSharp.Core/quotations.fs b/src/fsharp/FSharp.Core/quotations.fs
index 26945a4..e2b3022 100755
--- a/src/fsharp/FSharp.Core/quotations.fs
+++ b/src/fsharp/FSharp.Core/quotations.fs
@@ -911,11 +911,7 @@ module Patterns =
bindMethodBySearch(parentT,nm,marity,argtys,rty)
let bindModuleProperty (ty:Type,nm) =
-#if FX_ATLEAST_PORTABLE
- match ty.GetProperty(nm) with
-#else
match ty.GetProperty(nm,staticBindingFlags) with
-#endif
| null -> raise <| System.InvalidOperationException (SR.GetString2(SR.QcannotBindProperty, nm, ty.ToString()))
| res -> res
@@ -1765,7 +1761,7 @@ module DerivedPatterns =
match tm with
| Call(obj,minfo2,args)
#if FX_NO_REFLECTION_METADATA_TOKENS
- when (minfo1.MethodHandle = minfo2.MethodHandle &&
+ when ( // if metadata tokens are not available we'll rely only on equality of method references
#else
when (minfo1.MetadataToken = minfo2.MetadataToken &&
#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-apps/packages/fsharp.git
More information about the Pkg-cli-apps-commits
mailing list