Skip to content

Commit d22a018

Browse files
committed
Do not delay lambda generation for now
1 parent f166d6e commit d22a018

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/fsharp/IlxGen.fs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4383,9 +4383,6 @@ and GenGenericParams cenv eenv tps =
43834383
and GenGenericArgs m (tyenv: TypeReprEnv) tps =
43844384
tps |> DropErasedTypars |> List.map (fun c -> (mkILTyvarTy tyenv.[c, m]))
43854385

4386-
and DelayGenMethodForLambda cenv mgbuf eenv args =
4387-
cenv.delayedGenMethods.Enqueue(fun cenv -> GenMethodForLambda cenv mgbuf eenv args)
4388-
43894386
and GenMethodForLambda cenv mgbuf eenv (entryPointInfo, cloinfo, eenvinner, body, isLocalTypeFunc, m) =
43904387
let g = cenv.g
43914388
let ilCloBody = CodeGenMethodForExpr cenv mgbuf (SPAlways, entryPointInfo, cloinfo.cloName, eenvinner, 1, body, Return)
@@ -4453,10 +4450,7 @@ and GenLambdaClosure cenv (cgbuf: CodeGenBuffer) eenv isLocalTypeFunc selfv expr
44534450
| Some v -> [(v, BranchCallClosure (cloinfo.cloArityInfo))]
44544451
| _ -> []
44554452

4456-
if cenv.exprRecursionDepth > 0 then
4457-
DelayGenMethodForLambda cenv cgbuf.mgbuf eenv (entryPointInfo, cloinfo, eenvinner, body, isLocalTypeFunc, m)
4458-
else
4459-
GenMethodForLambda cenv cgbuf.mgbuf eenv (entryPointInfo, cloinfo, eenvinner, body, isLocalTypeFunc, m)
4453+
GenMethodForLambda cenv cgbuf.mgbuf eenv (entryPointInfo, cloinfo, eenvinner, body, isLocalTypeFunc, m)
44604454
cloinfo, m
44614455

44624456
| _ -> failwith "GenLambda: not a lambda"

tests/fsharp/Compiler/CompilerAssert.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ let main argv = 0"""
143143
ProjectId = None
144144
SourceFiles = [|"test.fs"|]
145145
#if !NETCOREAPP
146-
OtherOptions = [|"--preferreduilang:en-US";"--warn:5"|]
146+
OtherOptions = [|"--preferreduilang:en-US";"--warn:5";"--optimize-"|]
147147
#else
148148
OtherOptions =
149149
let assemblies = getNetCoreAppReferences |> Array.map (fun x -> sprintf "-r:%s" x)

0 commit comments

Comments
 (0)