Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Will LLILC be expected to work with F# code too? #980

Closed
7sharp9 opened this issue Dec 22, 2015 · 4 comments
Closed

Will LLILC be expected to work with F# code too? #980

7sharp9 opened this issue Dec 22, 2015 · 4 comments

Comments

@7sharp9
Copy link

7sharp9 commented Dec 22, 2015

If so it would be great to get a few simple tests in place to see this evolve over time :-)

@AndyAyersMS
Copy link
Member

Yes, LLILC should be able to process any and all valid CIL.

It would be great to have F# tests for RyuJit too.

I don't believe anyone on our team has yet looked into what it would take to get F# tests added. We build tests from source so we'd need a cross-platform capable toolset. We could start with just windows support if there's a plausible roadmap suggesting how we'd have general cross-platform support (similar to what we're doing with IL-based tests and ILASM).

We have this on our roadmap and will get around to it sometime in the not-too-distant future, but we'd certainly welcome PRs here too.

@7sharp9
Copy link
Author

7sharp9 commented Dec 23, 2015

I'm using F# from mono on OSX, incidentally the F# compiler is bundled with mono.

Work is currently underway to support F# with coreclr I'm not entirely sure how coreclr will be deployed on OSx, currently there is still a dependency on mono until nuget is ported I think.

@DemiMarie
Copy link

I suspect that the hardest part will be mandatory tail calls. In F# these are not an optimization – they are guaranteed by the language specification, and the runtime must support them no matter what the caller and callee are.

LLVM supports this but only if the fastcc calling convention is used, which is incompatible with that of CoreCLR. One solution is to generate duplicate copies of the method: one exposed to the VM and one private to the JIT.

@enricosada
Copy link

@AndyAyersMS can you pls add some info? and maybe a link to an existing test you need in f#? or how we can help with this project or somethere else (coreclr/corert)?

Now the .NET Core sdk support F# OOTB, the fsharp compiler, the FSharp.Core library are both netstandard and works on all os supported by .net core sdk (osx/ubuntu/win)

using .net core sdk 1.0.0-preview2-003131 (the september update):

dotnet new --lang fsharp
dotnet restore
dotnet build

how can we help?

@7sharp9 7sharp9 closed this as completed Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants