Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb075598

Browse files
committed
Integrate changes from Microsoft Visual F# source code drophttp://fsharppowerpack.codeplex.com up to change 71609, including changes for VS2012 Update 2 - Portable Async and Query fixes
1 parent297d16a commitb075598

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

‎src/absil/il.fs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,9 @@ type ILAssemblyRef(data) =
515515
letv= pkt.[i]
516516
addC(convDigit(System.Convert.ToInt32(v)/16))
517517
addC(convDigit(System.Convert.ToInt32(v)%16))
518+
// retargetable can be true only for system assemblies that definitely have Version
519+
if aref.Retargetablethen
520+
add", Retargetable=Yes"
518521
b.ToString()
519522

520523

‎src/fsharp/FSharp.Core/Linq.fs‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,15 @@ module LeafExpressionConverter =
207207
letgmd=if isg1then minfo.GetGenericMethodDefinition()elsenull
208208
(fun tm->
209209
match tmwith
210+
| Call(obj,minfo2,args)
211+
when(
210212
#if FX_NO_REFLECTION_METADATA_TOKENS
211-
| Call(obj,minfo2,args)when(minfo= minfo2)->
212-
ignore gmd
213213
#else
214-
| Call(obj,minfo2,args)when(minfo.MetadataToken= minfo2.MetadataToken&&
215-
if isg1then minfo2.IsGenericMethod&& gmd= minfo2.GetGenericMethodDefinition()
216-
else minfo= minfo2)->
217-
#endif
214+
minfo.MetadataToken= minfo2.MetadataToken&&
215+
#endif
216+
if isg1then minfo2.IsGenericMethod&& gmd= minfo2.GetGenericMethodDefinition()
217+
else minfo= minfo2
218+
)->
218219
Some(obj,(minfo2.GetGenericArguments()|> Array.toList),args)
219220
|_-> None)
220221

@@ -733,9 +734,9 @@ module LeafExpressionConverter =
733734
letvP= ConvVarToLinq v
734735
letenv={ envwith varEnv= Map.add v(vP|> asExpr) env.varEnv}
735736
#if FX_NO_CONVERTER
736-
lettyargs=[| v.Type|]
737+
lettyargs=[| v.Type; body.Type|]
737738
letbodyP= ConvExprToLinqInContext env body
738-
letconvType= typedefof<Action<_>>.MakeGenericType tyargs
739+
letconvType= typedefof<Func<_,_>>.MakeGenericType tyargs
739740
#else
740741
lettyargs=[| v.Type; body.Type|]
741742
letbodyP= ConvExprToLinqInContext env body

‎src/fsharp/FSharp.Core/control.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ namespace Microsoft.FSharp.Control
446446
loop firstAction
447447
finally
448448
#if FX_NO_THREAD_STATIC
449+
()
449450
#else
450451
if thisIsTopTrampolinethen
451452
Trampoline.thisThreadHasTrampoline<-false
@@ -530,7 +531,6 @@ namespace Microsoft.FSharp.Control
530531
memberthis.Protect firstAction=
531532
trampoline<-new Trampoline()
532533
trampoline.ExecuteAction(firstAction)
533-
FakeUnit
534534

535535
memberthis.Trampoline= trampoline
536536

@@ -1829,7 +1829,7 @@ namespace Microsoft.FSharp.Control
18291829
resultCell.RegisterResult(res,reuseThread=true)|> unfake)
18301830
anddel=
18311831
#if FX_ATLEAST_PORTABLE
1832-
letinvokeMeth=(typeof<Closure<'T>>).GetMethod("Invoke")
1832+
letinvokeMeth=(typeof<Closure<'T>>).GetMethod("Invoke", System.Reflection.BindingFlags.NonPublic||| System.Reflection.BindingFlags.Public||| System.Reflection.BindingFlags.Instance)
18331833
System.Delegate.CreateDelegate(typeof<'Delegate>, obj, invokeMeth):?> 'Delegate
18341834
#else
18351835
System.Delegate.CreateDelegate(typeof<'Delegate>, obj,"Invoke"):?> 'Delegate

‎src/fsharp/FSharp.Core/prim-types.fs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3112,6 +3112,10 @@ namespace Microsoft.FSharp.Core
31123112

31133113
typeFSharpFunc<'T,'Res>with
31143114
#if FX_NO_CONVERTER
3115+
[<CodeAnalysis.SuppressMessage("Microsoft.Usage","CA2225:OperatorOverloadsHaveNamedAlternates")>]
3116+
static memberop_Implicit(f:System.Func<_,_>):('T-> 'Res) =(fun t-> f.Invoke(t))
3117+
[<CodeAnalysis.SuppressMessage("Microsoft.Usage","CA2225:OperatorOverloadsHaveNamedAlternates")>]
3118+
static memberop_Implicit(f:('T-> 'Res) )=new System.Func<'T,'Res>(f)
31153119
#else
31163120
[<CodeAnalysis.SuppressMessage("Microsoft.Usage","CA2225:OperatorOverloadsHaveNamedAlternates")>]
31173121
static memberop_Implicit(f:System.Converter<_,_>):('T-> 'Res) =(fun t-> f.Invoke(t))

‎src/fsharp/FSharp.Core/quotations.fs‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -911,11 +911,7 @@ module Patterns =
911911
bindMethodBySearch(parentT,nm,marity,argtys,rty)
912912

913913
letbindModuleProperty(ty:Type,nm)=
914-
#if FX_ATLEAST_PORTABLE
915-
match ty.GetProperty(nm)with
916-
#else
917914
match ty.GetProperty(nm,staticBindingFlags)with
918-
#endif
919915
|null-> raise<| System.InvalidOperationException(SR.GetString2(SR.QcannotBindProperty, nm, ty.ToString()))
920916
| res-> res
921917

@@ -1765,7 +1761,7 @@ module DerivedPatterns =
17651761
match tmwith
17661762
| Call(obj,minfo2,args)
17671763
#if FX_NO_REFLECTION_METADATA_TOKENS
1768-
when(minfo1.MethodHandle= minfo2.MethodHandle&&
1764+
when(// if metadata tokens are not available we'll rely only on equality of method references
17691765
#else
17701766
when(minfo1.MetadataToken= minfo2.MetadataToken&&
17711767
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp