From 01af60f75806678404ea19e7dc8f9bafad1409cc Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Thu, 4 Jun 2026 22:08:39 +0200 Subject: [PATCH 1/6] Sequence points: rework conditional erasure, fix stepping over literals Add `isHidden` to `DebugPointAtLeafExpr.Yes` to express it explicitly in the typed tree Co-Authored-By: Claude Opus 4.8 --- .../Checking/CheckIncrementalClasses.fs | 4 +- .../CheckComputationExpressions.fs | 22 +- .../Checking/Expressions/CheckExpressions.fs | 3 +- src/Compiler/CodeGen/IlxGen.fs | 22 +- .../Optimize/LowerComputedCollections.fs | 10 +- src/Compiler/Optimize/LowerSequences.fs | 8 +- src/Compiler/Optimize/LowerStateMachines.fs | 2 +- src/Compiler/Optimize/Optimizer.fs | 28 +- .../Service/FSharpParseFileResults.fs | 2 +- src/Compiler/SyntaxTree/SyntaxTree.fs | 2 +- src/Compiler/SyntaxTree/SyntaxTree.fsi | 2 +- src/Compiler/TypedTree/TypedTree.fs | 2 +- .../TypedTree/TypedTreeOps.Attributes.fs | 2 +- .../TypedTreeOps.ExprConstruction.fs | 2 +- .../TypedTree/TypedTreeOps.Remapping.fs | 2 +- .../TypedTree/TypedTreeOps.Transforms.fs | 2 +- .../Binding/Local - Erased call 02.bsl | 7 + .../Binding/Local - Erased call 03.bsl | 7 + .../Binding/Local - Erased call 04.bsl | 13 + .../Binding/Local - Erased call 05.bsl | 13 + .../Binding/Local - Erased call 06.bsl | 13 + .../Binding/Local - ErasedCall 01.bsl | 3 + .../Binding/Local - SequentialUnits 01.bsl | 9 + .../Binding/Local - Unit 01.bsl | 6 + .../Binding/Module - Erased call 02.bsl | 7 + .../Binding/Module - Erased call 03.bsl | 7 + .../Binding/Module - Erased call 04.bsl | 13 + .../Binding/Module - Erased call 05.bsl | 13 + .../Binding/Module - Erased call 06.bsl | 13 + .../Binding/Module - ErasedCall 01.bsl | 1 + .../Binding/Module - SequentialUnits 01.bsl | 6 + .../Binding/Module - Unit 01.bsl | 3 + .../ForEach/List - Body - ErasedCall 01.bsl | 25 ++ .../List - Body - ErasedThenKeptCall 01.bsl | 29 ++ .../List - Body - KeptThenErasedCall 01.bsl | 29 ++ .../Function/Body - Erased call 02.bsl | 1 + .../Function/Body - Erased call 03.bsl | 1 + .../Function/Body - Erased call 04.bsl | 3 + .../Function/Body - Erased call 05.bsl | 3 + .../Function/Body - Erased call 06.bsl | 3 + .../Function/Body - ErasedCall 01.bsl | 1 + .../Function/Body - ErasedThenKeptCall 01.bsl | 5 + .../Function/Body - KeptThenErasedCall 01.bsl | 5 + .../SequencePoints/SequencePointsTests.fs | 280 ++++++++++++++++++ .../SteppingMatch/SteppingMatch08.fs.il.bsl | 3 +- ...iler.Service.SurfaceArea.netstandard20.bsl | 8 +- 46 files changed, 589 insertions(+), 56 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 02.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 03.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 04.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 05.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 06.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - ErasedCall 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - SequentialUnits 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Unit 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 02.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 03.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 04.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 05.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 06.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - ErasedCall 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - SequentialUnits 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Unit 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedCall 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedThenKeptCall 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - KeptThenErasedCall 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 02.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 03.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 04.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 05.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 06.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedCall 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedThenKeptCall 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - KeptThenErasedCall 01.bsl diff --git a/src/Compiler/Checking/CheckIncrementalClasses.fs b/src/Compiler/Checking/CheckIncrementalClasses.fs index 846aa5f9085..1d094bbf874 100644 --- a/src/Compiler/Checking/CheckIncrementalClasses.fs +++ b/src/Compiler/Checking/CheckIncrementalClasses.fs @@ -802,7 +802,7 @@ let MakeCtorForIncrClassConstructionPhase2C( // Extend the range of any immediate debug point to include the 'do' let doExpr = match doExpr with - | Expr.DebugPoint(_, innerExpr) -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes mFull, innerExpr) + | Expr.DebugPoint(_, innerExpr) -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes(false, mFull), innerExpr) | e -> e let binder = (fun e -> mkSequential mFull doExpr e) let isPriorToSuperInit = false @@ -940,7 +940,7 @@ let MakeCtorForIncrClassConstructionPhase2C( // Add the debug point let inheritsExpr = if inheritsIsVisible then - Expr.DebugPoint(DebugPointAtLeafExpr.Yes inheritsExpr.Range, inheritsExpr) + Expr.DebugPoint(DebugPointAtLeafExpr.Yes(false, inheritsExpr.Range), inheritsExpr) else inheritsExpr diff --git a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs index 3ab446a6687..35b5f7df008 100644 --- a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs @@ -81,7 +81,7 @@ let inline arbKeySelectors m = // Flag that a debug point should get emitted prior to both the evaluation of 'rhsExpr' and the call to Using let inline addBindDebugPoint spBind e = match spBind with - | DebugPointAtBinding.Yes m -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes m, false, e) + | DebugPointAtBinding.Yes m -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, m), false, e) | _ -> e let inline mkSynDelay2 (e: SynExpr) = mkSynDelay (e.Range.MakeSynthetic()) e @@ -1345,7 +1345,7 @@ let rec TryTranslateComputationExpression let forCall = match spFor with - | DebugPointAtFor.Yes _ -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mFor, false, forCall) + | DebugPointAtFor.Yes _ -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, mFor), false, forCall) | DebugPointAtFor.No -> forCall translatedCtxt forCall) @@ -1389,7 +1389,7 @@ let rec TryTranslateComputationExpression // 'while' is hit just before each time the guard is called let guardExpr = match spWhile with - | DebugPointAtWhile.Yes _ -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mWhile, false, guardExpr) + | DebugPointAtWhile.Yes _ -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, mWhile), false, guardExpr) | DebugPointAtWhile.No -> guardExpr Some( @@ -1419,7 +1419,7 @@ let rec TryTranslateComputationExpression // 'while!' is hit just before each time the guard is called let guardExpr = match spWhile with - | DebugPointAtWhile.Yes _ -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mWhile, false, guardExpr) + | DebugPointAtWhile.Yes _ -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, mWhile), false, guardExpr) | DebugPointAtWhile.No -> guardExpr let rewrittenWhileExpr = @@ -1557,7 +1557,7 @@ let rec TryTranslateComputationExpression // Put down a debug point for the 'finally' let unwindExpr2 = match spFinally with - | DebugPointAtFinally.Yes _ -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mFinally, true, unwindExpr) + | DebugPointAtFinally.Yes _ -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, mFinally), true, unwindExpr) | DebugPointAtFinally.No -> unwindExpr if ceenv.isQuery then @@ -1571,7 +1571,7 @@ let rec TryTranslateComputationExpression let innerExpr = match spTry with - | DebugPointAtTry.Yes _ -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mTry, true, innerExpr) + | DebugPointAtTry.Yes _ -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, mTry), true, innerExpr) | _ -> innerExpr Some( @@ -2308,7 +2308,7 @@ let rec TryTranslateComputationExpression let innerExpr = match spTry with - | DebugPointAtTry.Yes _ -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mTry, true, innerExpr) + | DebugPointAtTry.Yes _ -> SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, mTry), true, innerExpr) | _ -> innerExpr let callExpr = @@ -2345,7 +2345,7 @@ let rec TryTranslateComputationExpression if IsControlFlowExpression synYieldExpr then yieldFromCall else - SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mFull, false, yieldFromCall) + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, mFull), false, yieldFromCall) Some(translatedCtxt yieldFromCall) @@ -2374,7 +2374,7 @@ let rec TryTranslateComputationExpression if IsControlFlowExpression synReturnExpr then returnFromCall else - SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mFull, false, returnFromCall) + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, mFull), false, returnFromCall) Some(translatedCtxt returnFromCall) @@ -2393,7 +2393,7 @@ let rec TryTranslateComputationExpression if IsControlFlowExpression synYieldOrReturnExpr then yieldOrReturnCall else - SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mFull, false, yieldOrReturnCall) + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, mFull), false, yieldOrReturnCall) Some(translatedCtxt yieldOrReturnCall) @@ -2704,7 +2704,7 @@ and TranslateComputationExpressionBind and convertSimpleReturnToExpr (ceenv: ComputationExpressionContext<'a>) comp varSpace innerComp = match innerComp with | SynExpr.YieldOrReturn((false, _), returnExpr, m, _) -> - let returnExpr = SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes m, false, returnExpr) + let returnExpr = SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, m), false, returnExpr) Some(returnExpr, None) | SynExpr.Match(spMatch, expr, clauses, m, trivia) -> diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 4932830a352..e1322bf1db7 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -3103,7 +3103,7 @@ let BuildPossiblyConditionalMethodCall (cenv: cenv) env isMutable m isProp minfo if shouldEraseCall then // Methods marked with 'Conditional' must return 'unit' UnifyTypes cenv env m g.unit_ty (minfo.GetFSharpReturnType(cenv.amap, m, minst)) - mkUnit g m, g.unit_ty + Expr.DebugPoint(DebugPointAtLeafExpr.Yes(isHidden = true, range = m), mkUnit g m), g.unit_ty else #if !NO_TYPEPROVIDERS match minfo with @@ -5903,6 +5903,7 @@ and TcNonControlFlowExpr (env: TcEnv) f = let res2 = match res with | IfThenElseExpr _ -> res + | Expr.DebugPoint(DebugPointAtLeafExpr.Yes(isHidden = true), _) -> res | _ -> mkDebugPoint res.Range res res2, tpenv else diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 46959e56b22..1a57e09a6ca 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -3171,8 +3171,8 @@ and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr (sequel: sequel) = | LinearOpExpr _ | Expr.Match _ -> GenLinearExpr cenv cgbuf eenv expr sequel false id |> ignore - | Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, innerExpr) -> - if equals m range0 then + | Expr.DebugPoint(DebugPointAtLeafExpr.Yes(isHidden, m), innerExpr) -> + if isHidden then cgbuf.EmitStartOfHiddenCode() else CG.EmitDebugPoint cgbuf m @@ -3736,8 +3736,8 @@ and GenLinearExpr cenv cgbuf eenv expr sequel preSteps (contf: FakeUnit -> FakeU GenSequel cenv eenv.cloc cgbuf sequelAfterJoin Fake)) - | Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, innerExpr) -> - if equals m range0 then + | Expr.DebugPoint(DebugPointAtLeafExpr.Yes(isHidden, m), innerExpr) -> + if isHidden then cgbuf.EmitStartOfHiddenCode() else CG.EmitDebugPoint cgbuf m @@ -10641,10 +10641,20 @@ and CodeGenInitMethod cenv (cgbuf: CodeGenBuffer) eenv tref (codeGenInitFunc: Co let _, body = CodeGenMethod cenv cgbuf.mgbuf ([], eenv.staticInitializationName, eenv, 0, None, codeGenInitFunc, m) - if CheckCodeDoesSomething body.Code then + let codeDoesSomething = CheckCodeDoesSomething body.Code + + // Keep the init method if it carries a visible debug point, so steppable bindings like 'let i = ()' survive. + let hasVisibleDebugPoint = + body.Code.Instrs + |> Array.exists (function + | I_seqpoint sp -> sp.Line <> FeeFee cenv + | _ -> false) + + if codeDoesSomething || hasVisibleDebugPoint then // We are here because the module we just grabbed has an interesting static initializer let feefee, seqpt = - if body.Code.Instrs.Length > 0 then + // Without real init code, the .cctor's FeeFee marker would just add a stray hidden sequence point. + if codeDoesSomething && body.Code.Instrs.Length > 0 then match body.Code.Instrs[0] with | I_seqpoint sp as i -> [ FeeFeeInstr cenv sp.Document ], [ i ] | _ -> [], [] diff --git a/src/Compiler/Optimize/LowerComputedCollections.fs b/src/Compiler/Optimize/LowerComputedCollections.fs index 896540b0ae6..1dabf4fb142 100644 --- a/src/Compiler/Optimize/LowerComputedCollections.fs +++ b/src/Compiler/Optimize/LowerComputedCollections.fs @@ -114,7 +114,7 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = let cleanupE = BuildDisposableCleanup tcVal g infoReader m enumv // A debug point should get emitted prior to both the evaluation of 'inp' and the call to GetEnumerator - let addForDebugPoint e = Expr.DebugPoint(DebugPointAtLeafExpr.Yes mFor, e) + let addForDebugPoint e = Expr.DebugPoint(DebugPointAtLeafExpr.Yes(false, mFor), e) let spInAsWhile = match spIn with DebugPointAtInOrTo.Yes m -> DebugPointAtWhile.Yes m | DebugPointAtInOrTo.No -> DebugPointAtWhile.No @@ -289,7 +289,7 @@ module List = match body with | Expr.Let(TBind(v, rhs, DebugPointAtBinding.Yes spBind), innerBody, m, flags) -> let bodyForAdd = Expr.Let(TBind(v, rhs, DebugPointAtBinding.NoneAtInvisible), innerBody, m, flags) - Expr.DebugPoint(DebugPointAtLeafExpr.Yes spBind, mkCallCollectorAdd tcVal g reader mBody collector bodyForAdd) + Expr.DebugPoint(DebugPointAtLeafExpr.Yes(false, spBind), mkCallCollectorAdd tcVal g reader mBody collector bodyForAdd) | _ -> mkCallCollectorAdd tcVal g reader mIn collector body @@ -342,7 +342,7 @@ module List = match body with | Some (loopVal, body) -> mkInvisibleLet m loopVal loopVar - (Expr.DebugPoint (DebugPointAtLeafExpr.Yes mFor, mkCallCollectorAdd tcVal g reader mBody collector body)) + (Expr.DebugPoint (DebugPointAtLeafExpr.Yes(false, mFor), mkCallCollectorAdd tcVal g reader mBody collector body)) | None -> mkCallCollectorAdd tcVal g reader mBody collector loopVar) @@ -447,7 +447,7 @@ module Array = ) // Add a debug point at the `for`, before anything gets evaluated. - Expr.DebugPoint (DebugPointAtLeafExpr.Yes mFor, mapping) + Expr.DebugPoint (DebugPointAtLeafExpr.Yes(false, mFor), mapping) ) /// Whether to check for overflow when converting a value to a native int. @@ -508,7 +508,7 @@ module Array = match body with | Some (loopVal, body) -> - mkInvisibleLet mBody loopVal loopVar (Expr.DebugPoint (DebugPointAtLeafExpr.Yes mFor, mkStore body)) + mkInvisibleLet mBody loopVal loopVar (Expr.DebugPoint (DebugPointAtLeafExpr.Yes(false, mFor), mkStore body)) | None -> mkStore loopVar) diff --git a/src/Compiler/Optimize/LowerSequences.fs b/src/Compiler/Optimize/LowerSequences.fs index 3b7b4a51181..02c9f33373e 100644 --- a/src/Compiler/Optimize/LowerSequences.fs +++ b/src/Compiler/Optimize/LowerSequences.fs @@ -118,7 +118,7 @@ let ConvertSequenceExprToObject g amap overallExpr = let (TBind(v, e, sp)) = bind let addDebugPoint e = match sp with - | DebugPointAtBinding.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, e) + | DebugPointAtBinding.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes(false, m), e) | _ -> e let vref = mkLocalValRef v { resBody with @@ -262,7 +262,7 @@ let ConvertSequenceExprToObject g amap overallExpr = // body ]] // A debug point should get emitted prior to both the evaluation of 'inp' and the call to GetEnumerator - let addForDebugPoint e = Expr.DebugPoint(DebugPointAtLeafExpr.Yes mFor, e) + let addForDebugPoint e = Expr.DebugPoint(DebugPointAtLeafExpr.Yes(false, mFor), e) // The 'in' debug point is put back into the TypedTree at the right place for SeqWhile let mIn = match spIn with DebugPointAtInOrTo.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.While) | DebugPointAtInOrTo.No -> mIn @@ -293,11 +293,11 @@ let ConvertSequenceExprToObject g amap overallExpr = let asyncVars = unionFreeVars res1.asyncVars (freeInExpr CollectLocals compensation) let addTryDebugPoint e = match spTry with - | DebugPointAtTry.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, e) + | DebugPointAtTry.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes(false, m), e) | _ -> e let addFinallyDebugPoint e = match spFinally with - | DebugPointAtFinally.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, e) + | DebugPointAtFinally.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes(false, m), e) | _ -> e Some { phase2 = (fun (pcVar, _currv, _, pcMap as ctxt) -> let generate1, dispose1, checkDispose1 = res1.phase2 ctxt diff --git a/src/Compiler/Optimize/LowerStateMachines.fs b/src/Compiler/Optimize/LowerStateMachines.fs index cb9453d3177..a82d57d0789 100644 --- a/src/Compiler/Optimize/LowerStateMachines.fs +++ b/src/Compiler/Optimize/LowerStateMachines.fs @@ -76,7 +76,7 @@ let RepresentBindingAsStateVar g (bind: Binding) (resBody: StateMachineConversio let (TBind(v, e, sp)) = bind let addDebugPoint innerExpr = match sp with - | DebugPointAtBinding.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, innerExpr) + | DebugPointAtBinding.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes(false, m), innerExpr) | _ -> innerExpr let vref = mkLocalValRef v { resBody with diff --git a/src/Compiler/Optimize/Optimizer.fs b/src/Compiler/Optimize/Optimizer.fs index a6fa90d1e3a..eee8052bd04 100644 --- a/src/Compiler/Optimize/Optimizer.fs +++ b/src/Compiler/Optimize/Optimizer.fs @@ -383,9 +383,6 @@ type OptimizationSettings = /// This optimization is off by default, given tiny overhead of including try/with. See https://github.com/dotnet/fsharp/pull/376 member _.EliminateTryWithAndTryFinally = false - /// Determines if we should eliminate first part of sequential expression if it has no effect - member x.EliminateSequential = x.LocalOptimizationsEnabled - /// Determines if we should determine branches in pattern matching based on known information, e.g. /// eliminate a "if true then .. else ... " member x.EliminateSwitch = x.LocalOptimizationsEnabled @@ -2874,12 +2871,8 @@ and OptimizeLinearExpr cenv env expr contf = OptimizeLinearExpr cenv env e2 (contf << (fun (e2R, e2info) -> if (flag = NormalSeq) && - // Drop bare (compiler-generated) units always; keep a debug-pointed unit in debug code so - // it stays steppable (a unit without one must go, else a dangling breakpoint - FSharp 1.0 bug 6034). - (cenv.settings.EliminateSequential || - (match e1R with - | Expr.DebugPoint(DebugPointAtLeafExpr.Yes _, _) -> false - | _ -> match stripDebugPoints e1R with Expr.Const (Const.Unit, _, _) -> true | _ -> false)) && + (cenv.settings.LocalOptimizationsEnabled || + (match e1R with | Expr.DebugPoint(DebugPointAtLeafExpr.Yes(isHidden, _), _) -> isHidden | _ -> false)) && not e1info.HasEffect then e2R, e2info else @@ -2942,9 +2935,11 @@ and OptimizeLinearExpr cenv env expr contf = OptimizeLinearExpr cenv env argLast (contf << (fun (argLastR, argLastInfo) -> OptimizeExprOpReductionsAfter cenv env (op, tyargs, argsHeadR @ [argLastR], argsHeadInfosR @ [argLastInfo], m))) - | Expr.DebugPoint (m, innerExpr) when not (IsDebugPipeRightExpr cenv innerExpr)-> + | Expr.DebugPoint (m, innerExpr) when not (IsDebugPipeRightExpr cenv innerExpr)-> OptimizeLinearExpr cenv env innerExpr (contf << (fun (innerExprR, einfo) -> - Expr.DebugPoint (m, innerExprR), einfo)) + match m with + | DebugPointAtLeafExpr.Yes(isHidden = true) when not einfo.HasEffect -> innerExprR, einfo + | _ -> Expr.DebugPoint (m, innerExprR), einfo)) | _ -> contf (OptimizeExpr cenv env expr) @@ -2966,7 +2961,7 @@ and OptimizeTryFinally cenv env (spTry, spFinally, e1, e2, m, ty) = if cenv.settings.EliminateTryWithAndTryFinally && not e1info.HasEffect then let e1R2 = match spTry with - | DebugPointAtTry.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, e1R) + | DebugPointAtTry.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes(false, m), e1R) | DebugPointAtTry.No -> e1R Expr.Sequential (e1R2, e2R, ThenDoSeq, m), info else @@ -4220,7 +4215,14 @@ and OptimizeBinding cenv isRec env (TBind(vref, expr, spBind)) = if vref.ShouldInline && IsPartialExprVal einfo.Info then errorR(InternalError("the inline value '"+vref.LogicalName+"' was not inferred to have a known value", vref.Range)) - let env = BindInternalLocalVal cenv vref (mkValInfo einfo vref) env + let env = BindInternalLocalVal cenv vref (mkValInfo einfo vref) env + + // The hidden debug point on the r.h.s. is dropped above, so suppress the binding's debug point too. + let spBind = + match expr with + | Expr.DebugPoint(DebugPointAtLeafExpr.Yes(isHidden = true), _) when not einfo.HasEffect -> DebugPointAtBinding.NoneAtLet + | _ -> spBind + (TBind(vref, exprOptimized, spBind), einfo), env with RecoverableException exn -> errorRecovery exn vref.Range diff --git a/src/Compiler/Service/FSharpParseFileResults.fs b/src/Compiler/Service/FSharpParseFileResults.fs index 434974de754..119669f22d9 100644 --- a/src/Compiler/Service/FSharpParseFileResults.fs +++ b/src/Compiler/Service/FSharpParseFileResults.fs @@ -568,7 +568,7 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, | SynInterpolatedStringPart.FillExpr(fillExpr, _) -> yield fillExpr ] - | SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes m, isControlFlow, innerExpr) -> + | SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(_, m), isControlFlow, innerExpr) -> yield! checkRange m yield! walkExpr isControlFlow innerExpr diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index 7c0030e4f3a..f35bb3297de 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -270,7 +270,7 @@ type DebugPointAtTry = | No [] -type DebugPointAtLeafExpr = Yes of range +type DebugPointAtLeafExpr = Yes of isHidden: bool * range: range [] type DebugPointAtWith = diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index 2206d199c39..8b152ba2d69 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -258,7 +258,7 @@ type DebugPointAtTarget = /// Represents a debug point at a leaf expression (e.g. an application or constant). [] -type DebugPointAtLeafExpr = Yes of range +type DebugPointAtLeafExpr = Yes of isHidden: bool * range: range /// Represents whether a debug point should be suppressed for either the /// first or second part of a sequential execution, that is whether the diff --git a/src/Compiler/TypedTree/TypedTree.fs b/src/Compiler/TypedTree/TypedTree.fs index 733b269b588..dac2e23c10c 100644 --- a/src/Compiler/TypedTree/TypedTree.fs +++ b/src/Compiler/TypedTree/TypedTree.fs @@ -5274,7 +5274,7 @@ type Expr = | WitnessArg _ -> "WitnessArg(..)" | TyChoose _ -> "TyChoose(..)" | Link e -> "Link(" + e.Value.ToDebugString(depth) + ")" - | DebugPoint (DebugPointAtLeafExpr.Yes m, e) -> sprintf "DebugPoint(%s, " (m.ToString()) + e.ToDebugString(depth) + ")" + | DebugPoint (DebugPointAtLeafExpr.Yes(_, m), e) -> sprintf "DebugPoint(%s, " (m.ToString()) + e.ToDebugString(depth) + ")" /// Get the mark/range/position information from an expression member expr.Range = diff --git a/src/Compiler/TypedTree/TypedTreeOps.Attributes.fs b/src/Compiler/TypedTree/TypedTreeOps.Attributes.fs index a57c6e23804..d011c2d231f 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.Attributes.fs +++ b/src/Compiler/TypedTree/TypedTreeOps.Attributes.fs @@ -2075,7 +2075,7 @@ module internal DebugPrint = | Expr.Link rX -> exprL rX.Value |> wrap - | Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, rX) -> + | Expr.DebugPoint(DebugPointAtLeafExpr.Yes(_, m), rX) -> aboveListL [ wordL (tagText "__debugPoint(") ^^ rangeL m ^^ wordL (tagText ")"); exprL rX ] |> wrap diff --git a/src/Compiler/TypedTree/TypedTreeOps.ExprConstruction.fs b/src/Compiler/TypedTree/TypedTreeOps.ExprConstruction.fs index 00761538123..1151c53fca5 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.ExprConstruction.fs +++ b/src/Compiler/TypedTree/TypedTreeOps.ExprConstruction.fs @@ -512,7 +512,7 @@ module internal ExprConstruction = let valsOfBinds (binds: Bindings) = binds |> List.map (fun b -> b.Var) let mkDebugPoint m expr = - Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, expr) + Expr.DebugPoint(DebugPointAtLeafExpr.Yes(false, m), expr) // Used to remove Expr.Link for inner expressions in pattern matches let (|InnerExprPat|) expr = stripExpr expr diff --git a/src/Compiler/TypedTree/TypedTreeOps.Remapping.fs b/src/Compiler/TypedTree/TypedTreeOps.Remapping.fs index de28bc34138..7401ed40b14 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.Remapping.fs +++ b/src/Compiler/TypedTree/TypedTreeOps.Remapping.fs @@ -2873,7 +2873,7 @@ module internal ExprAnalysis = // Incorporate spBind as a note if present let res = match spBind with - | DebugPointAtBinding.Yes dp -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes dp, res) + | DebugPointAtBinding.Yes dp -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes(false, dp), res) | _ -> res res diff --git a/src/Compiler/TypedTree/TypedTreeOps.Transforms.fs b/src/Compiler/TypedTree/TypedTreeOps.Transforms.fs index a676cc3e6dd..83ff0d3baca 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.Transforms.fs +++ b/src/Compiler/TypedTree/TypedTreeOps.Transforms.fs @@ -2230,7 +2230,7 @@ module internal TupleCompilation = (mkValSet mIn (mkLocalValRef nextVar) tailOrNullExpr) let bodyAndStep = - mkSequential mIn bodyExpr (Expr.DebugPoint(DebugPointAtLeafExpr.Yes range0, loopStep)) + mkSequential mIn bodyExpr (Expr.DebugPoint(DebugPointAtLeafExpr.Yes(true, mIn), loopStep)) let bodyExpr = mkLet spElem mFor elemVar headOrDefaultExpr bodyAndStep diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 02.bsl new file mode 100644 index 00000000000..a56d4e22f3f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 02.bsl @@ -0,0 +1,7 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 03.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 03.bsl new file mode 100644 index 00000000000..a56d4e22f3f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 03.bsl @@ -0,0 +1,7 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 04.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 04.bsl new file mode 100644 index 00000000000..b5ea48a2b02 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 04.bsl @@ -0,0 +1,13 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret + +Module::staticInitialization@ + (5,5-5,7) () + IL_0000: ldnull + IL_0001: stsfld i@4 + IL_0006: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 05.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 05.bsl new file mode 100644 index 00000000000..89b07eb630f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 05.bsl @@ -0,0 +1,13 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret + +Module::staticInitialization@ + (6,5-6,7) () + IL_0000: ldnull + IL_0001: stsfld i@4 + IL_0006: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 06.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 06.bsl new file mode 100644 index 00000000000..4d2583f7a06 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 06.bsl @@ -0,0 +1,13 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret + +Module::staticInitialization@ + (7,5-7,7) () + IL_0000: ldnull + IL_0001: stsfld i@4 + IL_0006: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - ErasedCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - ErasedCall 01.bsl new file mode 100644 index 00000000000..85ce8fcb060 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - ErasedCall 01.bsl @@ -0,0 +1,3 @@ +Module::staticInitialization@ + (6,5-6,7) () + IL_0000: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - SequentialUnits 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - SequentialUnits 01.bsl new file mode 100644 index 00000000000..f8569c7551b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - SequentialUnits 01.bsl @@ -0,0 +1,9 @@ +Module::staticInitialization@ + (5,5-5,15) let i = () + IL_0000: nop + + (6,5-6,15) let j = () + IL_0001: nop + + (7,5-7,7) () + IL_0002: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Unit 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Unit 01.bsl new file mode 100644 index 00000000000..e06986670e8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Unit 01.bsl @@ -0,0 +1,6 @@ +Module::staticInitialization@ + (5,5-5,15) let i = () + IL_0000: nop + + (6,5-6,7) () + IL_0001: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 02.bsl new file mode 100644 index 00000000000..a56d4e22f3f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 02.bsl @@ -0,0 +1,7 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 03.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 03.bsl new file mode 100644 index 00000000000..a56d4e22f3f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 03.bsl @@ -0,0 +1,7 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 04.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 04.bsl new file mode 100644 index 00000000000..b5ea48a2b02 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 04.bsl @@ -0,0 +1,13 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret + +Module::staticInitialization@ + (5,5-5,7) () + IL_0000: ldnull + IL_0001: stsfld i@4 + IL_0006: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 05.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 05.bsl new file mode 100644 index 00000000000..89b07eb630f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 05.bsl @@ -0,0 +1,13 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret + +Module::staticInitialization@ + (6,5-6,7) () + IL_0000: ldnull + IL_0001: stsfld i@4 + IL_0006: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 06.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 06.bsl new file mode 100644 index 00000000000..4d2583f7a06 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 06.bsl @@ -0,0 +1,13 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret + +Module::staticInitialization@ + (7,5-7,7) () + IL_0000: ldnull + IL_0001: stsfld i@4 + IL_0006: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - ErasedCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - ErasedCall 01.bsl new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - ErasedCall 01.bsl @@ -0,0 +1 @@ + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - SequentialUnits 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - SequentialUnits 01.bsl new file mode 100644 index 00000000000..5a8bfaee8dd --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - SequentialUnits 01.bsl @@ -0,0 +1,6 @@ +Module::staticInitialization@ + (4,1-4,11) let i = () + IL_0000: nop + + (5,1-5,11) let j = () + IL_0001: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Unit 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Unit 01.bsl new file mode 100644 index 00000000000..b41b6aa0392 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Unit 01.bsl @@ -0,0 +1,3 @@ +Module::staticInitialization@ + (4,1-4,11) let i = () + IL_0000: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedCall 01.bsl new file mode 100644 index 00000000000..cb970fe45cc --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedCall 01.bsl @@ -0,0 +1,25 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call get_TailOrNull + IL_0008: stloc.1 + IL_0009: br.s IL_001b + + (5,5-5,10) for i + IL_000b: ldloc.0 + IL_000c: call get_HeadOrDefault + IL_0011: stloc.2 + + + IL_0012: ldloc.1 + IL_0013: stloc.0 + IL_0014: ldloc.0 + IL_0015: call get_TailOrNull + IL_001a: stloc.1 + + (5,11-5,13) in + IL_001b: ldloc.1 + IL_001c: brtrue.s IL_000b + IL_001e: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedThenKeptCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedThenKeptCall 01.bsl new file mode 100644 index 00000000000..13752f34640 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedThenKeptCall 01.bsl @@ -0,0 +1,29 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call get_TailOrNull + IL_0008: stloc.1 + IL_0009: br.s IL_0025 + + (5,5-5,10) for i + IL_000b: ldloc.0 + IL_000c: call get_HeadOrDefault + IL_0011: stloc.2 + + (7,9-7,36) System.Console.WriteLine "" + IL_0012: ldstr "" + IL_0017: call WriteLine + + + IL_001c: ldloc.1 + IL_001d: stloc.0 + IL_001e: ldloc.0 + IL_001f: call get_TailOrNull + IL_0024: stloc.1 + + (5,11-5,13) in + IL_0025: ldloc.1 + IL_0026: brtrue.s IL_000b + IL_0028: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - KeptThenErasedCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - KeptThenErasedCall 01.bsl new file mode 100644 index 00000000000..44330778128 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - KeptThenErasedCall 01.bsl @@ -0,0 +1,29 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call get_TailOrNull + IL_0008: stloc.1 + IL_0009: br.s IL_0025 + + (5,5-5,10) for i + IL_000b: ldloc.0 + IL_000c: call get_HeadOrDefault + IL_0011: stloc.2 + + (6,9-6,36) System.Console.WriteLine "" + IL_0012: ldstr "" + IL_0017: call WriteLine + + + IL_001c: ldloc.1 + IL_001d: stloc.0 + IL_001e: ldloc.0 + IL_001f: call get_TailOrNull + IL_0024: stloc.1 + + (5,11-5,13) in + IL_0025: ldloc.1 + IL_0026: brtrue.s IL_000b + IL_0028: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 02.bsl new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 02.bsl @@ -0,0 +1 @@ + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 03.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 03.bsl new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 03.bsl @@ -0,0 +1 @@ + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 04.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 04.bsl new file mode 100644 index 00000000000..f3a13298d7a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 04.bsl @@ -0,0 +1,3 @@ +Module::f + (5,5-5,7) () + IL_0000: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 05.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 05.bsl new file mode 100644 index 00000000000..5b43fa23219 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 05.bsl @@ -0,0 +1,3 @@ +Module::f + (6,5-6,7) () + IL_0000: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 06.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 06.bsl new file mode 100644 index 00000000000..57c43f3fa5a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 06.bsl @@ -0,0 +1,3 @@ +Module::f + (7,5-7,7) () + IL_0000: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedCall 01.bsl new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedCall 01.bsl @@ -0,0 +1 @@ + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedThenKeptCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedThenKeptCall 01.bsl new file mode 100644 index 00000000000..49a5c633237 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedThenKeptCall 01.bsl @@ -0,0 +1,5 @@ +Module::f + (6,5-6,32) System.Console.WriteLine "" + IL_0000: ldstr "" + IL_0005: call WriteLine + IL_000a: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - KeptThenErasedCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - KeptThenErasedCall 01.bsl new file mode 100644 index 00000000000..5210433b28d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - KeptThenErasedCall 01.bsl @@ -0,0 +1,5 @@ +Module::f + (5,5-5,32) System.Console.WriteLine "" + IL_0000: ldstr "" + IL_0005: call WriteLine + IL_000a: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs index 3d373e0921f..0fd43b8165e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs @@ -50,6 +50,89 @@ let f () = () """ + [] + let ``Body - ErasedCall 01`` () = + Baseline.verify """ +module Module + +let f () = + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Body - Erased call 02`` () = + Baseline.verify """ +module Module + +let f () = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Body - Erased call 03`` () = + Baseline.verify """ +module Module + +let f () = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Body - Erased call 04`` () = + Baseline.verify """ +module Module + +let f () = + () + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Body - Erased call 05`` () = + Baseline.verify """ +module Module + +let f () = + System.Diagnostics.Debug.Write "" + () + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Body - Erased call 06`` () = + Baseline.verify """ +module Module + +let f () = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" + () +""" + + [] + let ``Body - ErasedThenKeptCall 01`` () = + Baseline.verify """ +module Module + +let f () = + System.Diagnostics.Debug.Write "" + System.Console.WriteLine "" +""" + + [] + let ``Body - KeptThenErasedCall 01`` () = + Baseline.verify """ +module Module + +let f () = + System.Console.WriteLine "" + System.Diagnostics.Debug.Write "" +""" + module ForEach = [] let ``List - Simple 01`` () = @@ -82,6 +165,38 @@ let f (l: int list) = System.Console.WriteLine(i + 1) """ + [] + let ``List - Body - ErasedCall 01`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + for i in l do + System.Diagnostics.Debug.Write "" +""" + + [] + let ``List - Body - ErasedThenKeptCall 01`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + for i in l do + System.Diagnostics.Debug.Write "" + System.Console.WriteLine "" +""" + + [] + let ``List - Body - KeptThenErasedCall 01`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + for i in l do + System.Console.WriteLine "" + System.Diagnostics.Debug.Write "" +""" + [] let ``List - Body - ParenUnit 01`` () = Baseline.verify """ @@ -470,3 +585,168 @@ let f (l: string) = for c in l do System.Console.WriteLine c """ + +module Binding = + [] + let ``Module - Unit 01`` () = + Baseline.verify """ +module Module + +let i = () +""" + + [] + let ``Module - SequentialUnits 01`` () = + Baseline.verify """ +module Module + +let i = () +let j = () +""" + + [] + let ``Module - ErasedCall 01`` () = + Baseline.verify """ +module Module + +let i = System.Diagnostics.Debug.Write "" +""" + + [] + let ``Module - Erased call 02`` () = + Baseline.verify """ +module Module + +let i = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Module - Erased call 03`` () = + Baseline.verify """ +module Module + +let i = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Module - Erased call 04`` () = + Baseline.verify """ +module Module + +let i = + () + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Module - Erased call 05`` () = + Baseline.verify """ +module Module + +let i = + System.Diagnostics.Debug.Write "" + () + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Module - Erased call 06`` () = + Baseline.verify """ +module Module + +let i = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" + () +""" + + [] + let ``Local - Unit 01`` () = + Baseline.verify """ +module Module + +do + let i = () + () +""" + + [] + let ``Local - SequentialUnits 01`` () = + Baseline.verify """ +module Module + +do + let i = () + let j = () + () +""" + + [] + let ``Local - ErasedCall 01`` () = + Baseline.verify """ +module Module + +do + let i = System.Diagnostics.Debug.Write "" + () +""" + + [] + let ``Local - Erased call 02`` () = + Baseline.verify """ +module Module + +let i = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Local - Erased call 03`` () = + Baseline.verify """ +module Module + +let i = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Local - Erased call 04`` () = + Baseline.verify """ +module Module + +let i = + () + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Local - Erased call 05`` () = + Baseline.verify """ +module Module + +let i = + System.Diagnostics.Debug.Write "" + () + System.Diagnostics.Debug.Write "" +""" + + [] + let ``Local - Erased call 06`` () = + Baseline.verify """ +module Module + +let i = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" + () +""" \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch08.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch08.fs.il.bsl index e038bd5a127..6e8437bbab3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch08.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch08.fs.il.bsl @@ -51,8 +51,7 @@ IL_0011: ldc.i4.0 IL_0012: nop IL_0013: stloc.0 - IL_0014: nop - IL_0015: ret + IL_0014: ret } } diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl index 93f733ef373..eae525a3866 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl @@ -6132,9 +6132,11 @@ FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Boolean Equals(FSharp.Compiler.Synt FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Boolean Equals(FSharp.Compiler.Syntax.DebugPointAtLeafExpr, System.Collections.IEqualityComparer) FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Boolean Equals(System.Object) FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.DebugPointAtLeafExpr: FSharp.Compiler.Syntax.DebugPointAtLeafExpr NewYes(FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.DebugPointAtLeafExpr: FSharp.Compiler.Text.Range Item -FSharp.Compiler.Syntax.DebugPointAtLeafExpr: FSharp.Compiler.Text.Range get_Item() +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Boolean get_isHidden() +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Boolean isHidden +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: FSharp.Compiler.Syntax.DebugPointAtLeafExpr NewYes(Boolean, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: FSharp.Compiler.Text.Range get_range() +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Int32 GetHashCode() FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Int32 GetHashCode(System.Collections.IEqualityComparer) FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Int32 Tag From 61d931915dcb251b5fb4e40431044ce4e290dd4f Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Fri, 5 Jun 2026 12:25:21 +0200 Subject: [PATCH 2/6] Print source in sequence point dump --- .../Binding/Local - Erased call 02.bsl | 7 +++++ .../Binding/Local - Erased call 03.bsl | 8 ++++++ .../Binding/Local - Erased call 04.bsl | 12 +++++++-- .../Binding/Local - Erased call 05.bsl | 12 +++++++-- .../Binding/Local - Erased call 06.bsl | 12 +++++++-- .../Binding/Local - ErasedCall 01.bsl | 9 ++++++- .../Binding/Local - SequentialUnits 01.bsl | 14 +++++++--- .../Binding/Local - Unit 01.bsl | 11 ++++++-- .../Binding/Module - Erased call 02.bsl | 7 +++++ .../Binding/Module - Erased call 03.bsl | 8 ++++++ .../Binding/Module - Erased call 04.bsl | 12 +++++++-- .../Binding/Module - Erased call 05.bsl | 12 +++++++-- .../Binding/Module - Erased call 06.bsl | 12 +++++++-- .../Binding/Module - ErasedCall 01.bsl | 5 ++++ .../Binding/Module - SequentialUnits 01.bsl | 10 +++++-- .../Binding/Module - Unit 01.bsl | 7 ++++- .../Array - Body - MultipleStatements 01.bsl | 18 +++++++++---- .../Array - Body - SingleStatement 01.bsl | 15 ++++++++--- ...ay - Comprehensions - ActivePattern 01.bsl | 21 +++++++++++---- .../Array - Comprehensions - Arrow 01.bsl | 16 ++++++++--- .../Array - Comprehensions - Tuple 01.bsl | 17 +++++++++--- .../Array - Comprehensions - Tuple 02.bsl | 17 +++++++++--- .../Array - Comprehensions - Value 01.bsl | 19 +++++++++---- .../Array - Comprehensions - Value 02.bsl | 17 +++++++++--- .../Array - Pattern - ActivePattern 01.bsl | 19 +++++++++---- .../ForEach/Array - Pattern - Tuple 01.bsl | 15 ++++++++--- .../ForEach/Array - Simple 01.bsl | 15 ++++++++--- .../ForEach/List - Body - ErasedCall 01.bsl | 13 ++++++--- .../List - Body - ErasedThenKeptCall 01.bsl | 16 ++++++++--- .../List - Body - KeptThenErasedCall 01.bsl | 16 ++++++++--- .../ForEach/List - Body - LetUnit 01.bsl | 18 +++++++++---- .../List - Body - MultipleStatements 01.bsl | 18 +++++++++---- .../ForEach/List - Body - ParenUnit 01.bsl | 15 ++++++++--- .../List - Body - SequentialUnits 01.bsl | 18 +++++++++---- .../List - Body - SingleStatement 01.bsl | 15 ++++++++--- ...st - Comprehensions - ActivePattern 01.bsl | 21 +++++++++++---- .../List - Comprehensions - Arrow 01.bsl | 16 ++++++++--- .../List - Comprehensions - Tuple 01.bsl | 17 +++++++++--- .../List - Comprehensions - Tuple 02.bsl | 17 +++++++++--- .../List - Comprehensions - Value 01.bsl | 19 +++++++++---- .../List - Comprehensions - Value 02.bsl | 17 +++++++++--- .../List - Pattern - ActivePattern 01.bsl | 19 +++++++++---- .../ForEach/List - Pattern - Tuple 01.bsl | 15 ++++++++--- .../ForEach/List - Simple 01.bsl | 15 ++++++++--- .../Seq - Body - MultipleStatements 01.bsl | 18 +++++++++---- .../Seq - Body - SingleStatement 01.bsl | 15 ++++++++--- ...eq - Comprehensions - ActivePattern 01.bsl | 27 +++++++++++++------ .../Seq - Comprehensions - Arrow 01.bsl | 22 ++++++++++----- .../Seq - Comprehensions - Tuple 01.bsl | 23 +++++++++++----- .../Seq - Comprehensions - Tuple 02.bsl | 23 +++++++++++----- .../Seq - Comprehensions - Value 01.bsl | 25 +++++++++++------ .../Seq - Comprehensions - Value 02.bsl | 23 +++++++++++----- .../Seq - Pattern - ActivePattern 01.bsl | 19 +++++++++---- .../ForEach/Seq - Pattern - Tuple 01.bsl | 15 ++++++++--- .../ForEach/Seq - Simple 01.bsl | 15 ++++++++--- .../String - Body - SingleStatement 01.bsl | 15 ++++++++--- .../Function/Body - Erased call 02.bsl | 7 +++++ .../Function/Body - Erased call 03.bsl | 8 ++++++ .../Function/Body - Erased call 04.bsl | 10 ++++++- .../Function/Body - Erased call 05.bsl | 10 ++++++- .../Function/Body - Erased call 06.bsl | 10 ++++++- .../Function/Body - ErasedCall 01.bsl | 6 +++++ .../Function/Body - ErasedThenKeptCall 01.bsl | 9 ++++++- .../Function/Body - KeptThenErasedCall 01.bsl | 9 ++++++- .../Function/Body - LetThenValue 01.bsl | 11 ++++++-- .../Function/Body - SequentialUnits 01.bsl | 11 ++++++-- .../Function/Body - Unit 01.bsl | 8 +++++- .../SequencePoints/SequencePointsTests.fs | 3 ++- tests/FSharp.Test.Utilities/Compiler.fs | 6 +++-- 69 files changed, 755 insertions(+), 225 deletions(-) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 02.bsl index a56d4e22f3f..9f8de4b8ccb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 02.bsl @@ -1,3 +1,10 @@ +module Module + +let i = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 03.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 03.bsl index a56d4e22f3f..ddef94ec6f6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 03.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 03.bsl @@ -1,3 +1,11 @@ +module Module + +let i = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 04.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 04.bsl index b5ea48a2b02..7926295a77d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 04.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 04.bsl @@ -1,3 +1,11 @@ +module Module + +let i = + () + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 @@ -7,7 +15,7 @@ Module::.cctor IL_000c: ret Module::staticInitialization@ - (5,5-5,7) () + (4,5-4,7) () IL_0000: ldnull - IL_0001: stsfld i@4 + IL_0001: stsfld i@3 IL_0006: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 05.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 05.bsl index 89b07eb630f..dbeda1b4e15 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 05.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 05.bsl @@ -1,3 +1,11 @@ +module Module + +let i = + System.Diagnostics.Debug.Write "" + () + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 @@ -7,7 +15,7 @@ Module::.cctor IL_000c: ret Module::staticInitialization@ - (6,5-6,7) () + (5,5-5,7) () IL_0000: ldnull - IL_0001: stsfld i@4 + IL_0001: stsfld i@3 IL_0006: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 06.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 06.bsl index 4d2583f7a06..b4d3f3392e3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 06.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Erased call 06.bsl @@ -1,3 +1,11 @@ +module Module + +let i = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" + () +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 @@ -7,7 +15,7 @@ Module::.cctor IL_000c: ret Module::staticInitialization@ - (7,5-7,7) () + (6,5-6,7) () IL_0000: ldnull - IL_0001: stsfld i@4 + IL_0001: stsfld i@3 IL_0006: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - ErasedCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - ErasedCall 01.bsl index 85ce8fcb060..8784f1fe3c3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - ErasedCall 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - ErasedCall 01.bsl @@ -1,3 +1,10 @@ +module Module + +do + let i = System.Diagnostics.Debug.Write "" + () +-------------------------------------------------------------------------------- + Module::staticInitialization@ - (6,5-6,7) () + (5,5-5,7) () IL_0000: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - SequentialUnits 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - SequentialUnits 01.bsl index f8569c7551b..39a42b809a6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - SequentialUnits 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - SequentialUnits 01.bsl @@ -1,9 +1,17 @@ +module Module + +do + let i = () + let j = () + () +-------------------------------------------------------------------------------- + Module::staticInitialization@ - (5,5-5,15) let i = () + (4,5-4,15) let i = () IL_0000: nop - (6,5-6,15) let j = () + (5,5-5,15) let j = () IL_0001: nop - (7,5-7,7) () + (6,5-6,7) () IL_0002: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Unit 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Unit 01.bsl index e06986670e8..89970bd86f7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Unit 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Local - Unit 01.bsl @@ -1,6 +1,13 @@ +module Module + +do + let i = () + () +-------------------------------------------------------------------------------- + Module::staticInitialization@ - (5,5-5,15) let i = () + (4,5-4,15) let i = () IL_0000: nop - (6,5-6,7) () + (5,5-5,7) () IL_0001: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 02.bsl index a56d4e22f3f..9f8de4b8ccb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 02.bsl @@ -1,3 +1,10 @@ +module Module + +let i = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 03.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 03.bsl index a56d4e22f3f..ddef94ec6f6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 03.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 03.bsl @@ -1,3 +1,11 @@ +module Module + +let i = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 04.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 04.bsl index b5ea48a2b02..7926295a77d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 04.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 04.bsl @@ -1,3 +1,11 @@ +module Module + +let i = + () + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 @@ -7,7 +15,7 @@ Module::.cctor IL_000c: ret Module::staticInitialization@ - (5,5-5,7) () + (4,5-4,7) () IL_0000: ldnull - IL_0001: stsfld i@4 + IL_0001: stsfld i@3 IL_0006: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 05.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 05.bsl index 89b07eb630f..dbeda1b4e15 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 05.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 05.bsl @@ -1,3 +1,11 @@ +module Module + +let i = + System.Diagnostics.Debug.Write "" + () + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 @@ -7,7 +15,7 @@ Module::.cctor IL_000c: ret Module::staticInitialization@ - (6,5-6,7) () + (5,5-5,7) () IL_0000: ldnull - IL_0001: stsfld i@4 + IL_0001: stsfld i@3 IL_0006: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 06.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 06.bsl index 4d2583f7a06..b4d3f3392e3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 06.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Erased call 06.bsl @@ -1,3 +1,11 @@ +module Module + +let i = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" + () +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 @@ -7,7 +15,7 @@ Module::.cctor IL_000c: ret Module::staticInitialization@ - (7,5-7,7) () + (6,5-6,7) () IL_0000: ldnull - IL_0001: stsfld i@4 + IL_0001: stsfld i@3 IL_0006: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - ErasedCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - ErasedCall 01.bsl index 8b137891791..7def5b5213a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - ErasedCall 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - ErasedCall 01.bsl @@ -1 +1,6 @@ +module Module + +let i = System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - SequentialUnits 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - SequentialUnits 01.bsl index 5a8bfaee8dd..527031e40ea 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - SequentialUnits 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - SequentialUnits 01.bsl @@ -1,6 +1,12 @@ +module Module + +let i = () +let j = () +-------------------------------------------------------------------------------- + Module::staticInitialization@ - (4,1-4,11) let i = () + (3,1-3,11) let i = () IL_0000: nop - (5,1-5,11) let j = () + (4,1-4,11) let j = () IL_0001: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Unit 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Unit 01.bsl index b41b6aa0392..690723ece92 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Unit 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Binding/Module - Unit 01.bsl @@ -1,3 +1,8 @@ +module Module + +let i = () +-------------------------------------------------------------------------------- + Module::staticInitialization@ - (4,1-4,11) let i = () + (3,1-3,11) let i = () IL_0000: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - MultipleStatements 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - MultipleStatements 01.bsl index beb451d8511..30b0f457e37 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - MultipleStatements 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - MultipleStatements 01.bsl @@ -1,22 +1,30 @@ +module Module + +let f (l: int[]) = + for i in l do + System.Console.WriteLine i + System.Console.WriteLine(i + 1) +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_001c - (5,5-5,10) for i + (4,5-4,10) for i IL_0006: ldloc.0 IL_0007: ldloc.1 IL_0008: ldelem.i4 IL_0009: stloc.2 - (6,9-6,35) System.Console.WriteLine i + (5,9-5,35) System.Console.WriteLine i IL_000a: ldloc.2 IL_000b: call WriteLine - (7,9-7,40) System.Console.WriteLine(i + 1) + (6,9-6,40) System.Console.WriteLine(i + 1) IL_0010: ldloc.2 IL_0011: ldc.i4.1 IL_0012: add @@ -28,7 +36,7 @@ Module::f IL_001a: add IL_001b: stloc.1 - (5,11-5,13) in + (4,11-4,13) in IL_001c: ldloc.1 IL_001d: ldloc.0 IL_001e: ldlen diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - SingleStatement 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - SingleStatement 01.bsl index 022d36579ed..97d32670fa4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - SingleStatement 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - SingleStatement 01.bsl @@ -1,18 +1,25 @@ +module Module + +let f (l: int[]) = + for i in l do + System.Console.WriteLine i +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_0014 - (5,5-5,10) for i + (4,5-4,10) for i IL_0006: ldloc.0 IL_0007: ldloc.1 IL_0008: ldelem.i4 IL_0009: stloc.2 - (6,9-6,35) System.Console.WriteLine i + (5,9-5,35) System.Console.WriteLine i IL_000a: ldloc.2 IL_000b: call WriteLine @@ -22,7 +29,7 @@ Module::f IL_0012: add IL_0013: stloc.1 - (5,11-5,13) in + (4,11-4,13) in IL_0014: ldloc.1 IL_0015: ldloc.0 IL_0016: ldlen diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl index a2dd006417a..fb31f91aec7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl @@ -1,13 +1,24 @@ +module Module + +let (|Id|) (x: int) = x + +let f (l: int list) = + [| + for Id i in l do + yield i + |] +-------------------------------------------------------------------------------- + Module::|Id| - (4,23-4,24) x + (3,23-3,24) x IL_0000: ldarg.0 IL_0001: ret Module::f - (7,5-10,7) [| for Id i in l do yield i |] + (6,5-9,7) [| for Id i in l do yield i |] IL_0000: nop - (8,9-8,12) for + (7,9-7,12) for IL_0001: ldarg.0 IL_0002: callvirt GetEnumerator IL_0007: stloc.1 @@ -21,13 +32,13 @@ Module::f IL_0019: ldloc.s 4 IL_001b: stloc.s 5 - (9,13-9,20) yield i + (8,13-8,20) yield i IL_001d: ldloca.s 0 IL_001f: ldloc.s 5 IL_0021: call Add IL_0026: nop - (8,18-8,20) in + (7,18-7,20) in IL_0027: ldloc.1 IL_0028: callvirt MoveNext IL_002d: brtrue.s IL_000a diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Arrow 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Arrow 01.bsl index 048c51b972b..2949cfe2441 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Arrow 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Arrow 01.bsl @@ -1,8 +1,16 @@ +module Module + +let f (l: int list) = + [| + for n in l -> n + |] +-------------------------------------------------------------------------------- + Module::f - (5,5-7,7) [| for n in l -> n |] + (4,5-6,7) [| for n in l -> n |] IL_0000: nop - (6,9-6,12) for + (5,9-5,12) for IL_0001: ldarg.0 IL_0002: callvirt GetEnumerator IL_0007: stloc.1 @@ -13,13 +21,13 @@ Module::f IL_0011: ldloca.s 0 IL_0013: stloc.s 4 - (6,23-6,24) n + (5,23-5,24) n IL_0015: ldloc.s 4 IL_0017: ldloc.3 IL_0018: call Add IL_001d: nop - (6,15-6,17) in + (5,15-5,17) in IL_001e: ldloc.1 IL_001f: callvirt MoveNext IL_0024: brtrue.s IL_000a diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 01.bsl index 234b112f656..4a08a514d4d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 01.bsl @@ -1,8 +1,17 @@ +module Module + +let f (l: (int * int) list) = + [| + for n in l do + yield n + |] +-------------------------------------------------------------------------------- + Module::f - (5,5-8,7) [| for n in l do yield n |] + (4,5-7,7) [| for n in l do yield n |] IL_0000: nop - (6,9-6,12) for + (5,9-5,12) for IL_0001: ldarg.0 IL_0002: callvirt GetEnumerator IL_0007: stloc.1 @@ -13,13 +22,13 @@ Module::f IL_0011: ldloca.s 0 IL_0013: stloc.s 4 - (7,13-7,20) yield n + (6,13-6,20) yield n IL_0015: ldloc.s 4 IL_0017: ldloc.3 IL_0018: call Add IL_001d: nop - (6,15-6,17) in + (5,15-5,17) in IL_001e: ldloc.1 IL_001f: callvirt MoveNext IL_0024: brtrue.s IL_000a diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 02.bsl index d9b3362ac39..88845077d34 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 02.bsl @@ -1,8 +1,17 @@ +module Module + +let f (l: (int * int) list) = + [| + for i, i1 in l do + yield i + |] +-------------------------------------------------------------------------------- + Module::f - (5,5-8,7) [| for i, i1 in l do yield i |] + (4,5-7,7) [| for i, i1 in l do yield i |] IL_0000: nop - (6,9-6,12) for + (5,9-5,12) for IL_0001: ldarg.0 IL_0002: callvirt GetEnumerator IL_0007: stloc.1 @@ -17,13 +26,13 @@ Module::f IL_001a: call get_Item1 IL_001f: stloc.s 5 - (7,13-7,20) yield i + (6,13-6,20) yield i IL_0021: ldloca.s 0 IL_0023: ldloc.s 5 IL_0025: call Add IL_002a: nop - (6,19-6,21) in + (5,19-5,21) in IL_002b: ldloc.1 IL_002c: callvirt MoveNext IL_0031: brtrue.s IL_000a diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 01.bsl index 0e9884491ae..5ef6a83c0a3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 01.bsl @@ -1,3 +1,12 @@ +module Module + +let a = + [| + for n in 1..10 do + yield n + |] +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 @@ -7,7 +16,7 @@ Module::.cctor IL_000c: ret Module::staticInitialization@ - (4,1-8,7) let a = [| for n in 1..10 do yield n |] + (3,1-7,7) let a = [| for n in 1..10 do yield n |] IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -22,14 +31,14 @@ Module::staticInitialization@ IL_0011: ldloc.2 IL_0012: stloc.3 - (6,9-6,12) for + (5,9-5,12) for IL_0013: ldloc.0 IL_0014: ldloc.1 IL_0015: conv.i IL_0016: stloc.s 4 IL_0018: stloc.s 5 - (7,13-7,20) yield n + (6,13-6,20) yield n IL_001a: ldloc.s 5 IL_001c: ldloc.s 4 IL_001e: ldloc.3 @@ -44,11 +53,11 @@ Module::staticInitialization@ IL_0027: add IL_0028: stloc.1 - (6,15-6,17) in + (5,15-5,17) in IL_0029: ldloc.1 IL_002a: ldc.i4.s 10 IL_002c: conv.i8 IL_002d: blt.un.s IL_0011 IL_002f: ldloc.0 - IL_0030: stsfld a@4 + IL_0030: stsfld a@3 IL_0035: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 02.bsl index 234b112f656..375f75f94bf 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 02.bsl @@ -1,8 +1,17 @@ +module Module + +let f (l: int list) = + [| + for n in l do + yield n + |] +-------------------------------------------------------------------------------- + Module::f - (5,5-8,7) [| for n in l do yield n |] + (4,5-7,7) [| for n in l do yield n |] IL_0000: nop - (6,9-6,12) for + (5,9-5,12) for IL_0001: ldarg.0 IL_0002: callvirt GetEnumerator IL_0007: stloc.1 @@ -13,13 +22,13 @@ Module::f IL_0011: ldloca.s 0 IL_0013: stloc.s 4 - (7,13-7,20) yield n + (6,13-6,20) yield n IL_0015: ldloc.s 4 IL_0017: ldloc.3 IL_0018: call Add IL_001d: nop - (6,15-6,17) in + (5,15-5,17) in IL_001e: ldloc.1 IL_001f: callvirt MoveNext IL_0024: brtrue.s IL_000a diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - ActivePattern 01.bsl index 735b64ef291..a162545aa41 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - ActivePattern 01.bsl @@ -1,17 +1,26 @@ +module Module + +let (|Id|) (x: int) = x + +let f (l: int[]) = + for Id i in l do + () +-------------------------------------------------------------------------------- + Module::|Id| - (4,23-4,24) x + (3,23-3,24) x IL_0000: ldarg.0 IL_0001: ret Module::f - (7,17-7,18) l + (6,17-6,18) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_0019 - (7,5-7,13) for Id i + (6,5-6,13) for Id i IL_0006: ldloc.0 IL_0007: ldloc.1 IL_0008: ldelem.i4 @@ -22,7 +31,7 @@ Module::f IL_0011: ldloc.3 IL_0012: stloc.s 4 - (8,9-8,11) () + (7,9-7,11) () IL_0014: nop @@ -31,7 +40,7 @@ Module::f IL_0017: add IL_0018: stloc.1 - (7,14-7,16) in + (6,14-6,16) in IL_0019: ldloc.1 IL_001a: ldloc.0 IL_001b: ldlen diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - Tuple 01.bsl index 117072dd130..f8618ea40c5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - Tuple 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - Tuple 01.bsl @@ -1,12 +1,19 @@ +module Module + +let f (l: (int * int)[]) = + for i1, i2 in l do + () +-------------------------------------------------------------------------------- + Module::f - (5,19-5,20) l + (4,19-4,20) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_0022 - (5,5-5,15) for i1, i2 + (4,5-4,15) for i1, i2 IL_0006: ldloc.0 IL_0007: ldloc.1 IL_0008: ldelem 0x1b000001 @@ -18,7 +25,7 @@ Module::f IL_0016: call get_Item1 IL_001b: stloc.s 4 - (6,9-6,11) () + (5,9-5,11) () IL_001d: nop @@ -27,7 +34,7 @@ Module::f IL_0020: add IL_0021: stloc.1 - (5,16-5,18) in + (4,16-4,18) in IL_0022: ldloc.1 IL_0023: ldloc.0 IL_0024: ldlen diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Simple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Simple 01.bsl index ad1455f0b35..5b6e9dedcc1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Simple 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Simple 01.bsl @@ -1,18 +1,25 @@ +module Module + +let f (l: int[]) = + for i in l do + () +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_000f - (5,5-5,10) for i + (4,5-4,10) for i IL_0006: ldloc.0 IL_0007: ldloc.1 IL_0008: ldelem.i4 IL_0009: stloc.2 - (6,9-6,11) () + (5,9-5,11) () IL_000a: nop @@ -21,7 +28,7 @@ Module::f IL_000d: add IL_000e: stloc.1 - (5,11-5,13) in + (4,11-4,13) in IL_000f: ldloc.1 IL_0010: ldloc.0 IL_0011: ldlen diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedCall 01.bsl index cb970fe45cc..fc9ede4e5a9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedCall 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedCall 01.bsl @@ -1,5 +1,12 @@ +module Module + +let f (l: int list) = + for i in l do + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,7 +14,7 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_001b - (5,5-5,10) for i + (4,5-4,10) for i IL_000b: ldloc.0 IL_000c: call get_HeadOrDefault IL_0011: stloc.2 @@ -19,7 +26,7 @@ Module::f IL_0015: call get_TailOrNull IL_001a: stloc.1 - (5,11-5,13) in + (4,11-4,13) in IL_001b: ldloc.1 IL_001c: brtrue.s IL_000b IL_001e: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedThenKeptCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedThenKeptCall 01.bsl index 13752f34640..cadd3d20fcd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedThenKeptCall 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ErasedThenKeptCall 01.bsl @@ -1,5 +1,13 @@ +module Module + +let f (l: int list) = + for i in l do + System.Diagnostics.Debug.Write "" + System.Console.WriteLine "" +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,12 +15,12 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_0025 - (5,5-5,10) for i + (4,5-4,10) for i IL_000b: ldloc.0 IL_000c: call get_HeadOrDefault IL_0011: stloc.2 - (7,9-7,36) System.Console.WriteLine "" + (6,9-6,36) System.Console.WriteLine "" IL_0012: ldstr "" IL_0017: call WriteLine @@ -23,7 +31,7 @@ Module::f IL_001f: call get_TailOrNull IL_0024: stloc.1 - (5,11-5,13) in + (4,11-4,13) in IL_0025: ldloc.1 IL_0026: brtrue.s IL_000b IL_0028: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - KeptThenErasedCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - KeptThenErasedCall 01.bsl index 44330778128..290e4b0f1ce 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - KeptThenErasedCall 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - KeptThenErasedCall 01.bsl @@ -1,5 +1,13 @@ +module Module + +let f (l: int list) = + for i in l do + System.Console.WriteLine "" + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,12 +15,12 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_0025 - (5,5-5,10) for i + (4,5-4,10) for i IL_000b: ldloc.0 IL_000c: call get_HeadOrDefault IL_0011: stloc.2 - (6,9-6,36) System.Console.WriteLine "" + (5,9-5,36) System.Console.WriteLine "" IL_0012: ldstr "" IL_0017: call WriteLine @@ -23,7 +31,7 @@ Module::f IL_001f: call get_TailOrNull IL_0024: stloc.1 - (5,11-5,13) in + (4,11-4,13) in IL_0025: ldloc.1 IL_0026: brtrue.s IL_000b IL_0028: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - LetUnit 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - LetUnit 01.bsl index 5eec9beaeb0..d6607455ef3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - LetUnit 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - LetUnit 01.bsl @@ -1,5 +1,13 @@ +module Module + +let f (l: int list) = + for i in l do + let _ = () + () +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,15 +15,15 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_001d - (5,5-5,10) for i + (4,5-4,10) for i IL_000b: ldloc.0 IL_000c: call get_HeadOrDefault IL_0011: stloc.2 - (6,17-6,19) () + (5,17-5,19) () IL_0012: nop - (7,9-7,11) () + (6,9-6,11) () IL_0013: nop @@ -25,7 +33,7 @@ Module::f IL_0017: call get_TailOrNull IL_001c: stloc.1 - (5,11-5,13) in + (4,11-4,13) in IL_001d: ldloc.1 IL_001e: brtrue.s IL_000b IL_0020: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - MultipleStatements 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - MultipleStatements 01.bsl index cabffb41911..2e5f819890c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - MultipleStatements 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - MultipleStatements 01.bsl @@ -1,5 +1,13 @@ +module Module + +let f (l: int list) = + for i in l do + System.Console.WriteLine i + System.Console.WriteLine(i + 1) +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,16 +15,16 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_0029 - (5,5-5,10) for i + (4,5-4,10) for i IL_000b: ldloc.0 IL_000c: call get_HeadOrDefault IL_0011: stloc.2 - (6,9-6,35) System.Console.WriteLine i + (5,9-5,35) System.Console.WriteLine i IL_0012: ldloc.2 IL_0013: call WriteLine - (7,9-7,40) System.Console.WriteLine(i + 1) + (6,9-6,40) System.Console.WriteLine(i + 1) IL_0018: ldloc.2 IL_0019: ldc.i4.1 IL_001a: add @@ -29,7 +37,7 @@ Module::f IL_0023: call get_TailOrNull IL_0028: stloc.1 - (5,11-5,13) in + (4,11-4,13) in IL_0029: ldloc.1 IL_002a: brtrue.s IL_000b IL_002c: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ParenUnit 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ParenUnit 01.bsl index 401652494b3..f6f184a7701 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ParenUnit 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ParenUnit 01.bsl @@ -1,5 +1,12 @@ +module Module + +let f (l: int list) = + for i in l do + (()) +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,12 +14,12 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_001c - (5,5-5,10) for i + (4,5-4,10) for i IL_000b: ldloc.0 IL_000c: call get_HeadOrDefault IL_0011: stloc.2 - (6,10-6,12) () + (5,10-5,12) () IL_0012: nop @@ -22,7 +29,7 @@ Module::f IL_0016: call get_TailOrNull IL_001b: stloc.1 - (5,11-5,13) in + (4,11-4,13) in IL_001c: ldloc.1 IL_001d: brtrue.s IL_000b IL_001f: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SequentialUnits 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SequentialUnits 01.bsl index c3c76afe5aa..315504bd6a5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SequentialUnits 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SequentialUnits 01.bsl @@ -1,5 +1,13 @@ +module Module + +let f (l: int list) = + for i in l do + () + () +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,15 +15,15 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_001d - (5,5-5,10) for i + (4,5-4,10) for i IL_000b: ldloc.0 IL_000c: call get_HeadOrDefault IL_0011: stloc.2 - (6,9-6,11) () + (5,9-5,11) () IL_0012: nop - (7,9-7,11) () + (6,9-6,11) () IL_0013: nop @@ -25,7 +33,7 @@ Module::f IL_0017: call get_TailOrNull IL_001c: stloc.1 - (5,11-5,13) in + (4,11-4,13) in IL_001d: ldloc.1 IL_001e: brtrue.s IL_000b IL_0020: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SingleStatement 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SingleStatement 01.bsl index 9dc76f432cc..8d01936eae3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SingleStatement 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SingleStatement 01.bsl @@ -1,5 +1,12 @@ +module Module + +let f (l: int list) = + for i in l do + System.Console.WriteLine i +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,12 +14,12 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_0021 - (5,5-5,10) for i + (4,5-4,10) for i IL_000b: ldloc.0 IL_000c: call get_HeadOrDefault IL_0011: stloc.2 - (6,9-6,35) System.Console.WriteLine i + (5,9-5,35) System.Console.WriteLine i IL_0012: ldloc.2 IL_0013: call WriteLine @@ -23,7 +30,7 @@ Module::f IL_001b: call get_TailOrNull IL_0020: stloc.1 - (5,11-5,13) in + (4,11-4,13) in IL_0021: ldloc.1 IL_0022: brtrue.s IL_000b IL_0024: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - ActivePattern 01.bsl index 08615e86be6..1193bb29a7e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - ActivePattern 01.bsl @@ -1,13 +1,24 @@ +module Module + +let (|Id|) (x: int) = x + +let f (l: int list) = + [ + for Id i in l do + yield i + ] +-------------------------------------------------------------------------------- + Module::|Id| - (4,23-4,24) x + (3,23-3,24) x IL_0000: ldarg.0 IL_0001: ret Module::f - (7,5-10,6) [ for Id i in l do yield i ] + (6,5-9,6) [ for Id i in l do yield i ] IL_0000: nop - (8,9-8,12) for + (7,9-7,12) for IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 @@ -25,7 +36,7 @@ Module::f IL_001f: stloc.s 5 IL_0021: stloc.s 6 - (9,13-9,20) yield i + (8,13-8,20) yield i IL_0023: ldloc.s 6 IL_0025: ldloc.s 5 IL_0027: call Add @@ -36,7 +47,7 @@ Module::f IL_0030: call get_TailOrNull IL_0035: stloc.2 - (8,18-8,20) in + (7,18-7,20) in IL_0036: ldloc.2 IL_0037: brtrue.s IL_000c IL_0039: ldloca.s 0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Arrow 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Arrow 01.bsl index 108c8700c6f..b63ad05c8dd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Arrow 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Arrow 01.bsl @@ -1,8 +1,16 @@ +module Module + +let f (l: int list) = + [ + for n in l -> n + ] +-------------------------------------------------------------------------------- + Module::f - (5,5-7,6) [ for n in l -> n ] + (4,5-6,6) [ for n in l -> n ] IL_0000: nop - (6,9-6,12) for + (5,9-5,12) for IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 @@ -15,7 +23,7 @@ Module::f IL_0013: ldloca.s 0 IL_0015: stloc.s 4 - (6,23-6,24) n + (5,23-5,24) n IL_0017: ldloc.s 4 IL_0019: ldloc.3 IL_001a: call Add @@ -26,7 +34,7 @@ Module::f IL_0023: call get_TailOrNull IL_0028: stloc.2 - (6,15-6,17) in + (5,15-5,17) in IL_0029: ldloc.2 IL_002a: brtrue.s IL_000c IL_002c: ldloca.s 0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 01.bsl index 3a82bf3d6bf..e89ee794a8c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 01.bsl @@ -1,8 +1,17 @@ +module Module + +let f (l: (int * int) list) = + [ + for n in l do + yield n + ] +-------------------------------------------------------------------------------- + Module::f - (5,5-8,6) [ for n in l do yield n ] + (4,5-7,6) [ for n in l do yield n ] IL_0000: nop - (6,9-6,12) for + (5,9-5,12) for IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 @@ -15,7 +24,7 @@ Module::f IL_0013: ldloca.s 0 IL_0015: stloc.s 4 - (7,13-7,20) yield n + (6,13-6,20) yield n IL_0017: ldloc.s 4 IL_0019: ldloc.3 IL_001a: call Add @@ -26,7 +35,7 @@ Module::f IL_0023: call get_TailOrNull IL_0028: stloc.2 - (6,15-6,17) in + (5,15-5,17) in IL_0029: ldloc.2 IL_002a: brtrue.s IL_000c IL_002c: ldloca.s 0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 02.bsl index d308682b1cc..52d43e9b92e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 02.bsl @@ -1,8 +1,17 @@ +module Module + +let f (l: (int * int) list) = + [ + for i, i1 in l do + yield i + ] +-------------------------------------------------------------------------------- + Module::f - (5,5-8,6) [ for i, i1 in l do yield i ] + (4,5-7,6) [ for i, i1 in l do yield i ] IL_0000: nop - (6,9-6,12) for + (5,9-5,12) for IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 @@ -21,7 +30,7 @@ Module::f IL_0023: stloc.s 5 IL_0025: stloc.s 6 - (7,13-7,20) yield i + (6,13-6,20) yield i IL_0027: ldloc.s 6 IL_0029: ldloc.s 5 IL_002b: call Add @@ -32,7 +41,7 @@ Module::f IL_0034: call get_TailOrNull IL_0039: stloc.2 - (6,19-6,21) in + (5,19-5,21) in IL_003a: ldloc.2 IL_003b: brtrue.s IL_000c IL_003d: ldloca.s 0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 01.bsl index 5e0accf23b8..3af247f1849 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 01.bsl @@ -1,3 +1,12 @@ +module Module + +let a = + [ + for n in 1..10 do + yield n + ] +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 @@ -7,7 +16,7 @@ Module::.cctor IL_000c: ret Module::staticInitialization@ - (4,1-8,6) let a = [ for n in 1..10 do yield n ] + (3,1-7,6) let a = [ for n in 1..10 do yield n ] IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 @@ -17,11 +26,11 @@ Module::staticInitialization@ IL_0007: ldloc.2 IL_0008: stloc.3 - (6,9-6,12) for + (5,9-5,12) for IL_0009: ldloca.s 0 IL_000b: stloc.s 4 - (7,13-7,20) yield n + (6,13-6,20) yield n IL_000d: ldloc.s 4 IL_000f: ldloc.3 IL_0010: call Add @@ -36,12 +45,12 @@ Module::staticInitialization@ IL_001d: add IL_001e: stloc.1 - (6,15-6,17) in + (5,15-5,17) in IL_001f: ldloc.1 IL_0020: ldc.i4.s 10 IL_0022: conv.i8 IL_0023: blt.un.s IL_0007 IL_0025: ldloca.s 0 IL_0027: call Close - IL_002c: stsfld a@4 + IL_002c: stsfld a@3 IL_0031: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 02.bsl index 3a82bf3d6bf..c4071f0681a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 02.bsl @@ -1,8 +1,17 @@ +module Module + +let f (l: int list) = + [ + for n in l do + yield n + ] +-------------------------------------------------------------------------------- + Module::f - (5,5-8,6) [ for n in l do yield n ] + (4,5-7,6) [ for n in l do yield n ] IL_0000: nop - (6,9-6,12) for + (5,9-5,12) for IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 @@ -15,7 +24,7 @@ Module::f IL_0013: ldloca.s 0 IL_0015: stloc.s 4 - (7,13-7,20) yield n + (6,13-6,20) yield n IL_0017: ldloc.s 4 IL_0019: ldloc.3 IL_001a: call Add @@ -26,7 +35,7 @@ Module::f IL_0023: call get_TailOrNull IL_0028: stloc.2 - (6,15-6,17) in + (5,15-5,17) in IL_0029: ldloc.2 IL_002a: brtrue.s IL_000c IL_002c: ldloca.s 0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - ActivePattern 01.bsl index 04c4ef9351d..5bac23a29c8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - ActivePattern 01.bsl @@ -1,10 +1,19 @@ +module Module + +let (|Id|) (x: int) = x + +let f (l: int list) = + for Id i in l do + () +-------------------------------------------------------------------------------- + Module::|Id| - (4,23-4,24) x + (3,23-3,24) x IL_0000: ldarg.0 IL_0001: ret Module::f - (7,17-7,18) l + (6,17-6,18) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -12,7 +21,7 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_0026 - (7,5-7,13) for Id i + (6,5-6,13) for Id i IL_000b: ldloc.0 IL_000c: call get_HeadOrDefault IL_0011: stloc.2 @@ -22,7 +31,7 @@ Module::f IL_0019: ldloc.3 IL_001a: stloc.s 4 - (8,9-8,11) () + (7,9-7,11) () IL_001c: nop @@ -32,7 +41,7 @@ Module::f IL_0020: call get_TailOrNull IL_0025: stloc.1 - (7,14-7,16) in + (6,14-6,16) in IL_0026: ldloc.1 IL_0027: brtrue.s IL_000b IL_0029: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - Tuple 01.bsl index afdc8ca112c..b00aa0c54a9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - Tuple 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - Tuple 01.bsl @@ -1,5 +1,12 @@ +module Module + +let f (l: (int * int) list) = + for i1, i2 in l do + () +-------------------------------------------------------------------------------- + Module::f - (5,19-5,20) l + (4,19-4,20) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,7 +14,7 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_002b - (5,5-5,15) for i1, i2 + (4,5-4,15) for i1, i2 IL_000b: ldloc.0 IL_000c: call get_HeadOrDefault IL_0011: stloc.2 @@ -18,7 +25,7 @@ Module::f IL_001a: call get_Item1 IL_001f: stloc.s 4 - (6,9-6,11) () + (5,9-5,11) () IL_0021: nop @@ -28,7 +35,7 @@ Module::f IL_0025: call get_TailOrNull IL_002a: stloc.1 - (5,16-5,18) in + (4,16-4,18) in IL_002b: ldloc.1 IL_002c: brtrue.s IL_000b IL_002e: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Simple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Simple 01.bsl index e0cc6be0c47..c1a29adad2c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Simple 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Simple 01.bsl @@ -1,5 +1,12 @@ +module Module + +let f (l: int list) = + for i in l do + () +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,12 +14,12 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_001c - (5,5-5,10) for i + (4,5-4,10) for i IL_000b: ldloc.0 IL_000c: call get_HeadOrDefault IL_0011: stloc.2 - (6,9-6,11) () + (5,9-5,11) () IL_0012: nop @@ -22,7 +29,7 @@ Module::f IL_0016: call get_TailOrNull IL_001b: stloc.1 - (5,11-5,13) in + (4,11-4,13) in IL_001c: ldloc.1 IL_001d: brtrue.s IL_000b IL_001f: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - MultipleStatements 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - MultipleStatements 01.bsl index 0e16ad2c8e2..8d943b2d939 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - MultipleStatements 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - MultipleStatements 01.bsl @@ -1,5 +1,13 @@ +module Module + +let f (l: int seq) = + for i in l do + System.Console.WriteLine i + System.Console.WriteLine(i + 1) +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,22 +15,22 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_0020 - (5,5-5,10) for i + (4,5-4,10) for i IL_000b: ldloc.1 IL_000c: callvirt get_Current IL_0011: stloc.2 - (6,9-6,35) System.Console.WriteLine i + (5,9-5,35) System.Console.WriteLine i IL_0012: ldloc.2 IL_0013: call WriteLine - (7,9-7,40) System.Console.WriteLine(i + 1) + (6,9-6,40) System.Console.WriteLine(i + 1) IL_0018: ldloc.2 IL_0019: ldc.i4.1 IL_001a: add IL_001b: call WriteLine - (5,11-5,13) in + (4,11-4,13) in IL_0020: ldloc.1 IL_0021: callvirt MoveNext IL_0026: brtrue.s IL_000b diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - SingleStatement 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - SingleStatement 01.bsl index b6d13c7e7ab..837865a7b38 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - SingleStatement 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - SingleStatement 01.bsl @@ -1,5 +1,12 @@ +module Module + +let f (l: int seq) = + for i in l do + System.Console.WriteLine i +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,16 +14,16 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_0018 - (5,5-5,10) for i + (4,5-4,10) for i IL_000b: ldloc.1 IL_000c: callvirt get_Current IL_0011: stloc.2 - (6,9-6,35) System.Console.WriteLine i + (5,9-5,35) System.Console.WriteLine i IL_0012: ldloc.2 IL_0013: call WriteLine - (5,11-5,13) in + (4,11-4,13) in IL_0018: ldloc.1 IL_0019: callvirt MoveNext IL_001e: brtrue.s IL_000b diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl index a1d4ee342ca..996684699a2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl @@ -1,10 +1,21 @@ +module Module + +let (|Id|) (x: int) = x + +let f (l: int list) = + seq { + for Id i in l do + yield i + } +-------------------------------------------------------------------------------- + Module::|Id| - (4,23-4,24) x + (3,23-3,24) x IL_0000: ldarg.0 IL_0001: ret Module::f - (7,5-10,6) seq { for Id i in l do yield i } + (6,5-9,6) seq { for Id i in l do yield i } IL_0000: ldarg.0 IL_0001: ldnull IL_0002: ldc.i4.0 @@ -12,7 +23,7 @@ Module::f IL_0004: newobj .ctor IL_0009: ret -f@8::GenerateNext +f@7::GenerateNext IL_0000: ldarg.0 IL_0001: ldfld pc @@ -37,7 +48,7 @@ f@8::GenerateNext IL_0024: nop IL_0025: br.s IL_0027 - (8,9-8,12) for + (7,9-7,12) for IL_0027: ldarg.0 IL_0028: ldarg.0 IL_0029: ldfld l @@ -57,7 +68,7 @@ f@8::GenerateNext IL_0054: ldloc.1 IL_0055: stloc.2 - (9,13-9,20) yield i + (8,13-8,20) yield i IL_0056: ldarg.0 IL_0057: ldc.i4.2 IL_0058: stfld pc @@ -67,7 +78,7 @@ f@8::GenerateNext IL_0064: ldc.i4.1 IL_0065: ret - (8,18-8,20) in + (7,18-7,20) in IL_0066: ldarg.0 IL_0067: ldfld enum IL_006c: callvirt MoveNext @@ -91,7 +102,7 @@ f@8::GenerateNext IL_009b: ldc.i4.0 IL_009c: ret -f@8::Close +f@7::Close IL_0000: ldarg.0 IL_0001: ldfld pc @@ -175,7 +186,7 @@ f@8::Close -f@8::get_CheckClose +f@7::get_CheckClose IL_0000: ldarg.0 IL_0001: ldfld pc diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl index c22c1947a13..2b7fa0caa44 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl @@ -1,5 +1,13 @@ +module Module + +let f (l: int list) = + seq { + for n in l -> n + } +-------------------------------------------------------------------------------- + Module::f - (5,5-7,6) seq { for n in l -> n } + (4,5-6,6) seq { for n in l -> n } IL_0000: ldarg.0 IL_0001: ldnull IL_0002: ldc.i4.0 @@ -7,7 +15,7 @@ Module::f IL_0004: newobj .ctor IL_0009: ret -f@6::GenerateNext +f@5::GenerateNext IL_0000: ldarg.0 IL_0001: ldfld pc @@ -32,7 +40,7 @@ f@6::GenerateNext IL_0024: nop IL_0025: br.s IL_0027 - (6,9-6,12) for + (5,9-5,12) for IL_0027: ldarg.0 IL_0028: ldarg.0 IL_0029: ldfld l @@ -52,14 +60,14 @@ f@6::GenerateNext IL_0054: ldarg.0 IL_0055: stloc.1 - (6,23-6,24) n + (5,23-5,24) n IL_0056: ldloc.1 IL_0057: ldloc.0 IL_0058: stfld current IL_005d: ldc.i4.1 IL_005e: ret - (6,15-6,17) in + (5,15-5,17) in IL_005f: ldarg.0 IL_0060: ldfld enum IL_0065: callvirt MoveNext @@ -83,7 +91,7 @@ f@6::GenerateNext IL_0094: ldc.i4.0 IL_0095: ret -f@6::Close +f@5::Close IL_0000: ldarg.0 IL_0001: ldfld pc @@ -167,7 +175,7 @@ f@6::Close -f@6::get_CheckClose +f@5::get_CheckClose IL_0000: ldarg.0 IL_0001: ldfld pc diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl index c87c15661e4..41d3ecc5e70 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl @@ -1,5 +1,14 @@ +module Module + +let f (l: (int * int) list) = + seq { + for n in l do + yield n + } +-------------------------------------------------------------------------------- + Module::f - (5,5-8,6) seq { for n in l do yield n } + (4,5-7,6) seq { for n in l do yield n } IL_0000: ldarg.0 IL_0001: ldnull IL_0002: ldc.i4.0 @@ -7,7 +16,7 @@ Module::f IL_0004: newobj .ctor IL_0009: ret -f@6::GenerateNext +f@5::GenerateNext IL_0000: ldarg.0 IL_0001: ldfld pc @@ -32,7 +41,7 @@ f@6::GenerateNext IL_0024: nop IL_0025: br.s IL_0027 - (6,9-6,12) for + (5,9-5,12) for IL_0027: ldarg.0 IL_0028: ldarg.0 IL_0029: ldfld l @@ -52,14 +61,14 @@ f@6::GenerateNext IL_0054: ldarg.0 IL_0055: stloc.1 - (7,13-7,20) yield n + (6,13-6,20) yield n IL_0056: ldloc.1 IL_0057: ldloc.0 IL_0058: stfld current IL_005d: ldc.i4.1 IL_005e: ret - (6,15-6,17) in + (5,15-5,17) in IL_005f: ldarg.0 IL_0060: ldfld enum IL_0065: callvirt MoveNext @@ -83,7 +92,7 @@ f@6::GenerateNext IL_0094: ldc.i4.0 IL_0095: ret -f@6::Close +f@5::Close IL_0000: ldarg.0 IL_0001: ldfld pc @@ -167,7 +176,7 @@ f@6::Close -f@6::get_CheckClose +f@5::get_CheckClose IL_0000: ldarg.0 IL_0001: ldfld pc diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl index 563e2b0a3f0..05ef2cc3925 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl @@ -1,5 +1,14 @@ +module Module + +let f (l: (int * int) list) = + seq { + for i, i1 in l do + yield i + } +-------------------------------------------------------------------------------- + Module::f - (5,5-8,6) seq { for i, i1 in l do yield i } + (4,5-7,6) seq { for i, i1 in l do yield i } IL_0000: ldarg.0 IL_0001: ldnull IL_0002: ldc.i4.0 @@ -7,7 +16,7 @@ Module::f IL_0004: newobj .ctor IL_0009: ret -f@6::GenerateNext +f@5::GenerateNext IL_0000: ldarg.0 IL_0001: ldfld pc @@ -32,7 +41,7 @@ f@6::GenerateNext IL_0024: nop IL_0025: br.s IL_0027 - (6,9-6,12) for + (5,9-5,12) for IL_0027: ldarg.0 IL_0028: ldarg.0 IL_0029: ldfld l @@ -53,7 +62,7 @@ f@6::GenerateNext IL_0055: call get_Item1 IL_005a: stloc.2 - (7,13-7,20) yield i + (6,13-6,20) yield i IL_005b: ldarg.0 IL_005c: ldc.i4.2 IL_005d: stfld pc @@ -63,7 +72,7 @@ f@6::GenerateNext IL_0069: ldc.i4.1 IL_006a: ret - (6,19-6,21) in + (5,19-5,21) in IL_006b: ldarg.0 IL_006c: ldfld enum IL_0071: callvirt MoveNext @@ -87,7 +96,7 @@ f@6::GenerateNext IL_00a0: ldc.i4.0 IL_00a1: ret -f@6::Close +f@5::Close IL_0000: ldarg.0 IL_0001: ldfld pc @@ -171,7 +180,7 @@ f@6::Close -f@6::get_CheckClose +f@5::get_CheckClose IL_0000: ldarg.0 IL_0001: ldfld pc diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl index 6e703a4a985..10eb84e2fb6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl @@ -1,3 +1,12 @@ +module Module + +let a = + seq { + for n in 1..10 do + yield n + } +-------------------------------------------------------------------------------- + Module::.cctor IL_0000: ldc.i4.0 @@ -7,15 +16,15 @@ Module::.cctor IL_000c: ret Module::staticInitialization@ - (5,5-8,6) seq { for n in 1..10 do yield n } + (4,5-7,6) seq { for n in 1..10 do yield n } IL_0000: ldnull IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 IL_0003: newobj .ctor - IL_0008: stsfld a@4 + IL_0008: stsfld a@3 IL_000d: ret -a@6::GenerateNext +a@5::GenerateNext IL_0000: ldarg.0 IL_0001: ldfld pc @@ -40,7 +49,7 @@ a@6::GenerateNext IL_0024: nop IL_0025: br.s IL_0027 - (6,9-6,12) for + (5,9-5,12) for IL_0027: ldarg.0 IL_0028: ldc.i4.1 IL_0029: ldc.i4.1 @@ -62,14 +71,14 @@ a@6::GenerateNext IL_0057: ldarg.0 IL_0058: stloc.1 - (7,13-7,20) yield n + (6,13-6,20) yield n IL_0059: ldloc.1 IL_005a: ldloc.0 IL_005b: stfld current IL_0060: ldc.i4.1 IL_0061: ret - (6,15-6,17) in + (5,15-5,17) in IL_0062: ldarg.0 IL_0063: ldfld enum IL_0068: callvirt MoveNext @@ -93,7 +102,7 @@ a@6::GenerateNext IL_0097: ldc.i4.0 IL_0098: ret -a@6::Close +a@5::Close IL_0000: ldarg.0 IL_0001: ldfld pc @@ -177,7 +186,7 @@ a@6::Close -a@6::get_CheckClose +a@5::get_CheckClose IL_0000: ldarg.0 IL_0001: ldfld pc diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl index 93ea36c1411..264b30b5d4c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl @@ -1,5 +1,14 @@ +module Module + +let f (l: int list) = + seq { + for n in l do + yield n + } +-------------------------------------------------------------------------------- + Module::f - (5,5-8,6) seq { for n in l do yield n } + (4,5-7,6) seq { for n in l do yield n } IL_0000: ldarg.0 IL_0001: ldnull IL_0002: ldc.i4.0 @@ -7,7 +16,7 @@ Module::f IL_0004: newobj .ctor IL_0009: ret -f@6::GenerateNext +f@5::GenerateNext IL_0000: ldarg.0 IL_0001: ldfld pc @@ -32,7 +41,7 @@ f@6::GenerateNext IL_0024: nop IL_0025: br.s IL_0027 - (6,9-6,12) for + (5,9-5,12) for IL_0027: ldarg.0 IL_0028: ldarg.0 IL_0029: ldfld l @@ -52,14 +61,14 @@ f@6::GenerateNext IL_0054: ldarg.0 IL_0055: stloc.1 - (7,13-7,20) yield n + (6,13-6,20) yield n IL_0056: ldloc.1 IL_0057: ldloc.0 IL_0058: stfld current IL_005d: ldc.i4.1 IL_005e: ret - (6,15-6,17) in + (5,15-5,17) in IL_005f: ldarg.0 IL_0060: ldfld enum IL_0065: callvirt MoveNext @@ -83,7 +92,7 @@ f@6::GenerateNext IL_0094: ldc.i4.0 IL_0095: ret -f@6::Close +f@5::Close IL_0000: ldarg.0 IL_0001: ldfld pc @@ -167,7 +176,7 @@ f@6::Close -f@6::get_CheckClose +f@5::get_CheckClose IL_0000: ldarg.0 IL_0001: ldfld pc diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - ActivePattern 01.bsl index b367716fac3..ae75a38ec8d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - ActivePattern 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - ActivePattern 01.bsl @@ -1,10 +1,19 @@ +module Module + +let (|Id|) (x: int) = x + +let f (l: int seq) = + for Id i in l do + () +-------------------------------------------------------------------------------- + Module::|Id| - (4,23-4,24) x + (3,23-3,24) x IL_0000: ldarg.0 IL_0001: ret Module::f - (7,17-7,18) l + (6,17-6,18) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -12,7 +21,7 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_001d - (7,5-7,13) for Id i + (6,5-6,13) for Id i IL_000b: ldloc.1 IL_000c: callvirt get_Current IL_0011: stloc.2 @@ -22,10 +31,10 @@ Module::f IL_0019: ldloc.3 IL_001a: stloc.s 4 - (8,9-8,11) () + (7,9-7,11) () IL_001c: nop - (7,14-7,16) in + (6,14-6,16) in IL_001d: ldloc.1 IL_001e: callvirt MoveNext IL_0023: brtrue.s IL_000b diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - Tuple 01.bsl index 1d789aafae2..de0f3f3ff5e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - Tuple 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - Tuple 01.bsl @@ -1,5 +1,12 @@ +module Module + +let f (l: (int * int) seq) = + for i1, i2 in l do + () +-------------------------------------------------------------------------------- + Module::f - (5,19-5,20) l + (4,19-4,20) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,7 +14,7 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_0022 - (5,5-5,15) for i1, i2 + (4,5-4,15) for i1, i2 IL_000b: ldloc.1 IL_000c: callvirt get_Current IL_0011: stloc.2 @@ -18,10 +25,10 @@ Module::f IL_001a: call get_Item1 IL_001f: stloc.s 4 - (6,9-6,11) () + (5,9-5,11) () IL_0021: nop - (5,16-5,18) in + (4,16-4,18) in IL_0022: ldloc.1 IL_0023: callvirt MoveNext IL_0028: brtrue.s IL_000b diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Simple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Simple 01.bsl index cf20ed793cc..2b8bfc3ba49 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Simple 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Simple 01.bsl @@ -1,5 +1,12 @@ +module Module + +let f (l: int seq) = + for i in l do + () +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -7,15 +14,15 @@ Module::f IL_0008: stloc.1 IL_0009: br.s IL_0013 - (5,5-5,10) for i + (4,5-4,10) for i IL_000b: ldloc.1 IL_000c: callvirt get_Current IL_0011: stloc.2 - (6,9-6,11) () + (5,9-5,11) () IL_0012: nop - (5,11-5,13) in + (4,11-4,13) in IL_0013: ldloc.1 IL_0014: callvirt MoveNext IL_0019: brtrue.s IL_000b diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/String - Body - SingleStatement 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/String - Body - SingleStatement 01.bsl index 571e8a5476a..9dd087ba1b3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/String - Body - SingleStatement 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/String - Body - SingleStatement 01.bsl @@ -1,5 +1,12 @@ +module Module + +let f (l: string) = + for c in l do + System.Console.WriteLine c +-------------------------------------------------------------------------------- + Module::f - (5,14-5,15) l + (4,14-4,15) l IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldc.i4.0 @@ -13,13 +20,13 @@ Module::f IL_000e: ldloc.2 IL_000f: blt.s IL_0029 - (5,5-5,10) for c + (4,5-4,10) for c IL_0011: ldloc.0 IL_0012: ldloc.2 IL_0013: callvirt get_Chars IL_0018: stloc.3 - (6,9-6,35) System.Console.WriteLine c + (5,9-5,35) System.Console.WriteLine c IL_0019: ldloc.3 IL_001a: call WriteLine @@ -29,7 +36,7 @@ Module::f IL_0021: add IL_0022: stloc.2 - (5,11-5,13) in + (4,11-4,13) in IL_0023: ldloc.2 IL_0024: ldloc.1 IL_0025: ldc.i4.1 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 02.bsl index 8b137891791..6b8bd6c7183 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 02.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 02.bsl @@ -1 +1,8 @@ +module Module + +let f () = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 03.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 03.bsl index 8b137891791..29f72e56448 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 03.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 03.bsl @@ -1 +1,9 @@ +module Module + +let f () = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 04.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 04.bsl index f3a13298d7a..bdfbdb06041 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 04.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 04.bsl @@ -1,3 +1,11 @@ +module Module + +let f () = + () + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::f - (5,5-5,7) () + (4,5-4,7) () IL_0000: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 05.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 05.bsl index 5b43fa23219..3b406721679 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 05.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 05.bsl @@ -1,3 +1,11 @@ +module Module + +let f () = + System.Diagnostics.Debug.Write "" + () + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::f - (6,5-6,7) () + (5,5-5,7) () IL_0000: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 06.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 06.bsl index 57c43f3fa5a..43b4c570085 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 06.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Erased call 06.bsl @@ -1,3 +1,11 @@ +module Module + +let f () = + System.Diagnostics.Debug.Write "" + System.Diagnostics.Debug.Write "" + () +-------------------------------------------------------------------------------- + Module::f - (7,5-7,7) () + (6,5-6,7) () IL_0000: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedCall 01.bsl index 8b137891791..47b52e134d2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedCall 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedCall 01.bsl @@ -1 +1,7 @@ +module Module + +let f () = + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedThenKeptCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedThenKeptCall 01.bsl index 49a5c633237..a35373ff798 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedThenKeptCall 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - ErasedThenKeptCall 01.bsl @@ -1,5 +1,12 @@ +module Module + +let f () = + System.Diagnostics.Debug.Write "" + System.Console.WriteLine "" +-------------------------------------------------------------------------------- + Module::f - (6,5-6,32) System.Console.WriteLine "" + (5,5-5,32) System.Console.WriteLine "" IL_0000: ldstr "" IL_0005: call WriteLine IL_000a: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - KeptThenErasedCall 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - KeptThenErasedCall 01.bsl index 5210433b28d..9eaa2d22ee8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - KeptThenErasedCall 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - KeptThenErasedCall 01.bsl @@ -1,5 +1,12 @@ +module Module + +let f () = + System.Console.WriteLine "" + System.Diagnostics.Debug.Write "" +-------------------------------------------------------------------------------- + Module::f - (5,5-5,32) System.Console.WriteLine "" + (4,5-4,32) System.Console.WriteLine "" IL_0000: ldstr "" IL_0005: call WriteLine IL_000a: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - LetThenValue 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - LetThenValue 01.bsl index 7d3acc1e66a..e433d98d6dc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - LetThenValue 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - LetThenValue 01.bsl @@ -1,8 +1,15 @@ +module Module + +let f () = + let i = 1 + 1 +-------------------------------------------------------------------------------- + Module::f - (5,5-5,14) let i = 1 + (4,5-4,14) let i = 1 IL_0000: ldc.i4.1 IL_0001: stloc.0 - (6,5-6,6) 1 + (5,5-5,6) 1 IL_0002: ldc.i4.1 IL_0003: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - SequentialUnits 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - SequentialUnits 01.bsl index 61f9775be11..2e679cf0419 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - SequentialUnits 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - SequentialUnits 01.bsl @@ -1,6 +1,13 @@ +module Module + +let f () = + () + () +-------------------------------------------------------------------------------- + Module::f - (5,5-5,7) () + (4,5-4,7) () IL_0000: nop - (6,5-6,7) () + (5,5-5,7) () IL_0001: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Unit 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Unit 01.bsl index f3a13298d7a..aeebdef981e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Unit 01.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Unit 01.bsl @@ -1,3 +1,9 @@ +module Module + +let f () = + () +-------------------------------------------------------------------------------- + Module::f - (5,5-5,7) () + (4,5-4,7) () IL_0000: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs index 0fd43b8165e..f26924ba5eb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs @@ -9,7 +9,8 @@ open FSharp.Test.Compiler [] type private Baseline = - static member verify(source, [] name: string) = + static member verify(source: string, [] name: string) = + let source = source.Trim() let moduleName = StackTrace().GetFrame(1).GetMethod().DeclaringType.Name FSharp source |> asLibrary diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index 86f760a3bee..d6823a921d0 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -1802,7 +1802,8 @@ $ code --diff {outFile} {expectedFile} yield offset, op.Name + text ] let private formatSequencePoints (source: string) (assemblyPath: string) (pdbReader: MetadataReader) = - let lines = source.Replace("\r\n", "\n").Replace("\r", "\n").Split('\n') + let normalizedSource = source.Replace("\r\n", "\n").Replace("\r", "\n") + let lines = normalizedSource.Split('\n') let textOf (sp: SequencePoint) = let sb = StringBuilder() @@ -1840,7 +1841,8 @@ $ code --diff {outFile} {expectedFile} if offset >= sp.Offset && offset < nextOffset then sb.AppendLine(sprintf " IL_%04x: %s" offset text) |> ignore sb.AppendLine() |> ignore) - sb.ToString().Trim() + "\n" + + normalizedSource.Trim() + "\n" + String.replicate 80 "-" + "\n\n" + sb.ToString().Trim() + "\n" let verifySequencePointsBaseline (source: string) (baselineFilePath: string) (result: CompilationResult) : CompilationResult = match result with From c52d97bbf18c5cc7723f4b131401b50dc3095e3c Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Fri, 5 Jun 2026 12:36:57 +0200 Subject: [PATCH 3/6] Fantomas --- .../Checking/Expressions/CheckComputationExpressions.fs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs index 35b5f7df008..b05df442d36 100644 --- a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs @@ -2704,7 +2704,9 @@ and TranslateComputationExpressionBind and convertSimpleReturnToExpr (ceenv: ComputationExpressionContext<'a>) comp varSpace innerComp = match innerComp with | SynExpr.YieldOrReturn((false, _), returnExpr, m, _) -> - let returnExpr = SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, m), false, returnExpr) + let returnExpr = + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes(false, m), false, returnExpr) + Some(returnExpr, None) | SynExpr.Match(spMatch, expr, clauses, m, trivia) -> From 82f25233ca4a076d4960744b0c024bdf0bf3e6cb Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Fri, 5 Jun 2026 15:16:36 +0200 Subject: [PATCH 4/6] Fix hasVisibleDebugPoint, update baselines Co-Authored-By: Claude Opus 4.8 --- src/Compiler/CodeGen/IlxGen.fs | 9 ++- ....fs.RealInternalSignatureOn.il.netcore.bsl | 31 +++++++- ...ember04a.fs.RealInternalSignatureOn.il.bsl | 31 +++++++- ...RealInternalSignatureOn.OptimizeOff.il.bsl | 60 +++++++++++---- ....fs.RealInternalSignatureOn.il.netcore.bsl | 44 ++++++++++- ....fs.RealInternalSignatureOn.il.netcore.bsl | 44 ++++++++++- .../Tuples/Tuple01.fs.OptimizeOff.il.bsl | 77 +++++++++++++++++++ ...fs.il.bsl => Tuple01.fs.OptimizeOn.il.bsl} | 1 - 8 files changed, 275 insertions(+), 22 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple01.fs.OptimizeOff.il.bsl rename tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/{Tuple01.fs.il.bsl => Tuple01.fs.OptimizeOn.il.bsl} (99%) diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 1a57e09a6ca..c50b16c2628 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -10645,10 +10645,11 @@ and CodeGenInitMethod cenv (cgbuf: CodeGenBuffer) eenv tref (codeGenInitFunc: Co // Keep the init method if it carries a visible debug point, so steppable bindings like 'let i = ()' survive. let hasVisibleDebugPoint = - body.Code.Instrs - |> Array.exists (function - | I_seqpoint sp -> sp.Line <> FeeFee cenv - | _ -> false) + not cenv.options.localOptimizationsEnabled + && body.Code.Instrs + |> Array.exists (function + | I_seqpoint sp -> sp.Line <> FeeFee cenv + | _ -> false) if codeDoesSomething || hasVisibleDebugPoint then // We are here because the module we just grabbed has an interesting static initializer diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.netcore.bsl index 5178c62e41d..ee6ecc8e060 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.netcore.bsl @@ -517,6 +517,24 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ret + } + .property class assembly/C e2() { .get class assembly/C assembly::get_e2() @@ -526,8 +544,19 @@ .class private abstract auto ansi sealed ''.$assembly extends [runtime]System.Object { -} + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } +} diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs.RealInternalSignatureOn.il.bsl index 87d3e2bfa45..98f8426f18b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs.RealInternalSignatureOn.il.bsl @@ -91,6 +91,24 @@ IL_0001: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ret + } + .property int32 x() { .get int32 assembly::get_x() @@ -100,8 +118,19 @@ .class private abstract auto ansi sealed ''.$assembly extends [runtime]System.Object { -} + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } +} diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EntryPoint01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EntryPoint01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 42385696441..edc3c3437db 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EntryPoint01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EntryPoint01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -49,21 +49,43 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 - IL_0000: nop - IL_0001: nop - IL_0002: call int32 assembly::get_static_initializer() - IL_0007: ldc.i4.s 10 - IL_0009: bne.un.s IL_000f - - IL_000b: ldc.i4.0 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop IL_000c: nop - IL_000d: br.s IL_0011 + IL_000d: nop + IL_000e: call int32 assembly::get_static_initializer() + IL_0013: ldc.i4.s 10 + IL_0015: bne.un.s IL_001b + + IL_0017: ldc.i4.0 + IL_0018: nop + IL_0019: br.s IL_001d + + IL_001b: ldc.i4.1 + IL_001c: nop + IL_001d: tail. + IL_001f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0024: ret + } - IL_000f: ldc.i4.1 - IL_0010: nop - IL_0011: tail. - IL_0013: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0018: ret + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ret } .property int32 static_initializer() @@ -75,6 +97,18 @@ .class private abstract auto ansi sealed ''.$assembly extends [runtime]System.Object { + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.netcore.bsl index 4f12c1595c8..d464c830e32 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.netcore.bsl @@ -1455,6 +1455,24 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ABC::init@ + IL_0006: ldsfld int32 ''.$ABC::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ret + } + .property string greeting() { .get string ABC/ABC::get_greeting() @@ -1483,6 +1501,25 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ABC::init@ + IL_0006: ldsfld int32 ''.$ABC::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: call void ABC/ABC::staticInitialization@() + IL_0005: ret + } + .property string greeting() { .get string ABC::get_greeting() @@ -1492,12 +1529,17 @@ .class private abstract auto ansi sealed ''.$ABC extends [runtime]System.Object { + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public static void main@() cil managed { .entrypoint .maxstack 8 - IL_0000: ret + IL_0000: call void ABC::staticInitialization@() + IL_0005: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.netcore.bsl index ef41cabbfcb..68b3d9701f4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.netcore.bsl @@ -2153,6 +2153,24 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ret + } + .property string greeting() { .get string XYZ.ABC/ABC::get_greeting() @@ -2181,6 +2199,25 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: call void XYZ.ABC/ABC::staticInitialization@() + IL_0005: ret + } + .property string greeting() { .get string XYZ.ABC::get_greeting() @@ -2190,12 +2227,17 @@ .class private abstract auto ansi sealed ''.$assembly extends [runtime]System.Object { + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public static void main@() cil managed { .entrypoint .maxstack 8 - IL_0000: ret + IL_0000: call void XYZ.ABC::staticInitialization@() + IL_0005: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple01.fs.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple01.fs.OptimizeOff.il.bsl new file mode 100644 index 00000000000..59b47aeff0b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple01.fs.OptimizeOff.il.bsl @@ -0,0 +1,77 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple01.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple01.fs.OptimizeOn.il.bsl similarity index 99% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple01.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple01.fs.OptimizeOn.il.bsl index d13107b7a6f..a55b6493f84 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple01.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple01.fs.OptimizeOn.il.bsl @@ -52,4 +52,3 @@ - From 773d15c0b4516e7eb18de9f986a2ee3dcc7d56de Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Fri, 5 Jun 2026 16:30:35 +0200 Subject: [PATCH 5/6] Update baselines Co-Authored-By: Claude Opus 4.8 --- ...a.fs.RealInternalSignatureOn.il.net472.bsl | 30 +++++++++++++ ...e.fs.RealInternalSignatureOn.il.net472.bsl | 44 ++++++++++++++++++- ...e.fs.RealInternalSignatureOn.il.net472.bsl | 44 ++++++++++++++++++- 3 files changed, 116 insertions(+), 2 deletions(-) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.net472.bsl index 0d32a2de1dd..7ab998bc870 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.net472.bsl @@ -517,6 +517,24 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ret + } + .property class assembly/C e2() { .get class assembly/C assembly::get_e2() @@ -526,6 +544,18 @@ .class private abstract auto ansi sealed ''.$assembly extends [runtime]System.Object { + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + } .class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.net472.bsl index 0d7172dfc0a..31aa835e6dd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.net472.bsl @@ -1455,6 +1455,24 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ABC::init@ + IL_0006: ldsfld int32 ''.$ABC::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ret + } + .property string greeting() { .get string ABC/ABC::get_greeting() @@ -1483,6 +1501,25 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ABC::init@ + IL_0006: ldsfld int32 ''.$ABC::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: call void ABC/ABC::staticInitialization@() + IL_0005: ret + } + .property string greeting() { .get string ABC::get_greeting() @@ -1492,12 +1529,17 @@ .class private abstract auto ansi sealed ''.$ABC extends [runtime]System.Object { + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public static void main@() cil managed { .entrypoint .maxstack 8 - IL_0000: ret + IL_0000: call void ABC::staticInitialization@() + IL_0005: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.net472.bsl index 407197b1184..b9733cee415 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.net472.bsl @@ -2153,6 +2153,24 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ret + } + .property string greeting() { .get string XYZ.ABC/ABC::get_greeting() @@ -2181,6 +2199,25 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: call void XYZ.ABC/ABC::staticInitialization@() + IL_0005: ret + } + .property string greeting() { .get string XYZ.ABC::get_greeting() @@ -2190,12 +2227,17 @@ .class private abstract auto ansi sealed ''.$assembly extends [runtime]System.Object { + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public static void main@() cil managed { .entrypoint .maxstack 8 - IL_0000: ret + IL_0000: call void XYZ.ABC::staticInitialization@() + IL_0005: ret } } From 28f84adc829061f5ca9c4f738bda8af7b0056865 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Mon, 8 Jun 2026 22:55:16 +0200 Subject: [PATCH 6/6] Release notes --- docs/release-notes/.FSharp.Compiler.Service/11.0.100.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 965957dbc0c..91865d3a3bf 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -82,6 +82,7 @@ * Symbols: add ObsoleteDiagnosticInfo ([PR #19359](https://github.com/dotnet/fsharp/pull/19359)) * 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)) ### Changed