Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

teach F# 4.0 compiler about future 4.1+ native intrinsics #16

Closed
wants to merge 1 commit into from

Conversation

dsyme
Copy link
Contributor

@dsyme dsyme commented Jan 15, 2015

In short, I recommend we incorporate this otherwise-harmless change to F# 4.0.

In this comment thread, we are quite concerned about the impact of the F# 4.0 library using new F# library metadata formats that would cause a failure-on-startup if FSharp.Core 4.4.0.0 is fed to an F# 3.1 compiler, regardless of whether the new NativePtr functions are actually used by user code or not.

It is getting harder to do much about F# 3.1 compiler behaviour, but we can at least make sure that the F# 4.0 compiler doesn't suffer the same problem. We can minimally do this by adding the necessary contstructs to the metadata format reader inn the F# 4.0 compiler. These should reeally have been present from the start in all editions of the F# compiler anyway.

@dsyme
Copy link
Contributor Author

dsyme commented Jan 15, 2015

The actual concrete behavioural change this change induces is "If the compiler is given a component whose F# metadata includes inline functions which make use of inline assembly instructions I_sizeof, I_initobj, I_initblk, I_cpobj or I_cpblk instructions, then the compiler won't fail on startup and will emit those instructions correctly"

It's hard to test, because no actual current component has F# metadata containing these instructions, and such components can't be authored by hand by user code. But we do expect future iterations of the F# core library to contain these instructions.

The changes are simple and regular, and are exactly taken from Jack's PR which has been tested.

dsyme added a commit that referenced this pull request Jan 16, 2015
Merge pull request #16 from dsyme/nativeptr-prep
@latkin
Copy link
Contributor

latkin commented Jan 16, 2015

Applied. Sorry, still can't figure out how to have GH mark this as "merged."

@latkin latkin closed this Jan 16, 2015
liboz pushed a commit to liboz/visualfsharp that referenced this pull request Oct 22, 2016
Seq.iteri, exists, contains, forall, trypick, pick, tryfind, find, re…
KevinRansom pushed a commit to KevinRansom/fsharp that referenced this pull request May 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants