Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
3b8bf45
Add compiler tests for currently allowed fixed expressions
jwosty Jul 22, 2023
fa02474
Make typechecker accept arbitrary byref pinning in `fixed` expressions
jwosty Jul 22, 2023
819890b
Make typechecker accept GetPinnableReference() in fixed expressions
jwosty Jul 26, 2023
c0fca86
Add IL compiler tests for currently allowed fixed expressions
jwosty Jul 27, 2023
d523744
Write codegen tests for fixed expressions with byrefs
jwosty Jul 27, 2023
56b9eb0
Write codegen for pinning custom byref type via GetPinnableReference
jwosty Jul 27, 2023
c5e9fbd
Make fixed expressions work properly with Span and Span-like types
jwosty Jul 27, 2023
4d00bb5
Make fixed expr work with generic extension GetPinnableReference method
jwosty Jul 28, 2023
53b5920
Reject fixed expressions when used with static GetPinnableReference m…
jwosty Jul 28, 2023
653daca
Write more fixed expression codegen tests
jwosty Jul 28, 2023
fda843a
Try to make test pass in CI
jwosty Jul 28, 2023
e479305
Merge remote-tracking branch 'upstream/main' into jw-fs1081-extend-fi…
jwosty Jul 28, 2023
aadc045
Fix test mistakes - all new tests should be green now
jwosty Jul 28, 2023
cd4c932
Create extended-fixed-bindings language switch
jwosty Jul 28, 2023
b52e1b4
Update FS3207 error message text to include new criteria
jwosty Jul 28, 2023
a202926
Exclude some tests for .net framework, which lacks Span<T>
jwosty Jul 28, 2023
771f021
Fix more CI test issues
jwosty Jul 28, 2023
224bae9
Add a fixed expr struct test that works under .net framework
jwosty Jul 28, 2023
33e595b
Update baselines
jwosty Jul 28, 2023
287caa9
Add more tests to cover original baselines
jwosty Jul 28, 2023
2a1f50a
Attempt more CI test fixes
jwosty Jul 28, 2023
e57d48a
Feature-flag fixed expr codegen tests
jwosty Jul 28, 2023
cd3d09b
Add missing [<Fact>] to activate a test
jwosty Jul 28, 2023
98d114d
Parameterize all fixed expr tests with feature flags
jwosty Jul 28, 2023
69281a6
Add negative tests for fixed expr feature flagging
jwosty Jul 28, 2023
f827244
Make extended fixed bindings obey feature flag
jwosty Jul 28, 2023
2e08260
Add a test case highlighting a new (fixed?) behavior
jwosty Jul 28, 2023
79817ca
Raise FS3350 (feature unavailable) when necessary for fixed bindings
jwosty Jul 28, 2023
1e4b10b
Use GetPinnableReference method on strings when available
jwosty Jul 29, 2023
1ecf841
Prevent method inlining to make tests clearer
jwosty Jul 29, 2023
7647990
Add a generated null check for reference types
jwosty Jul 29, 2023
1ca8485
Refactor
jwosty Jul 29, 2023
2b8e64e
Merge remote-tracking branch 'upstream/main' into jw-fs1081-extend-fi…
jwosty Jul 31, 2023
8cb46a4
Fix baselines
jwosty Aug 1, 2023
71e1146
Merge branch 'main' into jw-fs1081-extend-fixed-expressions
jwosty Aug 1, 2023
8445ffd
Merge branch 'main' into jw-fs1081-extend-fixed-expressions
jwosty Aug 1, 2023
091684f
Merge branch 'main' into jw-fs1081-extend-fixed-expressions
jwosty Aug 3, 2023
e55e801
Merge branch 'main' into jw-fs1081-extend-fixed-expressions
jwosty Aug 4, 2023
e4d552b
Merge branch 'main' into jw-fs1081-extend-fixed-expressions
jwosty Aug 8, 2023
6de6e00
Rewrite to increase comprehensibility, and add some clarifying comments
jwosty Aug 9, 2023
ba2d08a
Rename fixed binding test files
jwosty Aug 9, 2023
2d13cfc
More renames
jwosty Aug 9, 2023
9b47c4c
Rename all instances of 'fixed expressions' -> 'fixed bindings'
jwosty Aug 9, 2023
a3b980f
Extract fixed binding IL test cases to their own files
jwosty Aug 9, 2023
4873ec4
Extract fixed binding Language test cases to their own files
jwosty Aug 10, 2023
01cbd18
Split fixed binding Language test cases
jwosty Aug 10, 2023
8c74b6d
Raise recoverable errors
jwosty Aug 10, 2023
bb99236
Add more negative fixed binding tests
jwosty Aug 10, 2023
0c4ea8b
Add test verifying that null guard in fixed bindings against GetPinna…
jwosty Aug 10, 2023
44f1e09
Adjust wording
jwosty Aug 10, 2023
cfaf3e3
Split one remaining test case
jwosty Aug 10, 2023
351b155
Small test refactor
jwosty Aug 10, 2023
25a064c
Merge branch 'main' into jw-fs1081-extend-fixed-expressions
jwosty Aug 10, 2023
45db0e6
Add an F# style extension method test for GetPinnableReference
jwosty Aug 10, 2023
557ef00
Add some more fixed binding negative tests for sanity
jwosty Aug 10, 2023
f39284d
Merge branch 'main' into jw-fs1081-extend-fixed-expressions
jwosty Aug 10, 2023
ef318f7
Apply fantomas
jwosty Aug 10, 2023
ebd143f
Merge branch 'main' into jw-fs1081-extend-fixed-expressions
jwosty Aug 14, 2023
dbdc459
Change an IL test to hopefully make it compile consistently in CI
jwosty Aug 14, 2023
43d0d5f
Change method name to try to appease CI
jwosty Aug 14, 2023
597e29d
Fix test file name
jwosty Aug 14, 2023
09c38c9
Merge branch 'main' into jw-fs1081-extend-fixed-expressions
jwosty Aug 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Feature-flag fixed expr codegen tests
  • Loading branch information
jwosty committed Jul 28, 2023
commit e57d48a115f2835a5a11d57300ab50a09532cae0
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ let xCopy = pinIt &x
if x <> xCopy then failwith "xCopy was not the same as x"
"""
|> withOptions ["--nowarn:9"]
|> withLangVersionPreview
|> compileExeAndRun
|> shouldSucceed
|> verifyIL ["""
Expand Down Expand Up @@ -289,6 +290,7 @@ let pinIt (x: int) =
pinIt 100
"""
|> withOptions ["--nowarn:9"]
|> withLangVersionPreview
|> compileExeAndRun
|> shouldSucceed
|> verifyIL ["""
Expand Down Expand Up @@ -348,6 +350,7 @@ let main _ =
0
"""
|> withOptions ["--nowarn:9"]
|> withLangVersionPreview
|> compileExeAndRun
|> shouldSucceed
|> verifyIL ["""
Expand Down Expand Up @@ -392,6 +395,7 @@ let main _ =
0
"""
|> withOptions ["--nowarn:9"]
|> withLangVersionPreview
|> compileExeAndRun
|> shouldSucceed
|> verifyIL ["""
Expand Down Expand Up @@ -436,6 +440,7 @@ let main _ =
0
"""
|> withOptions ["--nowarn:9"]
|> withLangVersionPreview
|> compileExeAndRun
|> shouldSucceed
|> verifyIL ["""
Expand Down Expand Up @@ -486,6 +491,7 @@ let main _ =
0
"""
|> withOptions ["--nowarn:9"]
|> withLangVersionPreview
|> compileExeAndRun
|> shouldSucceed
|> verifyIL ["""
Expand Down Expand Up @@ -535,6 +541,7 @@ let main _ =
0
"""
|> withOptions ["--nowarn:9"]
|> withLangVersionPreview
|> compileExeAndRun
|> shouldSucceed
|> verifyIL ["""
Expand Down Expand Up @@ -593,6 +600,7 @@ let main _ =
0
"""
|> withOptions ["--nowarn:9"]
|> withLangVersionPreview
|> compileExeAndRun
|> shouldSucceed
|> verifyIL ["""
Expand Down Expand Up @@ -665,6 +673,7 @@ let main _ =
"""
|> withReferences [csLib]
|> withOptions ["--nowarn:9"]
|> withLangVersionPreview
|> compileExeAndRun
|> shouldSucceed
|> verifyIL ["""
Expand Down Expand Up @@ -740,6 +749,7 @@ let main _ =
"""
|> withReferences [csLib]
|> withOptions ["--nowarn:9"]
|> withLangVersionPreview
|> compileExeAndRun
|> shouldSucceed
|> verifyIL ["""
Expand Down Expand Up @@ -793,6 +803,7 @@ let main _ =
0
"""
|> withOptions ["--nowarn:9"]
|> withLangVersionPreview
|> compileExeAndRun
|> shouldSucceed
|> verifyIL ["""
Expand Down