Permalink
Browse files

Merge branch 'master' of https://github.com/fsharp/fsharp

  • Loading branch information...
2 parents 6c235ac + bcfd8ce commit e6351d4fddff42759520324fb88421ccacc0e2e0 @dsyme dsyme committed Feb 22, 2013
View
@@ -51,5 +51,6 @@ src/fsharp/FSharp.Compiler-proto/pars.fs
src/fsharp/FSharp.Compiler-proto/pars.fsi
*~
tests/projects/Sample_VS2012_FSharp_ConsoleApp_net45_with_resource/Sample_VS2012_FSharp_ConsoleApp_net45/Sample_VS2012_FSharp_ConsoleApp_net45.sln
-
tests/projects/Sample_VS2012_FSharp_ConsoleApp_net45_with_resource/Sample_VS2012_FSharp_ConsoleApp_net45/Sample_VS2012_FSharp_ConsoleApp_net45.userprefs
+*.suo
+obj
View
@@ -37,31 +37,25 @@ sudo make install
```
cd src
msbuild fsharp-proto-build.proj
+ngen install ..\lib\proto\4.0\fsc-proto.exe (optional)
msbuild fsharp-library-build.proj
msbuild fsharp-compiler-build.proj
```
-You can also build the FSharp.Core for .NET 2.0, Mono 2.1 and Silverlight 5.0 profiles:
+You can also build the FSharp.Core for .NET 2.0, Mono 2.1, Silverlight 5.0, Windows Phone 7.1, Portable Profile47 (net45+sl5+win8), Portable Profile88 (net4+sl4+wp71+win8) and XNA 4.0 for Xbox 360 profiles:
```
msbuild fsharp-library-build.proj /p:TargetFramework=net20
msbuild fsharp-library-build.proj /p:TargetFramework=mono21
+msbuild fsharp-library-build.proj /p:TargetFramework=portable-net45+sl5+win8
+msbuild fsharp-library-build.proj /p:TargetFramework=portable-net4+sl4+wp71+win8
msbuild fsharp-library-build.proj /p:TargetFramework=sl5
+msbuild fsharp-library-build.proj /p:TargetFramework=wp7
+msbuild fsharp-library-build.proj /p:TargetFramework=net40-xna40-xbox360
```
-
You can also build the FSharp.Core and FSharp.Compiler.Silverlight.dll for Silverlight 5.0:
```
msbuild fsharp-library-build.proj /p:TargetFramework=sl5-compiler
msbuild fsharp-compiler-build.proj /p:TargetFramework=sl5-compiler
```
-And for Release versions of the same:
-```
-msbuild fsharp-library-build.proj /p:Configuration=Release
-msbuild fsharp-compiler-build.proj /p:Configuration=Release
-msbuild fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Release
-msbuild fsharp-library-build.proj /p:TargetFramework=mono21 /p:Configuration=Release
-msbuild fsharp-library-build.proj /p:TargetFramework=sl5 /p:Configuration=Release
-msbuild fsharp-library-build.proj /p:TargetFramework=sl5-compiler /p:Configuration=Release
-msbuild fsharp-compiler-build.proj /p:TargetFramework=sl5-compiler /p:Configuration=Release
-```
### On Windows, using xbuild (e.g. if no .NET is installed and only Mono 3.0 is installed):
```
View
@@ -65,7 +65,7 @@ SIGN_FLAGS = \
DEFINES_GENERAL = \
--define:TRACE \
- --define:MONO
+ --define:CROSS_PLATFORM_COMPILER
ifeq ($(CONFIG),debug)
DEFINES_DEBUG = \
View
@@ -19,11 +19,14 @@ if ! pkg-config --atleast-version=$MONO_REQUIRED_VERSION mono; then
AC_MSG_ERROR("You need mono $MONO_REQUIRED_VERSION")
fi
+AC_PATH_PROG(MONO_SGEN, mono-sgen, no)
+
if ! pkg-config --atleast-version=$MONO_RECOMMENDED_VERSION mono; then
AC_MSG_WARN([Mono $MONO_RECOMMENDED_VERSION or higher is recommended, for better MSBuild (xbuild) compatibility])
-fi
-AC_PATH_PROG(MONO_SGEN, mono-sgen, no)
+ # stability of Mono's SGEN GC is not so good in older versions than Mono v3.0
+ MONO_SGEN=no
+fi
# Checks for libraries.
View
@@ -1,23 +1,23 @@
#!/bin/sh
EXEC="exec "
-if test x$1 = x--debug; then
+if test x"$1" = x--debug; then
DEBUG=--debug
shift
fi
-if test x$1 = x--gdb; then
+if test x"$1" = x--gdb; then
shift
EXEC="gdb --eval-command=run --args "
fi
-if test x$1 = x--valgrind; then
+if test x"$1" = x--valgrind; then
shift
EXEC="valgrind $VALGRIND_OPTIONS"
fi
MONO_GC_OPTIONS=@mono_gc_options@
-if test x$1 = x--gc=boehm; then
+if test x"$1" = x--gc=boehm; then
shift
MONO_GC_OPTIONS=--gc=boehm
fi
@@ -27,4 +27,4 @@ fi
# location of the default FSharp install in order to find the FSharp compiler binaries (see
# fsharpbinding/MonoDevelop.FSharpBinding/Services/CompilerLocationUtils.fs). That's a pretty unfortunate
# way of finding those binaries. And really should be changed.
-$EXEC mono $DEBUG $MONO_OPTIONS $MONO_GC_OPTIONS @DIR@/@TOOL@ $@
+$EXEC mono $DEBUG $MONO_OPTIONS $MONO_GC_OPTIONS @DIR@/@TOOL@ "$@"
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -2,10 +2,9 @@
namespace Microsoft.FSharp
open System.Reflection
[<assembly:AssemblyDescription("FSharp.Build.dll")>]
-[<assembly:AssemblyCompany("Microsoft Corporation")>]
[<assembly:AssemblyTitle("FSharp.Build.dll")>]
-[<assembly:AssemblyCopyright("\169 Microsoft Corporation. Apache 2.0 License.")>]
-[<assembly:AssemblyProduct("Microsoft\174 F#")>]
+[<assembly:AssemblyCopyright("\169 Microsoft Corporation and other contributors. Apache 2.0 License.")>]
+[<assembly:AssemblyProduct("F# (open source edition)")>]
do()
#if NO_STRONG_NAMES
@@ -2,10 +2,9 @@
namespace Microsoft.FSharp
open System.Reflection
[<assembly:AssemblyDescription("FSharp.Compiler.Interactive.Settings.dll")>]
-[<assembly:AssemblyCompany("Microsoft Corporation")>]
[<assembly:AssemblyTitle("FSharp.Compiler.Interactive.Settings.dll")>]
-[<assembly:AssemblyCopyright("\169 Microsoft Corporation. Apache 2.0 License.")>]
-[<assembly:AssemblyProduct("Microsoft\174 F#")>]
+[<assembly:AssemblyCopyright("\169 Microsoft Corporation and other contributors. Apache 2.0 License.")>]
+[<assembly:AssemblyProduct("F# (open source edition)")>]
#if NO_STRONG_NAMES
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsi")>]
@@ -3,10 +3,9 @@ namespace Microsoft.FSharp
open System.Reflection
[<assembly:AssemblyDescription("FSharp.Compiler.Server.Shared.dll")>]
-[<assembly:AssemblyCompany("Microsoft Corporation")>]
[<assembly:AssemblyTitle("FSharp.Compiler.Server.Shared.dll")>]
-[<assembly:AssemblyCopyright("\169 Microsoft Corporation. Apache 2.0 License.")>]
-[<assembly:AssemblyProduct("Microsoft\174 F#")>]
+[<assembly:AssemblyCopyright("\169 Microsoft Corporation and other contributors. Apache 2.0 License.")>]
+[<assembly:AssemblyProduct("F# (open source edition)")>]
#if NO_STRONG_NAMES
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsi")>]
@@ -3,10 +3,9 @@ namespace Microsoft.FSharp
open System.Reflection
[<assembly:AssemblyDescription("FSharp.Compiler.Silverlight.dll")>]
-[<assembly:AssemblyCompany("Microsoft Corporation")>]
[<assembly:AssemblyTitle("FSharp.Compiler.Silverlight.dll")>]
-[<assembly:AssemblyCopyright("\169 Microsoft Corporation. Apache 2.0 License.")>]
-[<assembly:AssemblyProduct("Microsoft\174 F#")>]
+[<assembly:AssemblyCopyright("\169 Microsoft Corporation and other contributors. Apache 2.0 License.")>]
+[<assembly:AssemblyProduct("F# (open source edition)")>]
// Note: internals visible to unit test DLLs in Retail (and all) builds.
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Salsa")>]
@@ -3,10 +3,10 @@ namespace Microsoft.FSharp
open System.Reflection
[<assembly:AssemblyDescription("FSharp.Compiler.dll")>]
-[<assembly:AssemblyCompany("Microsoft Corporation")>]
[<assembly:AssemblyTitle("FSharp.Compiler.dll")>]
-[<assembly:AssemblyCopyright("\169 Microsoft Corporation. Apache 2.0 License.")>]
-[<assembly:AssemblyProduct("Microsoft\174 F#")>]
+[<assembly:AssemblyCopyright("\169 Microsoft Corporation and other contributors. Apache 2.0 License.")>]
+[<assembly:AssemblyProduct("F# (open source edition)")>]
+
#if NO_STRONG_NAMES
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsc")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsi")>]
@@ -2,10 +2,9 @@
namespace Microsoft.FSharp
open System.Reflection
[<assembly:AssemblyDescription("FSharp.Core.dll")>]
-[<assembly:AssemblyCompany("Microsoft Corporation")>]
[<assembly:AssemblyTitle("FSharp.Core.dll")>]
-[<assembly:AssemblyCopyright("\169 Microsoft Corporation. Apache 2.0 License.")>]
-[<assembly:AssemblyProduct("Microsoft\174 F#")>]
+[<assembly:AssemblyCopyright("\169 Microsoft Corporation and other contributors. Apache 2.0 License.")>]
+[<assembly:AssemblyProduct("F# (open source edition)")>]
#if PORTABLE
[<assembly:AssemblyProduct("Microsoft\174 F#")>]
@@ -0,0 +1,26 @@
+#light
+namespace Microsoft.FSharp
+open System.Reflection
+[<assembly:AssemblyDescription("FSharp.Data.TypeProviders.dll")>]
+[<assembly:AssemblyTitle("FSharp.Data.TypeProviders.dll")>]
+[<assembly:AssemblyCopyright("\169 Microsoft Corporation and other contributors. Apache 2.0 License.")>]
+[<assembly:AssemblyProduct("F# (open source edition)")>]
+do()
+
+#if NO_STRONG_NAMES
+[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Unittests")>]
+[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("SystematicUnitTests")>]
+#endif
+
+#if STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY
+[<assembly:AssemblyFileVersion("4.0.40401.666")>] // ensure we replace any 4.0.30319.* or 4.0.31105.* versions in the GAC. These are the FileVersions for RTM VS2010 and SP1 VS2010
+[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
+[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("SystematicUnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
+#endif
+
+#if STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY
+[<assembly:AssemblyFileVersion("4.0.40401.666")>] // ensure we replace any 4.0.30319.* or 4.0.31105.* versions in the GAC. These are the FileVersions for RTM VS2010 and SP1 VS2010
+[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
+[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("SystematicUnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
+#endif
+do()
@@ -13,6 +13,7 @@
<!-- Core library: all frameworks -->
<ItemGroup>
<ProjectFiles Include="fsharp\FSharp.Core\FSharp.Core.fsproj"/>
+ <ProjectFiles Include="fsharp\FSharp.Data.TypeProviders\FSharp.Data.TypeProviders.fsproj" Condition="'$(TargetFramework)'=='net40'"/>
</ItemGroup>
<Import Project="root.traversal.targets"/>
@@ -10,7 +10,7 @@
</PropertyGroup>
<!-- Core library tests: all except compact framework (no nunit there) -->
- <ItemGroup Condition=" '$(TargetFramework)' != 'sl3-wp' and '$(TargetFramework)' != 'sl5'">
+ <ItemGroup Condition=" '$(TargetFramework)' != 'wp7' and '$(TargetFramework)' != 'sl5'">
<ProjectFiles Include="fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj"/>
</ItemGroup>
@@ -41,21 +41,21 @@
<DebugSymbols>False</DebugSymbols>
</PropertyGroup>
<ItemGroup>
- <Reference Include="nunit.framework" Condition="'$(TargetFramework)' != 'sl5' AND '$(TargetFramework)' != 'sl5-compiler' AND '$(TargetFramework)' != 'sl3-wp'" />
- <Reference Include="NUnitFramework" Condition="'$(TargetFramework)' == 'sl5' OR '$(TargetFramework)' == 'sl3-wp' OR '$(TargetFramework)' == 'sl5-compiler'" />
+ <Reference Include="nunit.framework" Condition="'$(TargetFramework)' != 'sl5' AND '$(TargetFramework)' != 'sl5-compiler' AND '$(TargetFramework)' != 'wp7'" />
+ <Reference Include="NUnitFramework" Condition="'$(TargetFramework)' == 'sl5' OR '$(TargetFramework)' == 'wp7' OR '$(TargetFramework)' == 'sl5-compiler'" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Numerics" Condition="'$(TargetFramework)' == 'net40'" />
<Reference Include="System.Core" />
<Reference Include="System.Net" Condition="'$(TargetFramework)' == 'sl5' OR '$(TargetFramework)' == 'sl5-compiler' " />
- <Reference Include="System.Observable" Condition="'$(TargetFramework)' == 'sl3-wp' " />
+ <Reference Include="System.Observable" Condition="'$(TargetFramework)' == 'wp7' " />
<ProjectReference Include="..\FSharp.Core\FSharp.Core.fsproj">
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
<Name>FSharp.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <Compile Include="NUnitFrameworkShims.fs" Condition="'$(TargetFramework)' == 'sl3-wp'" />
+ <Compile Include="NUnitFrameworkShims.fs" Condition="'$(TargetFramework)' == 'wp7'" />
<Compile Include="LibraryTestFx.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ArrayModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ArrayModule2.fs" />
@@ -212,15 +212,16 @@
</CustomAdditionalCompileInputs>
</ItemGroup>
<ItemGroup>
- <Reference Include="mscorlib" />
+ <Reference Include="mscorlib" Condition="'$(TargetFramework)' != 'wp7' " />
<Reference Include="System" />
<Reference Include="System.Numerics" Condition="'$(TargetFramework)' == 'net40'" />
- <Reference Include="System.Net" Condition="'$(TargetFramework)' == 'sl5' OR '$(TargetFramework)' == 'sl5-compiler' OR '$(TargetFramework)' == 'XNA\5.0' OR '$(TargetFramework)' == 'sl3-wp' " />
- <Reference Include="System.Observable" Condition="'$(TargetFramework)' == 'sl3-wp' " />
- <Reference Include="System.Core" Condition="'$(TargetFramework)' == 'sl5' OR '$(TargetFramework)' == 'sl5-compiler' OR '$(TargetFramework)' == 'XNA\5.0' OR '$(TargetFramework)' == 'sl3-wp' " />
+ <Reference Include="System.Net" Condition="'$(TargetFramework)' == 'sl5' OR '$(TargetFramework)' == 'sl5-compiler' OR '$(TargetFramework)' == 'XNA\5.0' OR '$(TargetFramework)' == 'wp7' OR '$(TargetFramework)' == 'portable-net4+sl4+wp71+win8' OR '$(TargetFramework)' == 'portable-net45+sl5+win8' OR '$(TargetFramework)' == 'net40-xna40-xbox360' " />
+ <Reference Include="System.Observable" Condition="'$(TargetFramework)' == 'wp7' " />
+ <Reference Include="System.Core" Condition="'$(TargetFramework)' == 'sl5' OR '$(TargetFramework)' == 'sl5-compiler' OR '$(TargetFramework)' == 'XNA\5.0' OR '$(TargetFramework)' == 'wp7' OR '$(TargetFramework)' == 'portable-net4+sl4+wp71+win8' OR '$(TargetFramework)' == 'portable-net45+sl5+win8' OR '$(TargetFramework)' == 'net40-xna40-xbox360' " />
</ItemGroup>
<!-- References -->
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" Condition="'$(TargetFramework)'=='net40-xna40-xbox360'"/>
<!-- Hook compilation phase to do custom work -->
<PropertyGroup>
<PrepareForRunDependsOn>$(PrepareForRunDependsOn);CopyToBuiltBin</PrepareForRunDependsOn>
@@ -781,7 +781,10 @@ module LeafExpressionConverter =
// provides no other way to evaluate the expression.
//
// REVIEW: It is possible it is just better to interpret the expression in many common cases, e.g. property-gets, values etc.
- let EvaluateQuotation (e: Microsoft.FSharp.Quotations.Expr) =
+ let EvaluateQuotation (e: Microsoft.FSharp.Quotations.Expr) : obj =
+#if FX_NO_QUOTATIONS_COMPILE
+ raise (new NotSupportedException())
+#else
match e with
| Value (obj,_) -> obj
| _ ->
@@ -793,7 +796,7 @@ module LeafExpressionConverter =
d.DynamicInvoke [| box () |]
with :? System.Reflection.TargetInvocationException as exn ->
raise exn.InnerException
-
+#endif
#endif
-
+
@@ -402,7 +402,12 @@ namespace Microsoft.FSharp.Control
[<AllowNullLiteral>]
type Trampoline() =
-
+
+ let mutable cont = None
+ let mutable bindCount = 0
+
+ static let unfake FakeUnit = ()
+
[<Literal>]
static let bindLimitBeforeHijack = 300
#if FX_NO_THREAD_STATIC
@@ -418,10 +423,6 @@ namespace Microsoft.FSharp.Control
#else
Trampoline.thisThreadHasTrampoline
#endif
- let mutable cont = None
- let mutable bindCount = 0
-
- static let unfake FakeUnit = ()
// Install a trampolineStack if none exists
member this.ExecuteAction (firstAction : unit -> FakeUnitValue) =
@@ -529,6 +530,7 @@ namespace Microsoft.FSharp.Control
member this.Protect firstAction =
trampoline <- new Trampoline()
trampoline.ExecuteAction(firstAction)
+ FakeUnit
member this.Trampoline = trampoline
@@ -1495,11 +1497,21 @@ namespace Microsoft.FSharp.Control
Async.Start (async { do (ccont e |> unfake) })
// register cancellation handler
- let registration = aux.token.Register(fun () -> cancel (OperationCanceledException()))
+ let registration = aux.token.Register((fun _ -> cancel (OperationCanceledException())), null)
// run actual await routine
// callback will be executed on the thread pool so we need to use TrampolineHolder.Protect to install trampoline
try
+#if FX_NO_TASK
+ ThreadPool.QueueUserWorkItem((fun _ ->
+ let asyncResult = WaitHandleIAsyncResult(waitHandle) :> System.IAsyncResult
+ if asyncResult.IsCompleted then
+ if latch.Enter() then
+ registration.Dispose()
+ aux.trampolineHolder.Protect(fun () -> scont true)
+ |> unfake
+ ), null) |> ignore
+#else
Task.Factory.FromAsync
(
WaitHandleIAsyncResult(waitHandle),
@@ -1510,6 +1522,7 @@ namespace Microsoft.FSharp.Control
|> unfake
)
|> ignore
+#endif
// if user has specified timeout different from Timeout.Infinite
// then start another async to track timeout expiration
// StartWithContinuations already installs trampoline so we can invoke continuation directly
Oops, something went wrong.

0 comments on commit e6351d4

Please sign in to comment.