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

F# RFC FS-1015 - Support for "fixed" #1270

Merged
merged 18 commits into from Jun 27, 2016
Merged

F# RFC FS-1015 - Support for "fixed" #1270

merged 18 commits into from Jun 27, 2016

Conversation

dsyme
Copy link
Contributor

@dsyme dsyme commented Jun 20, 2016

This is the PR for RFC FS-1015 - Support for 'fixed'

  • Complete implementation
  • Add tests
  • Fix baselines

Some tests are present but more are needed.

if /i '%ARG%' == 'ci_part3' (
set BUILD_PROTO=1
set SKIP_EXPENSIVE_TESTS=1
set BUILD_CORECLR=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we building CORECLR without testing it? shouldn't it be already covered in ci_part2?

@dsyme dsyme changed the title [WIP] F# RFC FS-1015 - Support for "fixed" F# RFC FS-1015 - Support for "fixed" Jun 21, 2016
@dsyme
Copy link
Contributor Author

dsyme commented Jun 21, 2016

This is now ready for review and commit

@@ -284,7 +285,7 @@ module Keywords =
[ "atomic"; "break";
"checked"; "component"; "constraint"; "constructor"; "continue";
"eager";
"fixed"; "fori"; "functor";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay! :)

@dsyme
Copy link
Contributor Author

dsyme commented Jun 22, 2016

OK, this is now green - please review!

@ghost
Copy link

ghost commented Jun 22, 2016

It looks like, for str a string, that both

use pStr = fixed str
use (pStr: nativeptr<char>) = fixed str

compile to the native int type in IL, whereas the C# fixed (char* pStr = str) compiles to the char* type in IL.

Not being an expert in how the CLR works, is this a cause for concern?

locals |> ILList.iter (fun l ->
if l.IsPinned then
bb.EmitByte et_PINNED
EmitType cenv env bb l.Type)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please remove the duplication for this logic?
How about a new function EmitTypeOfLocal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, will do

@dsyme
Copy link
Contributor Author

dsyme commented Jun 23, 2016

@codymack As far as I understand things that's not a cause for concern. F# has always used nativeint for pointers, at least within method body code - but operationally there is no difference between the two.

@KevinRansom
Copy link
Member

@dotnet-bot test this please

@KevinRansom
Copy link
Member

KevinRansom commented Jun 24, 2016

@dsyme can you fix the merge issues

@KevinRansom KevinRansom merged commit 858eddf into dotnet:master Jun 27, 2016
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.

None yet

6 participants