diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs index 2f890a85222..a12316477a9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs @@ -10,442 +10,210 @@ module ForLoop = compilation |> withOptions [ "--test:EmitFeeFeeAs100001" ] |> asExe - |> withOptimize |> withEmbeddedPdb |> withEmbedAllSource |> ignoreWarnings |> verifyILBaseline - // SOURCE=NoAllocationOfTuple01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoAllocationOfTuple01.dll" # NoAllocationOfTuple01.fs - [] - let ``NoAllocationOfTuple01_fs_RealInternalSignatureOff`` compilation = + // SOURCE=ForLoop01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop01.exe" # ForLoop01.fs - + [] + let ``ForLoop01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation - // SOURCE=NoAllocationOfTuple01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoAllocationOfTuple01.dll" # NoAllocationOfTuple01.fs - [] - let ``NoAllocationOfTuple01_fs_RealInternalSignatureOn`` compilation = + // SOURCE=ForLoop02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop02.exe" # ForLoop02.fs + [] + let ``ForLoop02_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - // SOURCE=ForEachOnArray01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnArray01.dll" # ForEachOnArray01.fs - [] - let ``ForEachOnArray01_fs_RealInternalSignatureOff`` compilation = + // SOURCE=ForLoop03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop03.exe" # ForLoop03.fs + [] + let ``ForLoop03_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation - // SOURCE=ForEachOnArray01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnArray01.dll" # ForEachOnArray01.fs - [] - let ``ForEachOnArray01_fs_RealInternalSignatureOn`` compilation = + // SOURCE=NoAllocationOfTuple01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoAllocationOfTuple01.dll" # NoAllocationOfTuple01.fs + [] + let ``NoAllocationOfTuple01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - // SOURCE=ForEachOnList01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnList01.dll" # ForEachOnList01.fs - [] - let ``ForEachOnList01_fs_RealInternalSignatureOff`` compilation = + // SOURCE=ForEachOnArray01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnArray01.dll" # ForEachOnArray01.fs + [] + let ``ForEachOnArray01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachOnList01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnList01.dll" # ForEachOnList01.fs - [] - let ``ForEachOnList01_fs_RealInternalSignatureOn`` compilation = + [] + let ``ForEachOnList01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachOnString01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnString01.dll" # ForEachOnString01.fs - [] - let ``ForEachOnString01_fs_RealInternalSignatureOff`` compilation = + [] + let ``ForEachOnString01_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachOnString01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnString01.dll" # ForEachOnString01.fs - [] - let ``ForEachOnString01_fs_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ZeroToArrLength01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ZeroToArrLength01.dll" # ZeroToArrLength01.fs - [] - let ``ZeroToArrLength01_fs_RealInternalSignatureOff`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ZeroToArrLength01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ZeroToArrLength01.dll" # ZeroToArrLength01.fs - [] - let ``ZeroToArrLength01_fs_RealInternalSignatureOn`` compilation = + [] + let ``ZeroToArrLength01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ZeroToArrLength02.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ZeroToArrLength02.dll" # ZeroToArrLength02.fs - [] - let ``ZeroToArrLength02_fs_RealInternalSignatureOff`` compilation = + [] + let ``ZeroToArrLength02_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ZeroToArrLength02.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ZeroToArrLength02.dll" # ZeroToArrLength02.fs - [] - let ``ZeroToArrLength02_fs_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NoIEnumerable01.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable01.dll" # NoIEnumerable01.fsx - [] - let ``NoIEnumerable01_fsx_RealInternalSignatureOff`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NoIEnumerable01.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable01.dll" # NoIEnumerable01.fsx - [] - let ``NoIEnumerable01_fsx_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NoIEnumerable02.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable02.dll" # NoIEnumerable02.fsx - [] - let ``NoIEnumerable02_fsx_RealInternalSignatureOff`` compilation = + [] + let ``NoIEnumerable01_fsx`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NoIEnumerable02.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable02.dll" # NoIEnumerable02.fsx - [] - let ``NoIEnumerable02_fsx_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NoIEnumerable03.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable03.dll" # NoIEnumerable03.fsx - [] - let ``NoIEnumerable03_fsx_RealInternalSignatureOff`` compilation = + [] + let ``NoIEnumerable02_fsx`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NoIEnumerable03.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable03.dll" # NoIEnumerable03.fsx - [] - let ``NoIEnumerable03_fsx_RealInternalSignatureOn`` compilation = + [] + let ``NoIEnumerable03_fsx`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd01.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd01.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd01_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd01_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd01.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd01.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd01_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd01.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd01.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd01_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd01.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd01.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd01_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd02.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd02.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd02_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd02.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd02.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd02_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd02.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd02.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd02_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd02.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd02.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd02_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd03.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd03.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd02_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd03.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd03.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd03.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd03.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd03.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd03.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd04.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd04.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd03_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd04.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd04.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd04_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd04.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd04.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd04.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd04.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd05.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd05.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd05_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd05.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd05.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd05_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd05.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd05.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd05_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd05.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd05.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd05_fs_RealInternalSignatureOn_nonopt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd05_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepSByte.fs SCFLAGS="--optimize+" # ForEachRangeStepSByte.fs --optimize+ - [] - let ``ForEachRangeStepSByte_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepSByte_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepSByte.fs SCFLAGS="--optimize+" # ForEachRangeStepSByte.fs --optimize+ - [] - let ``ForEachRangeStepSByte_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepByte.fs SCFLAGS="--optimize+" # ForEachRangeStepByte.fs --optimize+ - [] - let ``ForEachRangeStepByte_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepByte.fs SCFLAGS="--optimize+" # ForEachRangeStepByte.fs --optimize+ - [] - let ``ForEachRangeStepByte_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepByte_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepChar.fs SCFLAGS="--optimize+" # ForEachRangeStepChar.fs --optimize+ - [] - let ``ForEachRangeStepChar_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepChar.fs SCFLAGS="--optimize+" # ForEachRangeStepChar.fs --optimize+ - [] - let ``ForEachRangeStepChar_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepInt16.fs SCFLAGS="--optimize+" # ForEachRangeStepInt16.fs --optimize+ - [] - let ``ForEachRangeStepInt16_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepChar_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepInt16.fs SCFLAGS="--optimize+" # ForEachRangeStepInt16.fs --optimize+ - [] - let ``ForEachRangeStepInt16_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepInt16_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepUInt16.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt16.fs --optimize+ - [] - let ``ForEachRangeStepUInt16_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepUInt16_`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepUInt16.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt16.fs --optimize+ - [] - let ``ForEachRangeStepUInt16_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepInt32.fs SCFLAGS="--optimize+" # ForEachRangeStepInt32.fs --optimize+ - [] - let ``ForEachRangeStepInt32_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepInt32.fs SCFLAGS="--optimize+" # ForEachRangeStepInt32.fs --optimize+ - [] - let ``ForEachRangeStepInt32_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepInt32_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepUInt32.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt32.fs --optimize+ - [] - let ``ForEachRangeStepUInt32_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepUInt32.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt32.fs --optimize+ - [] - let ``ForEachRangeStepUInt32_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepInt64.fs SCFLAGS="--optimize+" # ForEachRangeStepInt64.fs --optimize+ - [] - let ``ForEachRangeStepInt64_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepUInt32_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepInt64.fs SCFLAGS="--optimize+" # ForEachRangeStepInt64.fs --optimize+ - [] - let ``ForEachRangeStepInt64_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepInt64_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepUInt64.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt64.fs --optimize+ - [] - let ``ForEachRangeStepUInt64_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepUInt64_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepUInt64.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt64.fs --optimize+ - [] - let ``ForEachRangeStepUInt64_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepIntPtr.fs SCFLAGS="--optimize+" # ForEachRangeStepIntPtr.fs --optimize+ - [] - let ``ForEachRangeStepIntPtr_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepIntPtr.fs SCFLAGS="--optimize+" # ForEachRangeStepIntPtr.fs --optimize+ - [] - let ``ForEachRangeStepIntPtr_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepIntPtr_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepUIntPtr.fs SCFLAGS="--optimize+" # ForEachRangeStepUIntPtr.fs --optimize+ - [] - let ``ForEachRangeStepUIntPtr_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepUIntPtr.fs SCFLAGS="--optimize+" # ForEachRangeStepUIntPtr.fs --optimize+ - [] - let ``ForEachRangeStepUIntPtr_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStep_UnitsOfMeasure.fs SCFLAGS="--optimize+" # ForEachRangeStep_UnitsOfMeasure.fs --optimize+ - [] - let ``ForEachRangeStep_UnitsOfMeasure_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepUIntPtr_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStep_UnitsOfMeasure.fs SCFLAGS="--optimize+" # ForEachRangeStep_UnitsOfMeasure.fs --optimize+ - [] - let ``ForEachRangeStep_UnitsOfMeasure_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStep_UnitsOfMeasure_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs new file mode 100644 index 00000000000..8d7d270e2c8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs @@ -0,0 +1,6 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for TFS#712639 +// Incorrect span or overlapping debugging spans +// The test will start failing once the bug is actually fixed +for wi in [ 1 .. 3 ] do + printfn "%A" wi diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl new file mode 100644 index 00000000000..cf3ef015691 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -0,0 +1,115 @@ + + + + + +.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 ) +} + +.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 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, + uint64 V_2, + int32 V_3, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, + int32 V_5) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.2 + IL_0003: ldc.i4.1 + IL_0004: stloc.3 + IL_0005: br.s IL_0019 + + IL_0007: ldloca.s V_1 + IL_0009: ldloc.3 + IL_000a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_000f: nop + IL_0010: ldloc.3 + IL_0011: ldc.i4.1 + IL_0012: add + IL_0013: stloc.3 + IL_0014: ldloc.2 + IL_0015: ldc.i4.1 + IL_0016: conv.i8 + IL_0017: add + IL_0018: stloc.2 + IL_0019: ldloc.2 + IL_001a: ldc.i4.3 + IL_001b: conv.i8 + IL_001c: blt.un.s IL_0007 + + IL_001e: ldloca.s V_1 + IL_0020: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0025: stloc.0 + IL_0026: ldloc.0 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002c: stloc.s V_4 + IL_002e: br.s IL_005a + + IL_0030: ldloc.0 + IL_0031: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0036: stloc.s V_5 + IL_0038: ldstr "%A" + IL_003d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0042: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_004e: pop + IL_004f: ldloc.s V_4 + IL_0051: stloc.0 + IL_0052: ldloc.0 + IL_0053: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0058: stloc.s V_4 + IL_005a: ldloc.s V_4 + IL_005c: brtrue.s IL_0030 + + IL_005e: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl new file mode 100644 index 00000000000..5914c20eb17 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -0,0 +1,144 @@ + + + + + +.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 +} +.mresource public FSharpSignatureCompressedData.assembly +{ + + +} +.mresource public FSharpOptimizationCompressedData.assembly +{ + + +} +.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 specialname static void staticInitialization@() cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, + uint64 V_2, + int32 V_3, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, + int32 V_5) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.2 + IL_0003: ldc.i4.1 + IL_0004: stloc.3 + IL_0005: br.s IL_0019 + + IL_0007: ldloca.s V_1 + IL_0009: ldloc.3 + IL_000a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_000f: nop + IL_0010: ldloc.3 + IL_0011: ldc.i4.1 + IL_0012: add + IL_0013: stloc.3 + IL_0014: ldloc.2 + IL_0015: ldc.i4.1 + IL_0016: conv.i8 + IL_0017: add + IL_0018: stloc.2 + IL_0019: ldloc.2 + IL_001a: ldc.i4.3 + IL_001b: conv.i8 + IL_001c: blt.un.s IL_0007 + + IL_001e: ldloca.s V_1 + IL_0020: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0025: stloc.0 + IL_0026: ldloc.0 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002c: stloc.s V_4 + IL_002e: br.s IL_005a + + IL_0030: ldloc.0 + IL_0031: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0036: stloc.s V_5 + IL_0038: ldstr "%A" + IL_003d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0042: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_004e: pop + IL_004f: ldloc.s V_4 + IL_0051: stloc.0 + IL_0052: ldloc.0 + IL_0053: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0058: stloc.s V_4 + IL_005a: ldloc.s V_4 + IL_005c: brtrue.s IL_0030 + + IL_005e: 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/ForLoop/ForLoop02.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs new file mode 100644 index 00000000000..04882e0ec2c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs @@ -0,0 +1,7 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for TFS#712639 +// Incorrect span or overlapping debugging spans +// The test will start failing once the bug is actually fixed +for wi = 1 to 3 do + printfn "%A" wi + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl new file mode 100644 index 00000000000..9eabae75fe8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -0,0 +1,90 @@ + + + + + +.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 +} +.mresource public FSharpSignatureCompressedData.assembly +{ + + +} +.mresource public FSharpOptimizationCompressedData.assembly +{ + + +} +.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 ) +} + +.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 5 + .locals init (int32 V_0) + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: br.s IL_001e + + IL_0004: ldstr "%A" + IL_0009: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_000e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0013: ldloc.0 + IL_0014: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0019: pop + IL_001a: ldloc.0 + IL_001b: ldc.i4.1 + IL_001c: add + IL_001d: stloc.0 + IL_001e: ldloc.0 + IL_001f: ldc.i4.1 + IL_0020: ldc.i4.3 + IL_0021: add + IL_0022: blt.s IL_0004 + + IL_0024: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl new file mode 100644 index 00000000000..652e223cd59 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -0,0 +1,109 @@ + + + + + +.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 +} +.mresource public FSharpSignatureCompressedData.assembly +{ + + +} +.mresource public FSharpOptimizationCompressedData.assembly +{ + + +} +.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 specialname static void staticInitialization@() cil managed + { + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: br.s IL_001e + + IL_0004: ldstr "%A" + IL_0009: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_000e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0013: ldloc.0 + IL_0014: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0019: pop + IL_001a: ldloc.0 + IL_001b: ldc.i4.1 + IL_001c: add + IL_001d: stloc.0 + IL_001e: ldloc.0 + IL_001f: ldc.i4.1 + IL_0020: ldc.i4.3 + IL_0021: add + IL_0022: blt.s IL_0004 + + IL_0024: 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/ForLoop/ForLoop03.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs new file mode 100644 index 00000000000..9ce6ae8b25d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs @@ -0,0 +1,14 @@ +// #Regression #NoMono #NoMT #CodeGen #EmittedIL +// Regression test for FSharp1.0:4785 +// Title: Search the IEnumerator pattern first + +let ra = new ResizeArray(100) +for i = 0 to 100 do ra.Add(i) + + +let test1() = + let mutable z = 0 + for i = 0 to 10000000 do + for x in ra do + z <- z + 1 + printfn "z = %d" z diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl new file mode 100644 index 00000000000..c2d8e84b8d7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl @@ -0,0 +1,173 @@ + + + + + +.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 +} +.mresource public FSharpSignatureCompressedData.assembly +{ + + +} +.mresource public FSharpOptimizationCompressedData.assembly +{ + + +} +.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 public specialname static class [runtime]System.Collections.Generic.List`1 get_ra() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Collections.Generic.List`1 ''.$assembly::ra@5 + IL_0005: ret + } + + .method public static void test1() cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class [runtime]System.Collections.Generic.List`1 V_2, + valuetype [runtime]System.Collections.Generic.List`1/Enumerator V_3, + int32 V_4) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_003f + + IL_0006: call class [runtime]System.Collections.Generic.List`1 assembly::get_ra() + IL_000b: stloc.2 + IL_000c: ldloc.2 + IL_000d: callvirt instance valuetype [runtime]System.Collections.Generic.List`1/Enumerator class [runtime]System.Collections.Generic.List`1::GetEnumerator() + IL_0012: stloc.3 + .try + { + IL_0013: br.s IL_0022 + + IL_0015: ldloca.s V_3 + IL_0017: call instance !0 valuetype [runtime]System.Collections.Generic.List`1/Enumerator::get_Current() + IL_001c: stloc.s V_4 + IL_001e: ldloc.0 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloca.s V_3 + IL_0024: call instance bool valuetype [runtime]System.Collections.Generic.List`1/Enumerator::MoveNext() + IL_0029: brtrue.s IL_0015 + + IL_002b: leave.s IL_003b + + } + finally + { + IL_002d: ldloca.s V_3 + IL_002f: constrained. valuetype [runtime]System.Collections.Generic.List`1/Enumerator + IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003a: endfinally + } + IL_003b: ldloc.1 + IL_003c: ldc.i4.1 + IL_003d: add + IL_003e: stloc.1 + IL_003f: ldloc.1 + IL_0040: ldc.i4.1 + IL_0041: ldc.i4 0x989680 + IL_0046: add + IL_0047: blt.s IL_0006 + + IL_0049: ldstr "z = %d" + IL_004e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0058: ldloc.0 + IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_005e: pop + IL_005f: ret + } + + .property class [runtime]System.Collections.Generic.List`1 + ra() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [runtime]System.Collections.Generic.List`1 assembly::get_ra() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [runtime]System.Collections.Generic.List`1 ra@5 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 5 + .locals init (class [runtime]System.Collections.Generic.List`1 V_0, + int32 V_1) + IL_0000: ldc.i4.s 100 + IL_0002: newobj instance void class [runtime]System.Collections.Generic.List`1::.ctor(int32) + IL_0007: dup + IL_0008: stsfld class [runtime]System.Collections.Generic.List`1 ''.$assembly::ra@5 + IL_000d: stloc.0 + IL_000e: ldc.i4.0 + IL_000f: stloc.1 + IL_0010: br.s IL_0021 + + IL_0012: call class [runtime]System.Collections.Generic.List`1 assembly::get_ra() + IL_0017: ldloc.1 + IL_0018: callvirt instance void class [runtime]System.Collections.Generic.List`1::Add(!0) + IL_001d: ldloc.1 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: stloc.1 + IL_0021: ldloc.1 + IL_0022: ldc.i4.1 + IL_0023: ldc.i4.s 100 + IL_0025: add + IL_0026: blt.s IL_0012 + + IL_0028: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl new file mode 100644 index 00000000000..c23cb75c545 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -0,0 +1,167 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern System.Collections +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 9:0:0:0 +} +.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 public specialname static class [System.Collections]System.Collections.Generic.List`1 get_ra() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [System.Collections]System.Collections.Generic.List`1 ''.$assembly::ra@5 + IL_0005: ret + } + + .method public static void test1() cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class [System.Collections]System.Collections.Generic.List`1 V_2, + valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator V_3, + int32 V_4) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_003f + + IL_0006: call class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() + IL_000b: stloc.2 + IL_000c: ldloc.2 + IL_000d: callvirt instance valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator class [System.Collections]System.Collections.Generic.List`1::GetEnumerator() + IL_0012: stloc.3 + .try + { + IL_0013: br.s IL_0022 + + IL_0015: ldloca.s V_3 + IL_0017: call instance !0 valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator::get_Current() + IL_001c: stloc.s V_4 + IL_001e: ldloc.0 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloca.s V_3 + IL_0024: call instance bool valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator::MoveNext() + IL_0029: brtrue.s IL_0015 + + IL_002b: leave.s IL_003b + + } + finally + { + IL_002d: ldloca.s V_3 + IL_002f: constrained. valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator + IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003a: endfinally + } + IL_003b: ldloc.1 + IL_003c: ldc.i4.1 + IL_003d: add + IL_003e: stloc.1 + IL_003f: ldloc.1 + IL_0040: ldc.i4.1 + IL_0041: ldc.i4 0x989680 + IL_0046: add + IL_0047: blt.s IL_0006 + + IL_0049: ldstr "z = %d" + IL_004e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0058: ldloc.0 + IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_005e: pop + IL_005f: ret + } + + .property class [System.Collections]System.Collections.Generic.List`1 + ra() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [System.Collections]System.Collections.Generic.List`1 ra@5 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 5 + .locals init (class [System.Collections]System.Collections.Generic.List`1 V_0, + int32 V_1) + IL_0000: ldc.i4.s 100 + IL_0002: newobj instance void class [System.Collections]System.Collections.Generic.List`1::.ctor(int32) + IL_0007: dup + IL_0008: stsfld class [System.Collections]System.Collections.Generic.List`1 ''.$assembly::ra@5 + IL_000d: stloc.0 + IL_000e: ldc.i4.0 + IL_000f: stloc.1 + IL_0010: br.s IL_0021 + + IL_0012: call class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() + IL_0017: ldloc.1 + IL_0018: callvirt instance void class [System.Collections]System.Collections.Generic.List`1::Add(!0) + IL_001d: ldloc.1 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: stloc.1 + IL_0021: ldloc.1 + IL_0022: ldc.i4.1 + IL_0023: ldc.i4.s 100 + IL_0025: add + IL_0026: blt.s IL_0012 + + IL_0028: ret + } + +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl new file mode 100644 index 00000000000..771e4efe186 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl @@ -0,0 +1,189 @@ + + + + + +.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 +} +.mresource public FSharpSignatureCompressedData.assembly +{ + + +} +.mresource public FSharpOptimizationCompressedData.assembly +{ + + +} +.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 ) + .field static assembly class [runtime]System.Collections.Generic.List`1 ra@5 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class [runtime]System.Collections.Generic.List`1 get_ra() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Collections.Generic.List`1 assembly::ra@5 + IL_0005: ret + } + + .method public static void test1() cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class [runtime]System.Collections.Generic.List`1 V_2, + valuetype [runtime]System.Collections.Generic.List`1/Enumerator V_3, + int32 V_4) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_003f + + IL_0006: call class [runtime]System.Collections.Generic.List`1 assembly::get_ra() + IL_000b: stloc.2 + IL_000c: ldloc.2 + IL_000d: callvirt instance valuetype [runtime]System.Collections.Generic.List`1/Enumerator class [runtime]System.Collections.Generic.List`1::GetEnumerator() + IL_0012: stloc.3 + .try + { + IL_0013: br.s IL_0022 + + IL_0015: ldloca.s V_3 + IL_0017: call instance !0 valuetype [runtime]System.Collections.Generic.List`1/Enumerator::get_Current() + IL_001c: stloc.s V_4 + IL_001e: ldloc.0 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloca.s V_3 + IL_0024: call instance bool valuetype [runtime]System.Collections.Generic.List`1/Enumerator::MoveNext() + IL_0029: brtrue.s IL_0015 + + IL_002b: leave.s IL_003b + + } + finally + { + IL_002d: ldloca.s V_3 + IL_002f: constrained. valuetype [runtime]System.Collections.Generic.List`1/Enumerator + IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003a: endfinally + } + IL_003b: ldloc.1 + IL_003c: ldc.i4.1 + IL_003d: add + IL_003e: stloc.1 + IL_003f: ldloc.1 + IL_0040: ldc.i4.1 + IL_0041: ldc.i4 0x989680 + IL_0046: add + IL_0047: blt.s IL_0006 + + IL_0049: ldstr "z = %d" + IL_004e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0058: ldloc.0 + IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_005e: pop + IL_005f: 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 specialname static void staticInitialization@() cil managed + { + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldc.i4.s 100 + IL_0002: newobj instance void class [runtime]System.Collections.Generic.List`1::.ctor(int32) + IL_0007: stsfld class [runtime]System.Collections.Generic.List`1 assembly::ra@5 + IL_000c: ldc.i4.0 + IL_000d: stloc.0 + IL_000e: br.s IL_001f + + IL_0010: call class [runtime]System.Collections.Generic.List`1 assembly::get_ra() + IL_0015: ldloc.0 + IL_0016: callvirt instance void class [runtime]System.Collections.Generic.List`1::Add(!0) + IL_001b: ldloc.0 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.0 + IL_001f: ldloc.0 + IL_0020: ldc.i4.1 + IL_0021: ldc.i4.s 100 + IL_0023: add + IL_0024: blt.s IL_0010 + + IL_0026: ret + } + + .property class [runtime]System.Collections.Generic.List`1 + ra() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [runtime]System.Collections.Generic.List`1 assembly::get_ra() + } +} + +.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/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl new file mode 100644 index 00000000000..0efd6c82922 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl @@ -0,0 +1,183 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern System.Collections +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 9:0:0:0 +} +.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 ) + .field static assembly class [System.Collections]System.Collections.Generic.List`1 ra@5 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class [System.Collections]System.Collections.Generic.List`1 get_ra() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [System.Collections]System.Collections.Generic.List`1 assembly::ra@5 + IL_0005: ret + } + + .method public static void test1() cil managed + { + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class [System.Collections]System.Collections.Generic.List`1 V_2, + valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator V_3, + int32 V_4) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_003f + + IL_0006: call class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() + IL_000b: stloc.2 + IL_000c: ldloc.2 + IL_000d: callvirt instance valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator class [System.Collections]System.Collections.Generic.List`1::GetEnumerator() + IL_0012: stloc.3 + .try + { + IL_0013: br.s IL_0022 + + IL_0015: ldloca.s V_3 + IL_0017: call instance !0 valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator::get_Current() + IL_001c: stloc.s V_4 + IL_001e: ldloc.0 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloca.s V_3 + IL_0024: call instance bool valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator::MoveNext() + IL_0029: brtrue.s IL_0015 + + IL_002b: leave.s IL_003b + + } + finally + { + IL_002d: ldloca.s V_3 + IL_002f: constrained. valuetype [System.Collections]System.Collections.Generic.List`1/Enumerator + IL_0035: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003a: endfinally + } + IL_003b: ldloc.1 + IL_003c: ldc.i4.1 + IL_003d: add + IL_003e: stloc.1 + IL_003f: ldloc.1 + IL_0040: ldc.i4.1 + IL_0041: ldc.i4 0x989680 + IL_0046: add + IL_0047: blt.s IL_0006 + + IL_0049: ldstr "z = %d" + IL_004e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0058: ldloc.0 + IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_005e: pop + IL_005f: 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 specialname static void staticInitialization@() cil managed + { + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldc.i4.s 100 + IL_0002: newobj instance void class [System.Collections]System.Collections.Generic.List`1::.ctor(int32) + IL_0007: stsfld class [System.Collections]System.Collections.Generic.List`1 assembly::ra@5 + IL_000c: ldc.i4.0 + IL_000d: stloc.0 + IL_000e: br.s IL_001f + + IL_0010: call class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() + IL_0015: ldloc.0 + IL_0016: callvirt instance void class [System.Collections]System.Collections.Generic.List`1::Add(!0) + IL_001b: ldloc.0 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.0 + IL_001f: ldloc.0 + IL_0020: ldc.i4.1 + IL_0021: ldc.i4.s 100 + IL_0023: add + IL_0024: blt.s IL_0010 + + IL_0026: ret + } + + .property class [System.Collections]System.Collections.Generic.List`1 + ra() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [System.Collections]System.Collections.Generic.List`1 assembly::get_ra() + } +} + +.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/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl similarity index 61% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 7e035bf8d61..0689c964faf 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.opt.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -87,84 +77,93 @@ .entrypoint .maxstack 7 - .locals init (int32 V_0, - int32 V_1, + .locals init (int32[] V_0, + int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32 V_5, + int32 V_6) IL_0000: ldc.i4.8 IL_0001: ldc.i4.1 IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + IL_0007: dup + IL_0008: stsfld int32[] ''.$assembly::r@6 + IL_000d: stloc.0 + IL_000e: ldc.i4.5 + IL_000f: ldc.i4.2 + IL_0010: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: ldc.i4.0 - IL_0019: stloc.1 - IL_001a: call int32[] assembly::get_r() - IL_001f: ldlen - IL_0020: conv.i4 - IL_0021: stloc.2 - IL_0022: call int32[] assembly::get_w() - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: stloc.3 - IL_002a: ldloc.2 - IL_002b: ldloc.3 - IL_002c: bge.s IL_0032 - - IL_002e: ldloc.2 - IL_002f: nop - IL_0030: br.s IL_0034 - - IL_0032: ldloc.3 - IL_0033: nop - IL_0034: ldc.i4.1 - IL_0035: sub - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldloc.1 - IL_0039: blt.s IL_0067 - - IL_003b: call int32[] assembly::get_r() - IL_0040: ldloc.1 - IL_0041: call int32[] assembly::get_r() - IL_0046: ldloc.1 - IL_0047: ldelem [runtime]System.Int32 - IL_004c: call int32[] assembly::get_w() - IL_0051: ldloc.1 - IL_0052: ldelem [runtime]System.Int32 - IL_0057: add - IL_0058: stelem [runtime]System.Int32 - IL_005d: ldloc.1 - IL_005e: ldc.i4.1 - IL_005f: add - IL_0060: stloc.1 - IL_0061: ldloc.1 - IL_0062: ldloc.0 - IL_0063: ldc.i4.1 - IL_0064: add - IL_0065: bne.un.s IL_003b - - IL_0067: nop - IL_0068: nop - IL_0069: call int32[] assembly::get_r() - IL_006e: ldc.i4.0 - IL_006f: ldelem [runtime]System.Int32 - IL_0074: ldc.i4.3 - IL_0075: bne.un.s IL_007b - - IL_0077: ldc.i4.0 - IL_0078: nop - IL_0079: br.s IL_007d - - IL_007b: ldc.i4.1 - IL_007c: nop - IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0082: pop - IL_0083: ret + IL_0015: dup + IL_0016: stsfld int32[] ''.$assembly::w@7 + IL_001b: stloc.1 + IL_001c: ldc.i4.0 + IL_001d: stloc.3 + IL_001e: call int32[] assembly::get_r() + IL_0023: ldlen + IL_0024: conv.i4 + IL_0025: stloc.s V_4 + IL_0027: call int32[] assembly::get_w() + IL_002c: ldlen + IL_002d: conv.i4 + IL_002e: stloc.s V_5 + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: bge.s IL_003b + + IL_0036: ldloc.s V_4 + IL_0038: nop + IL_0039: br.s IL_003e + + IL_003b: ldloc.s V_5 + IL_003d: nop + IL_003e: ldc.i4.1 + IL_003f: sub + IL_0040: stloc.2 + IL_0041: ldloc.2 + IL_0042: ldloc.3 + IL_0043: blt.s IL_0071 + + IL_0045: call int32[] assembly::get_r() + IL_004a: ldloc.3 + IL_004b: call int32[] assembly::get_r() + IL_0050: ldloc.3 + IL_0051: ldelem [runtime]System.Int32 + IL_0056: call int32[] assembly::get_w() + IL_005b: ldloc.3 + IL_005c: ldelem [runtime]System.Int32 + IL_0061: add + IL_0062: stelem [runtime]System.Int32 + IL_0067: ldloc.3 + IL_0068: ldc.i4.1 + IL_0069: add + IL_006a: stloc.3 + IL_006b: ldloc.3 + IL_006c: ldloc.2 + IL_006d: ldc.i4.1 + IL_006e: add + IL_006f: bne.un.s IL_0045 + + IL_0071: nop + IL_0072: nop + IL_0073: call int32[] assembly::get_r() + IL_0078: ldc.i4.0 + IL_0079: ldelem [runtime]System.Int32 + IL_007e: ldc.i4.3 + IL_007f: bne.un.s IL_0085 + + IL_0081: ldc.i4.0 + IL_0082: nop + IL_0083: br.s IL_0087 + + IL_0085: ldc.i4.1 + IL_0086: nop + IL_0087: stloc.s V_6 + IL_0089: ldloc.s V_6 + IL_008b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0090: pop + IL_0091: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl similarity index 95% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index fd8662b1ca5..813692fac56 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.opt.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -81,7 +71,8 @@ .locals init (int32 V_0, int32 V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4) IL_0000: ldc.i4.8 IL_0001: ldc.i4.1 IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, @@ -153,9 +144,11 @@ IL_007b: ldc.i4.1 IL_007c: nop - IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0082: pop - IL_0083: ret + IL_007d: stloc.s V_4 + IL_007f: ldloc.s V_4 + IL_0081: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0086: pop + IL_0087: ret } .property int32[] r() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl similarity index 60% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 91f26499736..b86ee2d4a2c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.opt.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -87,82 +77,93 @@ .entrypoint .maxstack 7 - .locals init (int32 V_0, - int32 V_1) + .locals init (int32[] V_0, + int32[] V_1, + int32 V_2, + int32 V_3, + int32 V_4, + int32 V_5, + int32 V_6) IL_0000: ldc.i4.8 IL_0001: ldc.i4.1 IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + IL_0007: dup + IL_0008: stsfld int32[] ''.$assembly::r@6 + IL_000d: stloc.0 + IL_000e: ldc.i4.5 + IL_000f: ldc.i4.2 + IL_0010: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stloc.0 - IL_0020: call int32[] assembly::get_w() - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: stloc.1 - IL_0028: ldloc.0 - IL_0029: ldloc.1 - IL_002a: bge.s IL_0030 - - IL_002c: ldloc.0 - IL_002d: nop - IL_002e: br.s IL_0032 - - IL_0030: ldloc.1 - IL_0031: nop - IL_0032: ldc.i4.1 - IL_0033: sub - IL_0034: stloc.1 - IL_0035: ldc.i4.0 - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldloc.1 - IL_0039: bgt.s IL_0067 - - IL_003b: call int32[] assembly::get_r() - IL_0040: ldloc.1 - IL_0041: call int32[] assembly::get_r() - IL_0046: ldloc.1 - IL_0047: ldelem [runtime]System.Int32 - IL_004c: call int32[] assembly::get_w() - IL_0051: ldloc.1 - IL_0052: ldelem [runtime]System.Int32 - IL_0057: add - IL_0058: stelem [runtime]System.Int32 - IL_005d: ldloc.1 - IL_005e: ldc.i4.1 - IL_005f: sub - IL_0060: stloc.1 - IL_0061: ldloc.1 - IL_0062: ldloc.0 - IL_0063: ldc.i4.1 - IL_0064: sub - IL_0065: bne.un.s IL_003b - - IL_0067: nop - IL_0068: nop - IL_0069: call int32[] assembly::get_r() - IL_006e: ldc.i4.0 - IL_006f: ldelem [runtime]System.Int32 - IL_0074: ldc.i4.3 - IL_0075: bne.un.s IL_007b - - IL_0077: ldc.i4.0 - IL_0078: nop - IL_0079: br.s IL_007d - - IL_007b: ldc.i4.1 - IL_007c: nop - IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0082: pop - IL_0083: ret + IL_0015: dup + IL_0016: stsfld int32[] ''.$assembly::w@7 + IL_001b: stloc.1 + IL_001c: call int32[] assembly::get_r() + IL_0021: ldlen + IL_0022: conv.i4 + IL_0023: stloc.s V_4 + IL_0025: call int32[] assembly::get_w() + IL_002a: ldlen + IL_002b: conv.i4 + IL_002c: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: bge.s IL_0039 + + IL_0034: ldloc.s V_4 + IL_0036: nop + IL_0037: br.s IL_003c + + IL_0039: ldloc.s V_5 + IL_003b: nop + IL_003c: ldc.i4.1 + IL_003d: sub + IL_003e: stloc.3 + IL_003f: ldc.i4.0 + IL_0040: stloc.2 + IL_0041: ldloc.2 + IL_0042: ldloc.3 + IL_0043: bgt.s IL_0071 + + IL_0045: call int32[] assembly::get_r() + IL_004a: ldloc.3 + IL_004b: call int32[] assembly::get_r() + IL_0050: ldloc.3 + IL_0051: ldelem [runtime]System.Int32 + IL_0056: call int32[] assembly::get_w() + IL_005b: ldloc.3 + IL_005c: ldelem [runtime]System.Int32 + IL_0061: add + IL_0062: stelem [runtime]System.Int32 + IL_0067: ldloc.3 + IL_0068: ldc.i4.1 + IL_0069: sub + IL_006a: stloc.3 + IL_006b: ldloc.3 + IL_006c: ldloc.2 + IL_006d: ldc.i4.1 + IL_006e: sub + IL_006f: bne.un.s IL_0045 + + IL_0071: nop + IL_0072: nop + IL_0073: call int32[] assembly::get_r() + IL_0078: ldc.i4.0 + IL_0079: ldelem [runtime]System.Int32 + IL_007e: ldc.i4.3 + IL_007f: bne.un.s IL_0085 + + IL_0081: ldc.i4.0 + IL_0082: nop + IL_0083: br.s IL_0087 + + IL_0085: ldc.i4.1 + IL_0086: nop + IL_0087: stloc.s V_6 + IL_0089: ldloc.s V_6 + IL_008b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0090: pop + IL_0091: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl similarity index 93% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index f89292af139..860527ca19e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.opt.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -79,7 +69,10 @@ .maxstack 7 .locals init (int32 V_0, - int32 V_1) + int32 V_1, + int32 V_2, + int32 V_3, + int32 V_4) IL_0000: ldc.i4.8 IL_0001: ldc.i4.1 IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, @@ -93,20 +86,20 @@ IL_0018: call int32[] assembly::get_r() IL_001d: ldlen IL_001e: conv.i4 - IL_001f: stloc.0 + IL_001f: stloc.2 IL_0020: call int32[] assembly::get_w() IL_0025: ldlen IL_0026: conv.i4 - IL_0027: stloc.1 - IL_0028: ldloc.0 - IL_0029: ldloc.1 + IL_0027: stloc.3 + IL_0028: ldloc.2 + IL_0029: ldloc.3 IL_002a: bge.s IL_0030 - IL_002c: ldloc.0 + IL_002c: ldloc.2 IL_002d: nop IL_002e: br.s IL_0032 - IL_0030: ldloc.1 + IL_0030: ldloc.3 IL_0031: nop IL_0032: ldc.i4.1 IL_0033: sub @@ -151,9 +144,11 @@ IL_007b: ldc.i4.1 IL_007c: nop - IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0082: pop - IL_0083: ret + IL_007d: stloc.s V_4 + IL_007f: ldloc.s V_4 + IL_0081: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0086: pop + IL_0087: ret } .property int32[] r() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOff.il.bsl new file mode 100644 index 00000000000..1c526104b4f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -0,0 +1,226 @@ + + + + + +.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 public specialname static int32[] get_r() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] ''.$assembly::r@6 + IL_0005: ret + } + + .method public specialname static int32[] get_w() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] ''.$assembly::w@7 + IL_0005: ret + } + + .property int32[] r() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[] assembly::get_r() + } + .property int32[] w() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[] assembly::get_w() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32[] r@6 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32[] w@7 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 7 + .locals init (int32[] V_0, + int32[] V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3, + int32 V_4, + int32 V_5, + uint64 V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_7, + uint64 V_8, + int32 V_9, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_10, + int32 V_11, + int32 V_12) + IL_0000: ldc.i4.8 + IL_0001: ldc.i4.1 + IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0007: dup + IL_0008: stsfld int32[] ''.$assembly::r@6 + IL_000d: stloc.0 + IL_000e: ldc.i4.5 + IL_000f: ldc.i4.2 + IL_0010: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0015: dup + IL_0016: stsfld int32[] ''.$assembly::w@7 + IL_001b: stloc.1 + IL_001c: call int32[] assembly::get_r() + IL_0021: ldlen + IL_0022: conv.i4 + IL_0023: stloc.s V_4 + IL_0025: call int32[] assembly::get_w() + IL_002a: ldlen + IL_002b: conv.i4 + IL_002c: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: bge.s IL_0039 + + IL_0034: ldloc.s V_4 + IL_0036: nop + IL_0037: br.s IL_003c + + IL_0039: ldloc.s V_5 + IL_003b: nop + IL_003c: ldc.i4.1 + IL_003d: sub + IL_003e: stloc.3 + IL_003f: ldloc.3 + IL_0040: ldc.i4.0 + IL_0041: bge.s IL_0048 + + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: nop + IL_0046: br.s IL_0050 + + IL_0048: ldloc.3 + IL_0049: ldc.i4.0 + IL_004a: sub + IL_004b: conv.i8 + IL_004c: ldc.i4.1 + IL_004d: conv.i8 + IL_004e: add + IL_004f: nop + IL_0050: stloc.s V_6 + IL_0052: ldc.i4.0 + IL_0053: conv.i8 + IL_0054: stloc.s V_8 + IL_0056: ldc.i4.0 + IL_0057: stloc.s V_9 + IL_0059: br.s IL_0072 + + IL_005b: ldloca.s V_7 + IL_005d: ldloc.s V_9 + IL_005f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0064: nop + IL_0065: ldloc.s V_9 + IL_0067: ldc.i4.1 + IL_0068: add + IL_0069: stloc.s V_9 + IL_006b: ldloc.s V_8 + IL_006d: ldc.i4.1 + IL_006e: conv.i8 + IL_006f: add + IL_0070: stloc.s V_8 + IL_0072: ldloc.s V_8 + IL_0074: ldloc.s V_6 + IL_0076: blt.un.s IL_005b + + IL_0078: ldloca.s V_7 + IL_007a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_007f: stloc.2 + IL_0080: ldloc.2 + IL_0081: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0086: stloc.s V_10 + IL_0088: br.s IL_00c2 + + IL_008a: ldloc.2 + IL_008b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0090: stloc.s V_11 + IL_0092: call int32[] assembly::get_r() + IL_0097: ldloc.s V_11 + IL_0099: call int32[] assembly::get_r() + IL_009e: ldloc.s V_11 + IL_00a0: ldelem [runtime]System.Int32 + IL_00a5: call int32[] assembly::get_w() + IL_00aa: ldloc.s V_11 + IL_00ac: ldelem [runtime]System.Int32 + IL_00b1: add + IL_00b2: stelem [runtime]System.Int32 + IL_00b7: ldloc.s V_10 + IL_00b9: stloc.2 + IL_00ba: ldloc.2 + IL_00bb: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00c0: stloc.s V_10 + IL_00c2: ldloc.s V_10 + IL_00c4: brtrue.s IL_008a + + IL_00c6: nop + IL_00c7: nop + IL_00c8: call int32[] assembly::get_r() + IL_00cd: ldc.i4.0 + IL_00ce: ldelem [runtime]System.Int32 + IL_00d3: ldc.i4.3 + IL_00d4: bne.un.s IL_00da + + IL_00d6: ldc.i4.0 + IL_00d7: nop + IL_00d8: br.s IL_00dc + + IL_00da: ldc.i4.1 + IL_00db: nop + IL_00dc: stloc.s V_12 + IL_00de: ldloc.s V_12 + IL_00e0: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_00e5: pop + IL_00e6: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.opt.il.bsl deleted file mode 100644 index 618ba09189f..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.opt.il.bsl +++ /dev/null @@ -1,304 +0,0 @@ - - - - - -.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 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.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 public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::w@7 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0005: ret - } - - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0006: ret - } - - .method assembly specialname static int32 get_e1@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::e1@1 - IL_0005: ret - } - - .method assembly specialname static int32 get_e2@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::e2@1 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_next@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_0005: ret - } - - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_0006: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - current@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - } - .property int32 e1@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e1@1() - } - .property int32 e2@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e2@1() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - next@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 current@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e1@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e2@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .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 7 - .locals init (int32 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - int32 V_4) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stsfld int32 ''.$assembly::e1@1 - IL_0024: call int32[] assembly::get_w() - IL_0029: ldlen - IL_002a: conv.i4 - IL_002b: stsfld int32 ''.$assembly::e2@1 - IL_0030: call int32 assembly::get_e1@1() - IL_0035: call int32 assembly::get_e2@1() - IL_003a: bge.s IL_0044 - - IL_003c: call int32 assembly::get_e1@1() - IL_0041: nop - IL_0042: br.s IL_004a - - IL_0044: call int32 assembly::get_e2@1() - IL_0049: nop - IL_004a: ldc.i4.1 - IL_004b: sub - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: ldc.i4.0 - IL_004f: bge.s IL_0056 - - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: nop - IL_0054: br.s IL_005e - - IL_0056: ldloc.0 - IL_0057: ldc.i4.0 - IL_0058: sub - IL_0059: conv.i8 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: nop - IL_005e: stloc.1 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: stloc.3 - IL_0062: ldc.i4.0 - IL_0063: stloc.s V_4 - IL_0065: br.s IL_007c - - IL_0067: ldloca.s V_2 - IL_0069: ldloc.s V_4 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_4 - IL_0073: ldc.i4.1 - IL_0074: add - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: ldloc.1 - IL_007e: blt.un.s IL_0067 - - IL_0080: ldloca.s V_2 - IL_0082: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0087: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_009b: br.s IL_00e3 - - IL_009d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00a2: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00a7: stloc.0 - IL_00a8: call int32[] assembly::get_r() - IL_00ad: ldloc.0 - IL_00ae: call int32[] assembly::get_r() - IL_00b3: ldloc.0 - IL_00b4: ldelem [runtime]System.Int32 - IL_00b9: call int32[] assembly::get_w() - IL_00be: ldloc.0 - IL_00bf: ldelem [runtime]System.Int32 - IL_00c4: add - IL_00c5: stelem [runtime]System.Int32 - IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00cf: call void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00d9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00de: call void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00e8: brtrue.s IL_009d - - IL_00ea: nop - IL_00eb: nop - IL_00ec: call int32[] assembly::get_r() - IL_00f1: ldc.i4.0 - IL_00f2: ldelem [runtime]System.Int32 - IL_00f7: ldc.i4.3 - IL_00f8: bne.un.s IL_00fe - - IL_00fa: ldc.i4.0 - IL_00fb: nop - IL_00fc: br.s IL_0100 - - IL_00fe: ldc.i4.1 - IL_00ff: nop - IL_0100: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0105: pop - IL_0106: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOff.il.bsl new file mode 100644 index 00000000000..c8c389a198a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -0,0 +1,239 @@ + + + + + +.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 ) + .field static assembly int32[] r@6 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32[] w@7 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static int32[] get_r() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] assembly::r@6 + IL_0005: ret + } + + .method public specialname static int32[] get_w() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] assembly::w@7 + 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 specialname static void staticInitialization@() cil managed + { + + .maxstack 7 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + int32 V_1, + int32 V_2, + int32 V_3, + uint64 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_5, + uint64 V_6, + int32 V_7, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_8, + int32 V_9, + int32 V_10) + IL_0000: ldc.i4.8 + IL_0001: ldc.i4.1 + IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0007: stsfld int32[] assembly::r@6 + IL_000c: ldc.i4.5 + IL_000d: ldc.i4.2 + IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0013: stsfld int32[] assembly::w@7 + IL_0018: call int32[] assembly::get_r() + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: stloc.2 + IL_0020: call int32[] assembly::get_w() + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: stloc.3 + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: bge.s IL_0030 + + IL_002c: ldloc.2 + IL_002d: nop + IL_002e: br.s IL_0032 + + IL_0030: ldloc.3 + IL_0031: nop + IL_0032: ldc.i4.1 + IL_0033: sub + IL_0034: stloc.1 + IL_0035: ldloc.1 + IL_0036: ldc.i4.0 + IL_0037: bge.s IL_003e + + IL_0039: ldc.i4.0 + IL_003a: conv.i8 + IL_003b: nop + IL_003c: br.s IL_0046 + + IL_003e: ldloc.1 + IL_003f: ldc.i4.0 + IL_0040: sub + IL_0041: conv.i8 + IL_0042: ldc.i4.1 + IL_0043: conv.i8 + IL_0044: add + IL_0045: nop + IL_0046: stloc.s V_4 + IL_0048: ldc.i4.0 + IL_0049: conv.i8 + IL_004a: stloc.s V_6 + IL_004c: ldc.i4.0 + IL_004d: stloc.s V_7 + IL_004f: br.s IL_0068 + + IL_0051: ldloca.s V_5 + IL_0053: ldloc.s V_7 + IL_0055: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_005a: nop + IL_005b: ldloc.s V_7 + IL_005d: ldc.i4.1 + IL_005e: add + IL_005f: stloc.s V_7 + IL_0061: ldloc.s V_6 + IL_0063: ldc.i4.1 + IL_0064: conv.i8 + IL_0065: add + IL_0066: stloc.s V_6 + IL_0068: ldloc.s V_6 + IL_006a: ldloc.s V_4 + IL_006c: blt.un.s IL_0051 + + IL_006e: ldloca.s V_5 + IL_0070: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0075: stloc.0 + IL_0076: ldloc.0 + IL_0077: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_007c: stloc.s V_8 + IL_007e: br.s IL_00b8 + + IL_0080: ldloc.0 + IL_0081: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0086: stloc.s V_9 + IL_0088: call int32[] assembly::get_r() + IL_008d: ldloc.s V_9 + IL_008f: call int32[] assembly::get_r() + IL_0094: ldloc.s V_9 + IL_0096: ldelem [runtime]System.Int32 + IL_009b: call int32[] assembly::get_w() + IL_00a0: ldloc.s V_9 + IL_00a2: ldelem [runtime]System.Int32 + IL_00a7: add + IL_00a8: stelem [runtime]System.Int32 + IL_00ad: ldloc.s V_8 + IL_00af: stloc.0 + IL_00b0: ldloc.0 + IL_00b1: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00b6: stloc.s V_8 + IL_00b8: ldloc.s V_8 + IL_00ba: brtrue.s IL_0080 + + IL_00bc: nop + IL_00bd: nop + IL_00be: call int32[] assembly::get_r() + IL_00c3: ldc.i4.0 + IL_00c4: ldelem [runtime]System.Int32 + IL_00c9: ldc.i4.3 + IL_00ca: bne.un.s IL_00d0 + + IL_00cc: ldc.i4.0 + IL_00cd: nop + IL_00ce: br.s IL_00d2 + + IL_00d0: ldc.i4.1 + IL_00d1: nop + IL_00d2: stloc.s V_10 + IL_00d4: ldloc.s V_10 + IL_00d6: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_00db: pop + IL_00dc: ret + } + + .property int32[] r() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[] assembly::get_r() + } + .property int32[] w() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[] assembly::get_w() + } +} + +.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/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.opt.il.bsl deleted file mode 100644 index 7838a9c7d69..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.opt.il.bsl +++ /dev/null @@ -1,323 +0,0 @@ - - - - - -.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 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.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 ) - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 current@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e1@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e2@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0005: ret - } - - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0006: ret - } - - .method assembly specialname static int32 get_e1@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::e1@1 - IL_0005: ret - } - - .method assembly specialname static int32 get_e2@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::e2@1 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_next@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_0005: ret - } - - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_0006: 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 specialname static void staticInitialization@() cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - int32 V_4) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stsfld int32 assembly::e1@1 - IL_0024: call int32[] assembly::get_w() - IL_0029: ldlen - IL_002a: conv.i4 - IL_002b: stsfld int32 assembly::e2@1 - IL_0030: call int32 assembly::get_e1@1() - IL_0035: call int32 assembly::get_e2@1() - IL_003a: bge.s IL_0044 - - IL_003c: call int32 assembly::get_e1@1() - IL_0041: nop - IL_0042: br.s IL_004a - - IL_0044: call int32 assembly::get_e2@1() - IL_0049: nop - IL_004a: ldc.i4.1 - IL_004b: sub - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: ldc.i4.0 - IL_004f: bge.s IL_0056 - - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: nop - IL_0054: br.s IL_005e - - IL_0056: ldloc.0 - IL_0057: ldc.i4.0 - IL_0058: sub - IL_0059: conv.i8 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: nop - IL_005e: stloc.1 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: stloc.3 - IL_0062: ldc.i4.0 - IL_0063: stloc.s V_4 - IL_0065: br.s IL_007c - - IL_0067: ldloca.s V_2 - IL_0069: ldloc.s V_4 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_4 - IL_0073: ldc.i4.1 - IL_0074: add - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: ldloc.1 - IL_007e: blt.un.s IL_0067 - - IL_0080: ldloca.s V_2 - IL_0082: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0087: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_009b: br.s IL_00e3 - - IL_009d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00a2: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00a7: stloc.0 - IL_00a8: call int32[] assembly::get_r() - IL_00ad: ldloc.0 - IL_00ae: call int32[] assembly::get_r() - IL_00b3: ldloc.0 - IL_00b4: ldelem [runtime]System.Int32 - IL_00b9: call int32[] assembly::get_w() - IL_00be: ldloc.0 - IL_00bf: ldelem [runtime]System.Int32 - IL_00c4: add - IL_00c5: stelem [runtime]System.Int32 - IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00cf: call void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00d9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00de: call void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00e8: brtrue.s IL_009d - - IL_00ea: nop - IL_00eb: nop - IL_00ec: call int32[] assembly::get_r() - IL_00f1: ldc.i4.0 - IL_00f2: ldelem [runtime]System.Int32 - IL_00f7: ldc.i4.3 - IL_00f8: bne.un.s IL_00fe - - IL_00fa: ldc.i4.0 - IL_00fb: nop - IL_00fc: br.s IL_0100 - - IL_00fe: ldc.i4.1 - IL_00ff: nop - IL_0100: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0105: pop - IL_0106: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - current@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - } - .property int32 e1@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e1@1() - } - .property int32 e2@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e2@1() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - next@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - } -} - -.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/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOff.il.bsl new file mode 100644 index 00000000000..926e5db3845 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -0,0 +1,226 @@ + + + + + +.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 public specialname static int32[] get_r() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] ''.$assembly::r@6 + IL_0005: ret + } + + .method public specialname static int32[] get_w() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] ''.$assembly::w@7 + IL_0005: ret + } + + .property int32[] r() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[] assembly::get_r() + } + .property int32[] w() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[] assembly::get_w() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32[] r@6 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32[] w@7 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .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 7 + .locals init (int32[] V_0, + int32[] V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3, + int32 V_4, + int32 V_5, + uint64 V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_7, + uint64 V_8, + int32 V_9, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_10, + int32 V_11, + int32 V_12) + IL_0000: ldc.i4.8 + IL_0001: ldc.i4.1 + IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0007: dup + IL_0008: stsfld int32[] ''.$assembly::r@6 + IL_000d: stloc.0 + IL_000e: ldc.i4.5 + IL_000f: ldc.i4.2 + IL_0010: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0015: dup + IL_0016: stsfld int32[] ''.$assembly::w@7 + IL_001b: stloc.1 + IL_001c: call int32[] assembly::get_r() + IL_0021: ldlen + IL_0022: conv.i4 + IL_0023: stloc.s V_4 + IL_0025: call int32[] assembly::get_w() + IL_002a: ldlen + IL_002b: conv.i4 + IL_002c: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: bge.s IL_0039 + + IL_0034: ldloc.s V_4 + IL_0036: nop + IL_0037: br.s IL_003c + + IL_0039: ldloc.s V_5 + IL_003b: nop + IL_003c: ldc.i4.1 + IL_003d: sub + IL_003e: stloc.3 + IL_003f: ldloc.3 + IL_0040: ldc.i4.0 + IL_0041: bge.s IL_0048 + + IL_0043: ldc.i4.0 + IL_0044: conv.i8 + IL_0045: nop + IL_0046: br.s IL_0050 + + IL_0048: ldloc.3 + IL_0049: ldc.i4.0 + IL_004a: sub + IL_004b: conv.i8 + IL_004c: ldc.i4.1 + IL_004d: conv.i8 + IL_004e: add + IL_004f: nop + IL_0050: stloc.s V_6 + IL_0052: ldc.i4.0 + IL_0053: conv.i8 + IL_0054: stloc.s V_8 + IL_0056: ldloc.3 + IL_0057: stloc.s V_9 + IL_0059: br.s IL_0072 + + IL_005b: ldloca.s V_7 + IL_005d: ldloc.s V_9 + IL_005f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0064: nop + IL_0065: ldloc.s V_9 + IL_0067: ldc.i4.m1 + IL_0068: add + IL_0069: stloc.s V_9 + IL_006b: ldloc.s V_8 + IL_006d: ldc.i4.1 + IL_006e: conv.i8 + IL_006f: add + IL_0070: stloc.s V_8 + IL_0072: ldloc.s V_8 + IL_0074: ldloc.s V_6 + IL_0076: blt.un.s IL_005b + + IL_0078: ldloca.s V_7 + IL_007a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_007f: stloc.2 + IL_0080: ldloc.2 + IL_0081: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0086: stloc.s V_10 + IL_0088: br.s IL_00c2 + + IL_008a: ldloc.2 + IL_008b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0090: stloc.s V_11 + IL_0092: call int32[] assembly::get_r() + IL_0097: ldloc.s V_11 + IL_0099: call int32[] assembly::get_r() + IL_009e: ldloc.s V_11 + IL_00a0: ldelem [runtime]System.Int32 + IL_00a5: call int32[] assembly::get_w() + IL_00aa: ldloc.s V_11 + IL_00ac: ldelem [runtime]System.Int32 + IL_00b1: add + IL_00b2: stelem [runtime]System.Int32 + IL_00b7: ldloc.s V_10 + IL_00b9: stloc.2 + IL_00ba: ldloc.2 + IL_00bb: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00c0: stloc.s V_10 + IL_00c2: ldloc.s V_10 + IL_00c4: brtrue.s IL_008a + + IL_00c6: nop + IL_00c7: nop + IL_00c8: call int32[] assembly::get_r() + IL_00cd: ldc.i4.0 + IL_00ce: ldelem [runtime]System.Int32 + IL_00d3: ldc.i4.3 + IL_00d4: bne.un.s IL_00da + + IL_00d6: ldc.i4.0 + IL_00d7: nop + IL_00d8: br.s IL_00dc + + IL_00da: ldc.i4.1 + IL_00db: nop + IL_00dc: stloc.s V_12 + IL_00de: ldloc.s V_12 + IL_00e0: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_00e5: pop + IL_00e6: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.opt.il.bsl deleted file mode 100644 index cdb60cf3f61..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.opt.il.bsl +++ /dev/null @@ -1,304 +0,0 @@ - - - - - -.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 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.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 public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::w@7 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0005: ret - } - - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0006: ret - } - - .method assembly specialname static int32 get_e1@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::e1@1 - IL_0005: ret - } - - .method assembly specialname static int32 get_e2@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::e2@1 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_next@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_0005: ret - } - - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_0006: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - current@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - } - .property int32 e1@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e1@1() - } - .property int32 e2@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e2@1() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - next@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 current@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e1@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e2@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .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 7 - .locals init (int32 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - int32 V_4) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stsfld int32 ''.$assembly::e1@1 - IL_0024: call int32[] assembly::get_w() - IL_0029: ldlen - IL_002a: conv.i4 - IL_002b: stsfld int32 ''.$assembly::e2@1 - IL_0030: call int32 assembly::get_e1@1() - IL_0035: call int32 assembly::get_e2@1() - IL_003a: bge.s IL_0044 - - IL_003c: call int32 assembly::get_e1@1() - IL_0041: nop - IL_0042: br.s IL_004a - - IL_0044: call int32 assembly::get_e2@1() - IL_0049: nop - IL_004a: ldc.i4.1 - IL_004b: sub - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: ldc.i4.0 - IL_004f: bge.s IL_0056 - - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: nop - IL_0054: br.s IL_005e - - IL_0056: ldloc.0 - IL_0057: ldc.i4.0 - IL_0058: sub - IL_0059: conv.i8 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: nop - IL_005e: stloc.1 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: stloc.3 - IL_0062: ldloc.0 - IL_0063: stloc.s V_4 - IL_0065: br.s IL_007c - - IL_0067: ldloca.s V_2 - IL_0069: ldloc.s V_4 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_4 - IL_0073: ldc.i4.m1 - IL_0074: add - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: ldloc.1 - IL_007e: blt.un.s IL_0067 - - IL_0080: ldloca.s V_2 - IL_0082: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0087: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_009b: br.s IL_00e3 - - IL_009d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00a2: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00a7: stloc.0 - IL_00a8: call int32[] assembly::get_r() - IL_00ad: ldloc.0 - IL_00ae: call int32[] assembly::get_r() - IL_00b3: ldloc.0 - IL_00b4: ldelem [runtime]System.Int32 - IL_00b9: call int32[] assembly::get_w() - IL_00be: ldloc.0 - IL_00bf: ldelem [runtime]System.Int32 - IL_00c4: add - IL_00c5: stelem [runtime]System.Int32 - IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00cf: call void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00d9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00de: call void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00e8: brtrue.s IL_009d - - IL_00ea: nop - IL_00eb: nop - IL_00ec: call int32[] assembly::get_r() - IL_00f1: ldc.i4.0 - IL_00f2: ldelem [runtime]System.Int32 - IL_00f7: ldc.i4.3 - IL_00f8: bne.un.s IL_00fe - - IL_00fa: ldc.i4.0 - IL_00fb: nop - IL_00fc: br.s IL_0100 - - IL_00fe: ldc.i4.1 - IL_00ff: nop - IL_0100: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0105: pop - IL_0106: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOff.il.bsl new file mode 100644 index 00000000000..dc19fd30e6e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -0,0 +1,239 @@ + + + + + +.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 ) + .field static assembly int32[] r@6 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32[] w@7 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static int32[] get_r() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] assembly::r@6 + IL_0005: ret + } + + .method public specialname static int32[] get_w() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32[] assembly::w@7 + 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 specialname static void staticInitialization@() cil managed + { + + .maxstack 7 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + int32 V_1, + int32 V_2, + int32 V_3, + uint64 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_5, + uint64 V_6, + int32 V_7, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_8, + int32 V_9, + int32 V_10) + IL_0000: ldc.i4.8 + IL_0001: ldc.i4.1 + IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0007: stsfld int32[] assembly::r@6 + IL_000c: ldc.i4.5 + IL_000d: ldc.i4.2 + IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + !!0) + IL_0013: stsfld int32[] assembly::w@7 + IL_0018: call int32[] assembly::get_r() + IL_001d: ldlen + IL_001e: conv.i4 + IL_001f: stloc.2 + IL_0020: call int32[] assembly::get_w() + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: stloc.3 + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: bge.s IL_0030 + + IL_002c: ldloc.2 + IL_002d: nop + IL_002e: br.s IL_0032 + + IL_0030: ldloc.3 + IL_0031: nop + IL_0032: ldc.i4.1 + IL_0033: sub + IL_0034: stloc.1 + IL_0035: ldloc.1 + IL_0036: ldc.i4.0 + IL_0037: bge.s IL_003e + + IL_0039: ldc.i4.0 + IL_003a: conv.i8 + IL_003b: nop + IL_003c: br.s IL_0046 + + IL_003e: ldloc.1 + IL_003f: ldc.i4.0 + IL_0040: sub + IL_0041: conv.i8 + IL_0042: ldc.i4.1 + IL_0043: conv.i8 + IL_0044: add + IL_0045: nop + IL_0046: stloc.s V_4 + IL_0048: ldc.i4.0 + IL_0049: conv.i8 + IL_004a: stloc.s V_6 + IL_004c: ldloc.1 + IL_004d: stloc.s V_7 + IL_004f: br.s IL_0068 + + IL_0051: ldloca.s V_5 + IL_0053: ldloc.s V_7 + IL_0055: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_005a: nop + IL_005b: ldloc.s V_7 + IL_005d: ldc.i4.m1 + IL_005e: add + IL_005f: stloc.s V_7 + IL_0061: ldloc.s V_6 + IL_0063: ldc.i4.1 + IL_0064: conv.i8 + IL_0065: add + IL_0066: stloc.s V_6 + IL_0068: ldloc.s V_6 + IL_006a: ldloc.s V_4 + IL_006c: blt.un.s IL_0051 + + IL_006e: ldloca.s V_5 + IL_0070: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0075: stloc.0 + IL_0076: ldloc.0 + IL_0077: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_007c: stloc.s V_8 + IL_007e: br.s IL_00b8 + + IL_0080: ldloc.0 + IL_0081: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0086: stloc.s V_9 + IL_0088: call int32[] assembly::get_r() + IL_008d: ldloc.s V_9 + IL_008f: call int32[] assembly::get_r() + IL_0094: ldloc.s V_9 + IL_0096: ldelem [runtime]System.Int32 + IL_009b: call int32[] assembly::get_w() + IL_00a0: ldloc.s V_9 + IL_00a2: ldelem [runtime]System.Int32 + IL_00a7: add + IL_00a8: stelem [runtime]System.Int32 + IL_00ad: ldloc.s V_8 + IL_00af: stloc.0 + IL_00b0: ldloc.0 + IL_00b1: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00b6: stloc.s V_8 + IL_00b8: ldloc.s V_8 + IL_00ba: brtrue.s IL_0080 + + IL_00bc: nop + IL_00bd: nop + IL_00be: call int32[] assembly::get_r() + IL_00c3: ldc.i4.0 + IL_00c4: ldelem [runtime]System.Int32 + IL_00c9: ldc.i4.3 + IL_00ca: bne.un.s IL_00d0 + + IL_00cc: ldc.i4.0 + IL_00cd: nop + IL_00ce: br.s IL_00d2 + + IL_00d0: ldc.i4.1 + IL_00d1: nop + IL_00d2: stloc.s V_10 + IL_00d4: ldloc.s V_10 + IL_00d6: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_00db: pop + IL_00dc: ret + } + + .property int32[] r() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[] assembly::get_r() + } + .property int32[] w() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32[] assembly::get_w() + } +} + +.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/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.opt.il.bsl deleted file mode 100644 index 33caf0bc8ca..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.opt.il.bsl +++ /dev/null @@ -1,323 +0,0 @@ - - - - - -.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 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.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 ) - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 current@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e1@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e2@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0005: ret - } - - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0006: ret - } - - .method assembly specialname static int32 get_e1@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::e1@1 - IL_0005: ret - } - - .method assembly specialname static int32 get_e2@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::e2@1 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_next@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_0005: ret - } - - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_0006: 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 specialname static void staticInitialization@() cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - int32 V_4) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stsfld int32 assembly::e1@1 - IL_0024: call int32[] assembly::get_w() - IL_0029: ldlen - IL_002a: conv.i4 - IL_002b: stsfld int32 assembly::e2@1 - IL_0030: call int32 assembly::get_e1@1() - IL_0035: call int32 assembly::get_e2@1() - IL_003a: bge.s IL_0044 - - IL_003c: call int32 assembly::get_e1@1() - IL_0041: nop - IL_0042: br.s IL_004a - - IL_0044: call int32 assembly::get_e2@1() - IL_0049: nop - IL_004a: ldc.i4.1 - IL_004b: sub - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: ldc.i4.0 - IL_004f: bge.s IL_0056 - - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: nop - IL_0054: br.s IL_005e - - IL_0056: ldloc.0 - IL_0057: ldc.i4.0 - IL_0058: sub - IL_0059: conv.i8 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: nop - IL_005e: stloc.1 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: stloc.3 - IL_0062: ldloc.0 - IL_0063: stloc.s V_4 - IL_0065: br.s IL_007c - - IL_0067: ldloca.s V_2 - IL_0069: ldloc.s V_4 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_4 - IL_0073: ldc.i4.m1 - IL_0074: add - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: ldloc.1 - IL_007e: blt.un.s IL_0067 - - IL_0080: ldloca.s V_2 - IL_0082: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0087: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_009b: br.s IL_00e3 - - IL_009d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00a2: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00a7: stloc.0 - IL_00a8: call int32[] assembly::get_r() - IL_00ad: ldloc.0 - IL_00ae: call int32[] assembly::get_r() - IL_00b3: ldloc.0 - IL_00b4: ldelem [runtime]System.Int32 - IL_00b9: call int32[] assembly::get_w() - IL_00be: ldloc.0 - IL_00bf: ldelem [runtime]System.Int32 - IL_00c4: add - IL_00c5: stelem [runtime]System.Int32 - IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00cf: call void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00d9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00de: call void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00e8: brtrue.s IL_009d - - IL_00ea: nop - IL_00eb: nop - IL_00ec: call int32[] assembly::get_r() - IL_00f1: ldc.i4.0 - IL_00f2: ldelem [runtime]System.Int32 - IL_00f7: ldc.i4.3 - IL_00f8: bne.un.s IL_00fe - - IL_00fa: ldc.i4.0 - IL_00fb: nop - IL_00fc: br.s IL_0100 - - IL_00fe: ldc.i4.1 - IL_00ff: nop - IL_0100: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0105: pop - IL_0106: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - current@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - } - .property int32 e1@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e1@1() - } - .property int32 e2@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e2@1() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - next@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - } -} - -.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/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOff.il.bsl similarity index 52% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 5aca7747bda..a693bbf47b8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.opt.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -87,123 +77,134 @@ .entrypoint .maxstack 7 - .locals init (int32 V_0, - int32 V_1, + .locals init (int32[] V_0, + int32[] V_1, int32 V_2, int32 V_3, int32 V_4, - int32 V_5) + int32 V_5, + int32 V_6, + int32 V_7, + int32 V_8, + int32 V_9, + int32 V_10) IL_0000: ldc.i4.8 IL_0001: ldc.i4.1 IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + IL_0007: dup + IL_0008: stsfld int32[] ''.$assembly::r@6 + IL_000d: stloc.0 + IL_000e: ldc.i4.5 + IL_000f: ldc.i4.2 + IL_0010: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: ldc.i4.0 - IL_0019: stloc.1 - IL_001a: call int32[] assembly::get_r() - IL_001f: ldlen - IL_0020: conv.i4 - IL_0021: stloc.2 - IL_0022: call int32[] assembly::get_w() - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: stloc.3 - IL_002a: ldloc.2 - IL_002b: ldloc.3 - IL_002c: bge.s IL_0032 - - IL_002e: ldloc.2 - IL_002f: nop - IL_0030: br.s IL_0034 - - IL_0032: ldloc.3 - IL_0033: nop - IL_0034: ldc.i4.1 - IL_0035: sub - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldloc.1 - IL_0039: blt.s IL_009a - - IL_003b: ldc.i4.0 - IL_003c: stloc.3 - IL_003d: call int32[] assembly::get_r() - IL_0042: ldlen - IL_0043: conv.i4 - IL_0044: stloc.s V_4 - IL_0046: call int32[] assembly::get_w() - IL_004b: ldlen - IL_004c: conv.i4 - IL_004d: stloc.s V_5 - IL_004f: ldloc.s V_4 - IL_0051: ldloc.s V_5 - IL_0053: bge.s IL_005a - - IL_0055: ldloc.s V_4 - IL_0057: nop - IL_0058: br.s IL_005d - - IL_005a: ldloc.s V_5 - IL_005c: nop - IL_005d: ldc.i4.1 - IL_005e: sub - IL_005f: stloc.2 - IL_0060: ldloc.2 - IL_0061: ldloc.3 - IL_0062: blt.s IL_0090 - - IL_0064: call int32[] assembly::get_r() - IL_0069: ldloc.3 - IL_006a: call int32[] assembly::get_r() - IL_006f: ldloc.3 - IL_0070: ldelem [runtime]System.Int32 - IL_0075: call int32[] assembly::get_w() - IL_007a: ldloc.3 - IL_007b: ldelem [runtime]System.Int32 - IL_0080: add - IL_0081: stelem [runtime]System.Int32 - IL_0086: ldloc.3 - IL_0087: ldc.i4.1 - IL_0088: add - IL_0089: stloc.3 - IL_008a: ldloc.3 - IL_008b: ldloc.2 - IL_008c: ldc.i4.1 - IL_008d: add - IL_008e: bne.un.s IL_0064 - - IL_0090: ldloc.1 - IL_0091: ldc.i4.1 - IL_0092: add - IL_0093: stloc.1 - IL_0094: ldloc.1 - IL_0095: ldloc.0 - IL_0096: ldc.i4.1 - IL_0097: add - IL_0098: bne.un.s IL_003b - - IL_009a: nop - IL_009b: nop - IL_009c: call int32[] assembly::get_r() - IL_00a1: ldc.i4.0 - IL_00a2: ldelem [runtime]System.Int32 - IL_00a7: ldc.i4.s 11 - IL_00a9: bne.un.s IL_00af - - IL_00ab: ldc.i4.0 - IL_00ac: nop - IL_00ad: br.s IL_00b1 - - IL_00af: ldc.i4.1 + IL_0015: dup + IL_0016: stsfld int32[] ''.$assembly::w@7 + IL_001b: stloc.1 + IL_001c: ldc.i4.0 + IL_001d: stloc.3 + IL_001e: call int32[] assembly::get_r() + IL_0023: ldlen + IL_0024: conv.i4 + IL_0025: stloc.s V_4 + IL_0027: call int32[] assembly::get_w() + IL_002c: ldlen + IL_002d: conv.i4 + IL_002e: stloc.s V_5 + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: bge.s IL_003b + + IL_0036: ldloc.s V_4 + IL_0038: nop + IL_0039: br.s IL_003e + + IL_003b: ldloc.s V_5 + IL_003d: nop + IL_003e: ldc.i4.1 + IL_003f: sub + IL_0040: stloc.2 + IL_0041: ldloc.2 + IL_0042: ldloc.3 + IL_0043: blt.s IL_00af + + IL_0045: ldc.i4.0 + IL_0046: stloc.s V_7 + IL_0048: call int32[] assembly::get_r() + IL_004d: ldlen + IL_004e: conv.i4 + IL_004f: stloc.s V_8 + IL_0051: call int32[] assembly::get_w() + IL_0056: ldlen + IL_0057: conv.i4 + IL_0058: stloc.s V_9 + IL_005a: ldloc.s V_8 + IL_005c: ldloc.s V_9 + IL_005e: bge.s IL_0065 + + IL_0060: ldloc.s V_8 + IL_0062: nop + IL_0063: br.s IL_0068 + + IL_0065: ldloc.s V_9 + IL_0067: nop + IL_0068: ldc.i4.1 + IL_0069: sub + IL_006a: stloc.s V_6 + IL_006c: ldloc.s V_6 + IL_006e: ldloc.s V_7 + IL_0070: blt.s IL_00a5 + + IL_0072: call int32[] assembly::get_r() + IL_0077: ldloc.s V_7 + IL_0079: call int32[] assembly::get_r() + IL_007e: ldloc.s V_7 + IL_0080: ldelem [runtime]System.Int32 + IL_0085: call int32[] assembly::get_w() + IL_008a: ldloc.s V_7 + IL_008c: ldelem [runtime]System.Int32 + IL_0091: add + IL_0092: stelem [runtime]System.Int32 + IL_0097: ldloc.s V_7 + IL_0099: ldc.i4.1 + IL_009a: add + IL_009b: stloc.s V_7 + IL_009d: ldloc.s V_7 + IL_009f: ldloc.s V_6 + IL_00a1: ldc.i4.1 + IL_00a2: add + IL_00a3: bne.un.s IL_0072 + + IL_00a5: ldloc.3 + IL_00a6: ldc.i4.1 + IL_00a7: add + IL_00a8: stloc.3 + IL_00a9: ldloc.3 + IL_00aa: ldloc.2 + IL_00ab: ldc.i4.1 + IL_00ac: add + IL_00ad: bne.un.s IL_0045 + + IL_00af: nop IL_00b0: nop - IL_00b1: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_00b6: pop - IL_00b7: ret + IL_00b1: call int32[] assembly::get_r() + IL_00b6: ldc.i4.0 + IL_00b7: ldelem [runtime]System.Int32 + IL_00bc: ldc.i4.s 11 + IL_00be: bne.un.s IL_00c4 + + IL_00c0: ldc.i4.0 + IL_00c1: nop + IL_00c2: br.s IL_00c6 + + IL_00c4: ldc.i4.1 + IL_00c5: nop + IL_00c6: stloc.s V_10 + IL_00c8: ldloc.s V_10 + IL_00ca: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_00cf: pop + IL_00d0: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOff.il.bsl similarity index 69% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index edd7456baca..a8c564901d3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.opt.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -83,7 +73,10 @@ int32 V_2, int32 V_3, int32 V_4, - int32 V_5) + int32 V_5, + int32 V_6, + int32 V_7, + int32 V_8) IL_0000: ldc.i4.8 IL_0001: ldc.i4.1 IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, @@ -119,82 +112,84 @@ IL_0036: stloc.0 IL_0037: ldloc.0 IL_0038: ldloc.1 - IL_0039: blt.s IL_009a + IL_0039: blt.s IL_00a5 IL_003b: ldc.i4.0 - IL_003c: stloc.3 - IL_003d: call int32[] assembly::get_r() - IL_0042: ldlen - IL_0043: conv.i4 - IL_0044: stloc.s V_4 - IL_0046: call int32[] assembly::get_w() - IL_004b: ldlen - IL_004c: conv.i4 - IL_004d: stloc.s V_5 - IL_004f: ldloc.s V_4 - IL_0051: ldloc.s V_5 - IL_0053: bge.s IL_005a - - IL_0055: ldloc.s V_4 - IL_0057: nop - IL_0058: br.s IL_005d - - IL_005a: ldloc.s V_5 - IL_005c: nop - IL_005d: ldc.i4.1 - IL_005e: sub - IL_005f: stloc.2 - IL_0060: ldloc.2 - IL_0061: ldloc.3 - IL_0062: blt.s IL_0090 - - IL_0064: call int32[] assembly::get_r() - IL_0069: ldloc.3 - IL_006a: call int32[] assembly::get_r() - IL_006f: ldloc.3 - IL_0070: ldelem [runtime]System.Int32 - IL_0075: call int32[] assembly::get_w() - IL_007a: ldloc.3 - IL_007b: ldelem [runtime]System.Int32 - IL_0080: add - IL_0081: stelem [runtime]System.Int32 - IL_0086: ldloc.3 - IL_0087: ldc.i4.1 - IL_0088: add - IL_0089: stloc.3 - IL_008a: ldloc.3 - IL_008b: ldloc.2 - IL_008c: ldc.i4.1 - IL_008d: add - IL_008e: bne.un.s IL_0064 - - IL_0090: ldloc.1 - IL_0091: ldc.i4.1 - IL_0092: add - IL_0093: stloc.1 - IL_0094: ldloc.1 - IL_0095: ldloc.0 - IL_0096: ldc.i4.1 - IL_0097: add - IL_0098: bne.un.s IL_003b - - IL_009a: nop - IL_009b: nop - IL_009c: call int32[] assembly::get_r() - IL_00a1: ldc.i4.0 - IL_00a2: ldelem [runtime]System.Int32 - IL_00a7: ldc.i4.s 11 - IL_00a9: bne.un.s IL_00af - - IL_00ab: ldc.i4.0 - IL_00ac: nop - IL_00ad: br.s IL_00b1 - - IL_00af: ldc.i4.1 - IL_00b0: nop - IL_00b1: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_00b6: pop - IL_00b7: ret + IL_003c: stloc.s V_5 + IL_003e: call int32[] assembly::get_r() + IL_0043: ldlen + IL_0044: conv.i4 + IL_0045: stloc.s V_6 + IL_0047: call int32[] assembly::get_w() + IL_004c: ldlen + IL_004d: conv.i4 + IL_004e: stloc.s V_7 + IL_0050: ldloc.s V_6 + IL_0052: ldloc.s V_7 + IL_0054: bge.s IL_005b + + IL_0056: ldloc.s V_6 + IL_0058: nop + IL_0059: br.s IL_005e + + IL_005b: ldloc.s V_7 + IL_005d: nop + IL_005e: ldc.i4.1 + IL_005f: sub + IL_0060: stloc.s V_4 + IL_0062: ldloc.s V_4 + IL_0064: ldloc.s V_5 + IL_0066: blt.s IL_009b + + IL_0068: call int32[] assembly::get_r() + IL_006d: ldloc.s V_5 + IL_006f: call int32[] assembly::get_r() + IL_0074: ldloc.s V_5 + IL_0076: ldelem [runtime]System.Int32 + IL_007b: call int32[] assembly::get_w() + IL_0080: ldloc.s V_5 + IL_0082: ldelem [runtime]System.Int32 + IL_0087: add + IL_0088: stelem [runtime]System.Int32 + IL_008d: ldloc.s V_5 + IL_008f: ldc.i4.1 + IL_0090: add + IL_0091: stloc.s V_5 + IL_0093: ldloc.s V_5 + IL_0095: ldloc.s V_4 + IL_0097: ldc.i4.1 + IL_0098: add + IL_0099: bne.un.s IL_0068 + + IL_009b: ldloc.1 + IL_009c: ldc.i4.1 + IL_009d: add + IL_009e: stloc.1 + IL_009f: ldloc.1 + IL_00a0: ldloc.0 + IL_00a1: ldc.i4.1 + IL_00a2: add + IL_00a3: bne.un.s IL_003b + + IL_00a5: nop + IL_00a6: nop + IL_00a7: call int32[] assembly::get_r() + IL_00ac: ldc.i4.0 + IL_00ad: ldelem [runtime]System.Int32 + IL_00b2: ldc.i4.s 11 + IL_00b4: bne.un.s IL_00ba + + IL_00b6: ldc.i4.0 + IL_00b7: nop + IL_00b8: br.s IL_00bc + + IL_00ba: ldc.i4.1 + IL_00bb: nop + IL_00bc: stloc.s V_8 + IL_00be: ldloc.s V_8 + IL_00c0: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_00c5: pop + IL_00c6: ret } .property int32[] r() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index cd409116c3c..cee7c81b0d7 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -13,6 +13,7 @@ open FSharp.Test.ScriptHelpers open Microsoft.CodeAnalysis open Microsoft.CodeAnalysis.CSharp open Xunit +open Xunit.Abstractions open System open System.Collections.Immutable open System.IO @@ -29,8 +30,8 @@ open System.Runtime.CompilerServices open System.Runtime.InteropServices open FSharp.Compiler.CodeAnalysis - module rec Compiler = + [] type SourceUtilities () = static member getCurrentMethodName([] memberName: string) = memberName @@ -57,7 +58,9 @@ module rec Compiler = | FS of FSharpCompilationSource | CS of CSharpCompilationSource | IL of ILCompilationSource - override this.ToString() = match this with | FS fs -> fs.ToString() | _ -> (sprintf "%A" this ) + + override this.ToString() = match this with | FS fs -> fs.ToString() | _ -> (sprintf "%A" this) + member this.OutputDirectory = let toString diOpt = match diOpt: DirectoryInfo option with @@ -67,6 +70,7 @@ module rec Compiler = | FS fs -> fs.OutputDirectory |> toString | CS cs -> cs.OutputDirectory |> toString | _ -> raise (Exception "Not supported for this compilation type") + member this.WithStaticLink(staticLink: bool) = match this with | FS fs -> FS { fs with StaticLink = staticLink } | cu -> cu type FSharpCompilationSource = @@ -81,7 +85,7 @@ module rec Compiler = References: CompilationUnit list TargetFramework: TargetFramework StaticLink: bool - } + } member this.CreateOutputDirectory() = match this.OutputDirectory with @@ -219,6 +223,102 @@ module rec Compiler = let result = invalidPathChars |> Array.fold(fun (acc:string) (c:char) -> acc.Replace(string(c), "_")) name result + let readFileOrDefault (path: string): string option = + match FileSystem.FileExistsShim(path) with + | true -> Some (File.ReadAllText path) + | _ -> None + + let createCompilationUnit baselineSuffix directoryPath filename = + + let outputDirectoryPath = createTemporaryDirectory().FullName + let sourceFilePath = normalizePathSeparator (directoryPath ++ filename) + let fsBslFilePath = sourceFilePath + baselineSuffix + ".err.bsl" + let ilBslFilePath = + let ilBslPaths = [| +#if DEBUG + #if NETCOREAPP + yield sourceFilePath + baselineSuffix + ".il.netcore.debug.bsl" + yield sourceFilePath + baselineSuffix + ".il.netcore.bsl" + #else + yield sourceFilePath + baselineSuffix + ".il.net472.debug.bsl" + yield sourceFilePath + baselineSuffix + ".il.net472.bsl" + #endif + yield sourceFilePath + baselineSuffix + ".il.debug.bsl" + yield sourceFilePath + baselineSuffix + ".il.bsl" +#else + #if NETCOREAPP + yield sourceFilePath + baselineSuffix + ".il.netcore.release.bsl" + yield sourceFilePath + baselineSuffix + ".il.netcore.bsl" + #else + yield sourceFilePath + baselineSuffix + ".il.net472.release.bsl" + yield sourceFilePath + baselineSuffix + ".il.net472.bsl" + #endif + yield sourceFilePath + baselineSuffix + ".il.release.bsl" + yield sourceFilePath + baselineSuffix + ".il.bsl" +#endif + |] + + let findBaseline = + ilBslPaths + |> Array.tryPick(fun p -> if File.Exists(p) then Some p else None) + match findBaseline with + | Some s -> s + | None -> sourceFilePath + baselineSuffix + ".il.bsl" + + let fsOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ filename, ".err")) + let ilOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ filename, ".il")) + let fsBslSource = readFileOrDefault fsBslFilePath + let ilBslSource = readFileOrDefault ilBslFilePath + + { Source = SourceCodeFileKind.Create(sourceFilePath) + AdditionalSources = [] + Baseline = + Some + { + SourceFilename = Some sourceFilePath + FSBaseline = { FilePath = fsOutFilePath; BslSource = fsBslFilePath; Content = fsBslSource } + ILBaseline = { FilePath = ilOutFilePath; BslSource = ilBslFilePath; Content = ilBslSource } + } + Options = Compiler.defaultOptions + OutputType = Library + Name = Some filename + IgnoreWarnings = false + References = [] + OutputDirectory = Some (DirectoryInfo(outputDirectoryPath)) + TargetFramework = TargetFramework.Current + StaticLink = false + } |> FS + + /// For all files specified in the specified directory, whose name can be found in includedFiles + /// create a compilation with all baselines correctly when set + let createCompilationUnitForFiles baselineSuffix directoryPath includedFiles = + + if not (Directory.Exists(directoryPath)) then + failwith (sprintf "Directory does not exist: \"%s\"." directoryPath) + + let allFiles : string[] = Directory.GetFiles(directoryPath, "*.fs") + + let filteredFiles = + match includedFiles |> Array.map (fun f -> normalizePathSeparator (directoryPath ++ f)) with + | [||] -> allFiles + | incl -> incl + + let fsFiles = filteredFiles |> Array.map Path.GetFileName + + if fsFiles |> Array.length < 1 then + failwith (sprintf "No required files found in \"%s\".\nAll files: %A.\nIncludes:%A." directoryPath allFiles includedFiles) + + for f in filteredFiles do + if not <| FileSystem.FileExistsShim(f) then + failwithf "Requested file \"%s\" not found.\nAll files: %A.\nIncludes:%A." f allFiles includedFiles + + let results = + fsFiles + |> Array.map (fun fs -> (createCompilationUnit baselineSuffix directoryPath fs) :> obj) + |> Seq.map (fun c -> [| c |]) + + results + let getTestOutputDirectory dir testCaseName extraDirectory = // If the executing assembly has 'artifacts\bin' in it's path then we are operating normally in the CI or dev tests // Thus the output directory will be in a subdirectory below where we are executing. @@ -401,17 +501,22 @@ module rec Compiler = let CSharpFromPath (path: string) : CompilationUnit = csFromString (SourceFromPath path) |> CS - let asFsx (cUnit: CompilationUnit) : CompilationUnit = - match cUnit with - | FS src -> FS {src with Source=SourceCodeFileKind.Fsx({FileName=src.Source.GetSourceFileName; SourceText=src.Source.GetSourceText})} - | _ -> failwith "Only F# compilation can be of type Fsx." - let asFs (cUnit: CompilationUnit) : CompilationUnit = match cUnit with | FS { Source = SourceCodeFileKind.Fsi _} -> cUnit | FS src -> FS {src with Source=SourceCodeFileKind.Fs({FileName=src.Source.GetSourceFileName; SourceText=src.Source.GetSourceText})} | _ -> failwith "Only F# compilation can be of type Fs." + let asFsi (cUnit: CompilationUnit) : CompilationUnit = + match cUnit with + | FS src -> FS {src with Source=SourceCodeFileKind.Fsi({FileName=src.Source.GetSourceFileName; SourceText=src.Source.GetSourceText})} + | _ -> failwith "Only F# compilation can be of type Fsi." + + let asFsx (cUnit: CompilationUnit) : CompilationUnit = + match cUnit with + | FS src -> FS {src with Source=SourceCodeFileKind.Fsx({FileName=src.Source.GetSourceFileName; SourceText=src.Source.GetSourceText})} + | _ -> failwith "Only F# compilation can be of type Fsx." + let withName (name: string) (cUnit: CompilationUnit) : CompilationUnit = match cUnit with | FS src -> FS { src with Name = Some name } @@ -537,6 +642,10 @@ module rec Compiler = let withOptimize (cUnit: CompilationUnit) : CompilationUnit = withOptionsHelper [ "--optimize+" ] "withOptimize is only supported for F#" cUnit + let withOptimization (optimization: bool) (cUnit: CompilationUnit) : CompilationUnit = + let option = if optimization then "--optimize+" else "--optimize-" + withOptionsHelper [ option ] "withOptimization is only supported for F#" cUnit + let withFullPdb(cUnit: CompilationUnit) : CompilationUnit = withOptionsHelper [ "--debug:full" ] "withFullPdb is only supported for F#" cUnit @@ -1795,10 +1904,10 @@ Actual: let printSignatures cUnit = printSignaturesImpl None cUnit let printSignaturesWith pageWidth cUnit = printSignaturesImpl (Some pageWidth) cUnit - let getImpliedSignatureHash cUnit = let tcResults = cUnit |> typecheckResults let hash = tcResults.CalculateSignatureHash() match hash with | Some h -> h | None -> failwith "Implied signature hash returned 'None' which should not happen" + diff --git a/tests/FSharp.Test.Utilities/DirectoryAttribute.fs b/tests/FSharp.Test.Utilities/DirectoryAttribute.fs index 91e95ab1628..f641ea870d4 100644 --- a/tests/FSharp.Test.Utilities/DirectoryAttribute.fs +++ b/tests/FSharp.Test.Utilities/DirectoryAttribute.fs @@ -18,104 +18,16 @@ open TestFramework [] type DirectoryAttribute(dir: string) = inherit DataAttribute() - do - if String.IsNullOrWhiteSpace(dir) then + do if String.IsNullOrWhiteSpace(dir) then invalidArg "dir" "Directory cannot be null, empty or whitespace only." - let dirInfo = normalizePathSeparator (Path.GetFullPath(dir)) + let directoryPath = normalizePathSeparator (Path.GetFullPath(dir)) let mutable baselineSuffix = "" let mutable includes = Array.empty - let readFileOrDefault (path: string) : string option = - match FileSystem.FileExistsShim(path) with - | true -> Some (File.ReadAllText path) - | _ -> None - - let createCompilationUnit path (filename: string) = - let outputDirectoryPath = createTemporaryDirectory().FullName - let sourceFilePath = normalizePathSeparator (path ++ filename) - let fsBslFilePath = sourceFilePath + baselineSuffix + ".err.bsl" - let ilBslFilePath = - let ilBslPaths = [| -#if DEBUG - #if NETCOREAPP - yield sourceFilePath + baselineSuffix + ".il.netcore.debug.bsl" - yield sourceFilePath + baselineSuffix + ".il.netcore.bsl" - #else - yield sourceFilePath + baselineSuffix + ".il.net472.debug.bsl" - yield sourceFilePath + baselineSuffix + ".il.net472.bsl" - #endif - yield sourceFilePath + baselineSuffix + ".il.debug.bsl" - yield sourceFilePath + baselineSuffix + ".il.bsl" -#else - #if NETCOREAPP - yield sourceFilePath + baselineSuffix + ".il.netcore.release.bsl" - yield sourceFilePath + baselineSuffix + ".il.netcore.bsl" - #else - yield sourceFilePath + baselineSuffix + ".il.net472.release.bsl" - yield sourceFilePath + baselineSuffix + ".il.net472.bsl" - #endif - yield sourceFilePath + baselineSuffix + ".il.release.bsl" - yield sourceFilePath + baselineSuffix + ".il.bsl" -#endif - |] - - let findBaseline = - ilBslPaths - |> Array.tryPick(fun p -> if File.Exists(p) then Some p else None) - match findBaseline with - | Some s -> s - | None -> sourceFilePath + baselineSuffix + ".il.bsl" - - let fsOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ filename, ".err")) - let ilOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ filename, ".il")) - let fsBslSource = readFileOrDefault fsBslFilePath - let ilBslSource = readFileOrDefault ilBslFilePath - - { Source = SourceCodeFileKind.Create(sourceFilePath) - AdditionalSources = [] - Baseline = - Some - { - SourceFilename = Some sourceFilePath - FSBaseline = { FilePath = fsOutFilePath; BslSource = fsBslFilePath; Content = fsBslSource } - ILBaseline = { FilePath = ilOutFilePath; BslSource = ilBslFilePath; Content = ilBslSource } - } - Options = Compiler.defaultOptions - OutputType = Library - Name = Some filename - IgnoreWarnings = false - References = [] - OutputDirectory = Some (DirectoryInfo(outputDirectoryPath)) - TargetFramework = TargetFramework.Current - StaticLink = false - } |> FS - new([] dirs: string[]) = DirectoryAttribute(Path.Combine(dirs) : string) member _.BaselineSuffix with get() = baselineSuffix and set v = baselineSuffix <- v member _.Includes with get() = includes and set v = includes <- v - override _.GetData _ = - if not (Directory.Exists(dirInfo)) then - failwith (sprintf "Directory does not exist: \"%s\"." dirInfo) - - let allFiles : string[] = Directory.GetFiles(dirInfo, "*.fs") - - let filteredFiles = - match includes |> Array.map (fun f -> normalizePathSeparator (dirInfo ++ f)) with - | [||] -> allFiles - | incl -> incl - - let fsFiles = filteredFiles |> Array.map Path.GetFileName - - if fsFiles |> Array.length < 1 then - failwith (sprintf "No required files found in \"%s\".\nAll files: %A.\nIncludes:%A." dirInfo allFiles includes) - - for f in filteredFiles do - if not <| FileSystem.FileExistsShim(f) then - failwithf "Requested file \"%s\" not found.\nAll files: %A.\nIncludes:%A." f allFiles includes - - fsFiles - |> Array.map (fun fs -> createCompilationUnit dirInfo fs) - |> Seq.map (fun c -> [| c |]) + override _.GetData _ = createCompilationUnitForFiles baselineSuffix directoryPath includes diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj index e16ac79fc6a..1e3fd1b84c9 100644 --- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj +++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj @@ -11,7 +11,7 @@ false false false - $(OtherFlags) --warnon:1182 + $(OtherFlags) --warnon:1182 --realsig- true XUNIT_EXTRAS @@ -43,6 +43,7 @@ + diff --git a/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs b/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs new file mode 100644 index 00000000000..f38a12ebd5a --- /dev/null +++ b/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs @@ -0,0 +1,163 @@ +namespace FSharp.Test + +open System +open System.Diagnostics +open System.Linq +open System.IO +open System.Reflection +open System.Runtime.CompilerServices +open System.Runtime.InteropServices + +open Xunit +open Xunit.Abstractions +open Xunit.Sdk + +open FSharp.Compiler.IO +open FSharp.Test.Compiler +open FSharp.Test.Utilities +open TestFramework + +//[] +//module Extensions = +// let getCompilation (compilation: CompilationHelper): CompilationUnit = +// let c = unbox compilation +// c.Value + +type BooleanOptions = + | True = 1 + | False = 2 + | Both = 3 + | None = 0 + +/// Attribute to use with Xunit's TheoryAttribute. +/// Takes a file, relative to current test suite's root. +/// Returns a CompilationUnit with encapsulated source code, error baseline and IL baseline (if any). +[] +type FileInlineData(filename: string, realsig: BooleanOptions option, optimize: BooleanOptions option, []directory: string) = + inherit DataAttribute() + + let mutable directory: string = directory + let mutable filename: string = filename + let mutable optimize: BooleanOptions option = optimize + let mutable realsig: BooleanOptions option = realsig + + static let computeBoolValues opt = + match opt with + | Some BooleanOptions.True -> [|Some true|] + | Some BooleanOptions.False -> [|Some false|] + | Some BooleanOptions.Both -> [|Some true; Some false|] + | _ -> [|None|] + + static let convertToBoxed opt = + match opt with + | None -> null + | Some opt -> box opt + + new (filename: string, []directory: string) = FileInlineData(filename, None, None, directory) + + member _.Directory with set v = directory <- v + + member _.Optimize with set v = optimize <- Some v + + member _.Realsig with set v = realsig <- Some v + + override _.GetData _ = + + let getOptions realsig optimize = + + let compilationHelper = CompilationHelper(filename, directory, convertToBoxed realsig, convertToBoxed optimize) + [| box (compilationHelper) |] + + let results = + let rsValues = computeBoolValues realsig + let optValues = computeBoolValues optimize + [| + for r in rsValues do + for o in optValues do + getOptions r o + |] + + results + +// realsig and optimized are boxed so null = not set, true or false = set +and [] + CompilationHelper internal (filename: obj, directory: obj, realsig: obj, optimize: obj) = + + let mutable filename = filename + let mutable directory = directory + let mutable realsig = realsig + let mutable optimize = optimize + + let setRealInternalSignature compilation = + match realsig with + | null -> compilation + | realsig -> compilation |> withRealInternalSignature (unbox realsig) + + let setOptimization compilation = + match optimize with + | null -> compilation + | optimize -> compilation |> withOptimization (unbox optimize) + + static let getBaseline (opt: obj) prefix = + match opt with + | :? bool as b when b = true -> Some $"{prefix}On" + | :? bool as b when b = false -> Some $"{prefix}Off" + | _ -> None + + static let combineBaselines realsigBsl optimizeBsl = + match realsigBsl, optimizeBsl with + | Some rs, Some opt -> Some $"{rs}{opt}" + | Some rs, None -> Some $"{rs}" + | None, Some opt -> Some $"{opt}" + | _ -> None + + new() = CompilationHelper(null, null, null, null) + + static member getCompilation(helper: CompilationHelper) : CompilationUnit = + helper.Value () + + member private _.Value(): CompilationUnit = + let directoryPath = + let path = string directory + if File.Exists(path) then + Path.GetDirectoryName(path) + else + path + + let fileName = + if not (isNull filename) then + string filename + else + "" + + let realsigBsl = (getBaseline realsig ".RealInternalSignature") + let optimizeBsl = (getBaseline optimize ".Optimize") + let baselineSuffix = Option.defaultValue "" (combineBaselines realsigBsl optimizeBsl) + let compilation = createCompilationUnit baselineSuffix directoryPath fileName + + compilation |> setRealInternalSignature |> setOptimization + + override _.ToString(): string = + let file = $"File: {filename}" + let realsig = + match realsig with + | :? bool as b -> $" realsig: {b}" + | _ -> "" + let optimize = + match optimize with + | :? bool as b -> $" optimize: {b}" + | _ -> "" + file + realsig + optimize + + interface IXunitSerializable with + member _.Serialize(info: IXunitSerializationInfo) = + info.AddValue("filename", filename) + info.AddValue("directory", directory) + info.AddValue("realsig", realsig) + info.AddValue("optimize", optimize) + + member _.Deserialize(info: IXunitSerializationInfo) = + filename <- info.GetValue("filename") + directory <- info.GetValue("directory") + realsig <- info.GetValue("realsig") + optimize <- info.GetValue("optimize") diff --git a/tests/FSharp.Test.Utilities/ProjectGeneration.fs b/tests/FSharp.Test.Utilities/ProjectGeneration.fs index fc110ded6b6..1734e3240a7 100644 --- a/tests/FSharp.Test.Utilities/ProjectGeneration.fs +++ b/tests/FSharp.Test.Utilities/ProjectGeneration.fs @@ -1023,9 +1023,7 @@ type ProjectWorkflowBuilder member this.DeleteProjectDir() = if Directory.Exists initialProject.ProjectDir then - try - Directory.Delete(initialProject.ProjectDir, true) - with _ -> () + try Directory.Delete(initialProject.ProjectDir, true) with _ -> () member this.Execute(workflow: Async) = try