Lambda lifting: only lift functions that have free variables#1885
Draft
OlivierNicole wants to merge 1 commit intoocsigen:masterfrom
Draft
Lambda lifting: only lift functions that have free variables#1885OlivierNicole wants to merge 1 commit intoocsigen:masterfrom
OlivierNicole wants to merge 1 commit intoocsigen:masterfrom
Conversation
3a5a2d8 to
b9076fb
Compare
Member
|
What's the status of this ? |
b9076fb to
dd2219d
Compare
Contributor
Author
|
It’s a small improvement, currently only used for |
Member
|
In this functor, one should be able to lift without wrapper both module F (X : sig end) = struct
let f x = prerr_endline x
let x = 1
let g x = f x; f x
endSequences of functions are not handled: module G (X : sig end) = struct
let f x = prerr_endline x
let g x = f x; f x
endNeither are mutually recursive functions: module H (X : sig end) = struct
let rec h x y =
if x > 0 then i x y else prerr_endline y
and i x y =
h (x - 1) y
endMaybe one should use |
Contributor
Author
|
We could, it would be a further improvement on the gain that the present state of this PR brings. |
This addresses the second remark in ocsigen#1792: lifted functions that have no free variables don't need to be wrapped.
dd2219d to
f3e92af
Compare
Member
|
@OlivierNicole, what should we do we this PR ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This addresses the second remark in #1792: lifted functions that have no free variables don't need to be wrapped.