Skip to content

Fix seqexpression testcases #16795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,103 +14,102 @@ module SeqExpressionStepping =
|> withNoOptimize
|> withEmbeddedPdb
|> withEmbedAllSource
|> withRealInternalSignatureOn
|> ignoreWarnings
|> verifyILBaseline

//Retry SOURCE=SeqExpressionSteppingTest01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest1.exe" # SeqExpressionSteppingTest1.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest01.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest01.fs"|])>]
let ``SeqExpressionSteppingTest01_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> verifyCompilation

//Retry SOURCE=SeqExpressionSteppingTest01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest1.exe" # SeqExpressionSteppingTest1.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest01.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest01.fs"|])>]
let ``SeqExpressionSteppingTest01_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> verifyCompilation

// SOURCE=SeqExpressionSteppingTest02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest2.exe" # SeqExpressionSteppingTest2.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest02.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest02.fs"|])>]
let ``SeqExpressionSteppingTest02_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> verifyCompilation

// SOURCE=SeqExpressionSteppingTest02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest2.exe" # SeqExpressionSteppingTest2.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest02.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest02.fs"|])>]
let ``SeqExpressionSteppingTest02_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> verifyCompilation

//SOURCE=SeqExpressionSteppingTest03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest3.exe" # SeqExpressionSteppingTest3.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest03.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest03.fs"|])>]
let ``SeqExpressionSteppingTest03_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> verifyCompilation

//SOURCE=SeqExpressionSteppingTest03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest3.exe" # SeqExpressionSteppingTest3.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest03.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest03.fs"|])>]
let ``SeqExpressionSteppingTest03_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> verifyCompilation

// SOURCE=SeqExpressionSteppingTest04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest4.exe" # SeqExpressionSteppingTest4.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest04.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest04.fs"|])>]
let ``SeqExpressionSteppingTest04_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> verifyCompilation

// SOURCE=SeqExpressionSteppingTest04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest4.exe" # SeqExpressionSteppingTest4.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest04.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest04.fs"|])>]
let ``SeqExpressionSteppingTest04_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> verifyCompilation

// SOURCE=SeqExpressionSteppingTest05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest5.exe" # SeqExpressionSteppingTest5.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest05.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest05.fs"|])>]
let ``SeqExpressionSteppingTest05_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> verifyCompilation

// SOURCE=SeqExpressionSteppingTest05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest5.exe" # SeqExpressionSteppingTest5.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest05.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest05.fs"|])>]
let ``SeqExpressionSteppingTest05_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> verifyCompilation

// SOURCE=SeqExpressionSteppingTest06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest6.exe" # SeqExpressionSteppingTest6.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest06.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest06.fs"|])>]
let ``SeqExpressionSteppingTest06_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> verifyCompilation

// SOURCE=SeqExpressionSteppingTest06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest6.exe" # SeqExpressionSteppingTest6.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest06.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest06.fs"|])>]
let ``SeqExpressionSteppingTest06_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> verifyCompilation

// SOURCE=SeqExpressionSteppingTest07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest7.exe" # SeqExpressionSteppingTest7.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest07.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest07.fs"|])>]
let ``SeqExpressionSteppingTest07_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> verifyCompilation

// SOURCE=SeqExpressionSteppingTest07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest7.exe" # SeqExpressionSteppingTest7.fs -
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest07.fs"|])>]
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest07.fs"|])>]
let ``SeqExpressionSteppingTest07_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@





.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 FSharpSignatureData.assembly
{


}
.mresource public FSharpOptimizationData.assembly
{


}
.module assembly.exe

.imagebase {value}
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003
.corflags 0x00000001





.class public abstract auto ansi sealed SeqExpressionSteppingTest1
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 abstract auto ansi sealed nested public SeqExpressionSteppingTest1
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 auto autochar serializable sealed nested assembly beforefieldinit specialname f0@6
extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1<int32>
{
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 )
.field public int32 pc
.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 )
.field public int32 current
.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 specialname rtspecialname
instance void .ctor(int32 pc,
int32 current) cil managed
{

.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc
IL_0007: ldarg.0
IL_0008: ldarg.2
IL_0009: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current
IL_000e: ldarg.0
IL_000f: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1<int32>::.ctor()
IL_0014: ret
}

.method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1<int32>& next) cil managed
{

.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc
IL_0006: ldc.i4.1
IL_0007: sub
IL_0008: switch (
IL_0017,
IL_001a)
IL_0015: br.s IL_001d

IL_0017: nop
IL_0018: br.s IL_002e

IL_001a: nop
IL_001b: br.s IL_0035

IL_001d: nop
IL_001e: ldarg.0
IL_001f: ldc.i4.1
IL_0020: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc
IL_0025: ldarg.0
IL_0026: ldc.i4.1
IL_0027: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current
IL_002c: ldc.i4.1
IL_002d: ret

IL_002e: ldarg.0
IL_002f: ldc.i4.2
IL_0030: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc
IL_0035: ldarg.0
IL_0036: ldc.i4.0
IL_0037: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current
IL_003c: ldc.i4.0
IL_003d: ret
}

.method public strict virtual instance void Close() cil managed
{

.maxstack 8
IL_0000: ldarg.0
IL_0001: ldc.i4.2
IL_0002: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc
IL_0007: ret
}

.method public strict virtual instance bool get_CheckClose() cil managed
{

.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc
IL_0006: switch (
IL_0019,
IL_001c,
IL_001f)
IL_0017: br.s IL_0022

IL_0019: nop
IL_001a: br.s IL_0025

IL_001c: nop
IL_001d: br.s IL_0023

IL_001f: nop
IL_0020: br.s IL_0025

IL_0022: nop
IL_0023: ldc.i4.0
IL_0024: ret

IL_0025: ldc.i4.0
IL_0026: ret
}

.method public strict virtual instance int32 get_LastGenerated() cil managed
{
.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 )

.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current
IL_0006: ret
}

.method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1<int32> GetFreshEnumerator() cil managed
{
.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 )

.maxstack 8
IL_0000: ldc.i4.0
IL_0001: ldc.i4.0
IL_0002: newobj instance void SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::.ctor(int32,
int32)
IL_0007: ret
}

}

.method public static class [runtime]System.Collections.Generic.IEnumerable`1<int32> f0() cil managed
{

.maxstack 8
IL_0000: ldc.i4.0
IL_0001: ldc.i4.0
IL_0002: newobj instance void SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::.ctor(int32,
int32)
IL_0007: ret
}

}

}

.class private abstract auto ansi sealed '<StartupCode$assembly>'.$SeqExpressionSteppingTest1
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 3
.locals init (class [runtime]System.Collections.Generic.IEnumerable`1<int32> V_0)
IL_0000: call class [runtime]System.Collections.Generic.IEnumerable`1<int32> SeqExpressionSteppingTest1/SeqExpressionSteppingTest1::f0()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: call int32 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Length<int32>(class [runtime]System.Collections.Generic.IEnumerable`1<!!0>)
IL_000c: pop
IL_000d: ret
}

}






Loading