Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Compiler.Service/11.0.100.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
* Add `#version;;` directive to F# Interactive to display version and environment information. ([Issue #13307](https://github.com/dotnet/fsharp/issues/13307), [PR #19332](https://github.com/dotnet/fsharp/pull/19332))
* Debug: rework for expressions stepping ([PR #19894](https://github.com/dotnet/fsharp/pull/19894))
* Debug: rework conditional erasure, fix stepping over literals ([PR #19897](https://github.com/dotnet/fsharp/pull/19897))
* Debug: fix if and match condition sequence points ([PR #19932](https://github.com/dotnet/fsharp/pull/19932))

### Changed

Expand Down
15 changes: 0 additions & 15 deletions src/Compiler/CodeGen/IlxGen.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3723,19 +3723,6 @@ and GenLinearExpr cenv cgbuf eenv expr sequel preSteps (contf: FakeUnit -> FakeU

//assert(cgbuf.GetCurrentStack() = stackAfterJoin) // REVIEW: Since gen_dtree* now sets stack, stack should be stackAfterJoin at this point...
CG.SetStack cgbuf stackAfterJoin
// If any values are left on the stack after the join then we're certainly going to do something with them
// For example, we may be about to execute a 'stloc' for
//
// let y2 = if System.DateTime.Now.Year < 2000 then 1 else 2
//
// or a 'stelem' for
//
// arr.[0] <- if System.DateTime.Now.Year > 2000 then 1 else 2
//
// In both cases, any instructions that come after this point will be falsely associated with the last branch of the control
// prior to the join point. This is base, e.g. see FSharp 1.0 bug 5155
cgbuf.EmitStartOfHiddenCode()

GenSequel cenv eenv.cloc cgbuf sequelAfterJoin
Fake))

Expand Down Expand Up @@ -7952,8 +7939,6 @@ and GenDecisionTreeSwitch
let m = e.Range
cgbuf.SetMarkToHereIfNecessary inplabOpt

cgbuf.EmitStartOfHiddenCode()

match cases with
// optimize a test against a boolean value, i.e. the all-important if-then-else
| TCase(DecisionTreeTest.Const(Const.Bool b), successTree) :: _ ->
Expand Down
4 changes: 2 additions & 2 deletions tests/AheadOfTime/Trimming/check.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ function CheckTrim($root, $tfm, $outputfile, $expected_len, $callerLineNumber) {
$allErrors = @()

# Check net9.0 trimmed assemblies
$allErrors += CheckTrim -root "SelfContained_Trimming_Test" -tfm "net9.0" -outputfile "FSharp.Core.dll" -expected_len 311808 -callerLineNumber 66
$allErrors += CheckTrim -root "SelfContained_Trimming_Test" -tfm "net9.0" -outputfile "FSharp.Core.dll" -expected_len 310272 -callerLineNumber 66

# Check net9.0 trimmed assemblies with static linked FSharpCore
$allErrors += CheckTrim -root "StaticLinkedFSharpCore_Trimming_Test" -tfm "net9.0" -outputfile "StaticLinkedFSharpCore_Trimming_Test.dll" -expected_len 9169408 -callerLineNumber 69
$allErrors += CheckTrim -root "StaticLinkedFSharpCore_Trimming_Test" -tfm "net9.0" -outputfile "StaticLinkedFSharpCore_Trimming_Test.dll" -expected_len 9168896 -callerLineNumber 69

# Check net9.0 trimmed assemblies with F# metadata resources removed
$allErrors += CheckTrim -root "FSharpMetadataResource_Trimming_Test" -tfm "net9.0" -outputfile "FSharpMetadataResource_Trimming_Test.dll" -expected_len 7609344 -callerLineNumber 72
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,26 +181,3 @@ let dispatch (cmd: Cmd) (active: bool) (count: int) =
(Line 29)

// ---- Instrumentation: verify FeeFee IS emitted at match join points ----

[<Fact>]
let ``Match in statement position emits hidden point at join`` () =
// #12052: The fix emits EmitStartOfHiddenCode unconditionally.
// Verify hidden (FeeFee) points are present — proving the fix emits them.
verifyAllSequencePoints
"
module TestModuleHidden
let funcE (x: int) =
match x with
| 1 -> System.Console.WriteLine(\"one\")
| _ -> System.Console.WriteLine(\"other\")
System.Console.WriteLine(\"done\")
" [
(Line 5, Col 5, Line 5, Col 17)
(Line 6, Col 12, Line 6, Col 43)
(Line 7, Col 12, Line 7, Col 45)
(Line 8, Col 5, Line 8, Col 37)
(Line 16707566, Col 0, Line 16707566, Col 0)
(Line 16707566, Col 0, Line 16707566, Col 0)
(Line 16707566, Col 0, Line 16707566, Col 0)
]
Loading
Loading