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

inlining lambdas #13434

Merged
merged 3 commits into from
Oct 3, 2015
Merged

inlining lambdas #13434

merged 3 commits into from
Oct 3, 2015

Conversation

vtjnash
Copy link
Sponsor Member

@vtjnash vtjnash commented Oct 3, 2015

this enables inference to inline lambdas and thunks, just like it was already able to do for generic functions

(hint: diff is more clear if you add ?w=1 to the link)

@JeffBezanson
Copy link
Sponsor Member

I think this is kind of a waste of time given #13412.

@vtjnash
Copy link
Sponsor Member Author

vtjnash commented Oct 3, 2015

i thought the closure redesign was still keeping the distinction between anonymous functions and generic functions? This does not address closures at all (which I assume will be addressed by #13412), but covers the minor modifications necessary to handle anonymous functions as well as generic functions.

@carnaval
Copy link
Contributor

carnaval commented Oct 3, 2015

I think anonymous function will simply be lowered to gensymed generic functions

@vtjnash
Copy link
Sponsor Member Author

vtjnash commented Oct 3, 2015

A closure is lowered to a new gensymed type, with the code being added to the call generic function. However, the LambdaStaticData (aka anonymous function) is still separate from the MethodSorter (aka generic function).

@JeffBezanson
Copy link
Sponsor Member

Well, while LambdaStaticData and MethodTable are still separate types, the former is not used to represent anonymous functions. They no longer occur in ASTs except inside method definitions at the top level. And while call overloading is used now, this is temporary since it cannot really work with the new design.

vtjnash added a commit that referenced this pull request Oct 3, 2015
@vtjnash vtjnash merged commit f67f213 into master Oct 3, 2015
@vtjnash vtjnash deleted the jn/inlining-lambda branch October 3, 2015 20:33
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.

None yet

3 participants