Skip to content
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

COMPILER: improve approximation #56

Closed
wants to merge 1 commit into from
Closed

COMPILER: improve approximation #56

wants to merge 1 commit into from

Conversation

hhugo
Copy link
Member

@hhugo hhugo commented Nov 9, 2013

extend the approximation of Param

example:

let s = "qwer"
let r = "poiu"
let f s = print_int (String.length s)
let _ = f s;f r

if f does't escape, we know that String.length s will always be 4

@ghost ghost assigned vouillon Nov 9, 2013
@hhugo
Copy link
Member Author

hhugo commented Nov 12, 2013

@vouillon, any review ? can we merge ?

@vouillon
Copy link
Member

By the way, there is probably an issue with inlining as well. In the example below, we know that parameter g is bound to function h, but we cannot inline g in f as x is not in scope.

let f g = g () in
let x = 1 in
let h () = x in
f h

@hhugo hhugo mentioned this pull request Jun 19, 2014
@hhugo hhugo closed this Apr 2, 2015
@hhugo hhugo deleted the approx branch January 6, 2019 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants