Skip to content

SI-8898 javap -fun under new style lambdas#4069

Merged
lrytz merged 1 commit intoscala:2.11.xfrom
som-snytt:issue/8898
Nov 5, 2014
Merged

SI-8898 javap -fun under new style lambdas#4069
lrytz merged 1 commit intoscala:2.11.xfrom
som-snytt:issue/8898

Conversation

@som-snytt
Copy link
Contributor

To support both -Ydelambdafy strategies, look for both inline
(anonfun) and method (lambda) closure classes.

For method (lambda) style, use the anonfun method that is
invoked by the accessor.

Also, the output of javap must be captured eagerly for
filtering for the current target method.

@scala-jenkins scala-jenkins added this to the 2.11.5 milestone Oct 20, 2014
@lrytz
Copy link
Member

lrytz commented Oct 21, 2014

PLS REBUILD/pr-scala@a153c05f8a3ea6771d5e0b9afaed4f7e1df00403

@scala-jenkins
Copy link

(kitty-note-to-self: ignore 59920510)
🐱 Roger! Rebuilding pr-scala for a153c05. 🚨

@som-snytt
Copy link
Contributor Author

That's a real error; I broke the stripped output. I'll push the fix shortly. @lrytz

Actually, just remembered the other issue is that the non-uniformity of the lambda class names means extra work to distinguish class and module closures. That's the other fix to push.

@som-snytt som-snytt closed this Oct 21, 2014
@som-snytt som-snytt reopened this Oct 21, 2014
@som-snytt som-snytt closed this Oct 21, 2014
@som-snytt som-snytt reopened this Oct 28, 2014
@som-snytt som-snytt force-pushed the issue/8898 branch 2 times, most recently from 2d6ec85 to ecffc95 Compare October 28, 2014 08:08
@som-snytt
Copy link
Contributor Author

Dear kitteh, I guess I am a dog person.

@som-snytt
Copy link
Contributor Author

PLS REBUILD ALL

Pretty please. On the weekend, like in the old days, when you'd go to the computer room to submit jobs off-hours.

@scala-jenkins
Copy link

(kitty-note-to-self: ignore 61382067)
🐱 Roger! Rebuilding pr-scala for ecffc95. 🚨

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.java 😊

@lrytz
Copy link
Member

lrytz commented Nov 4, 2014

LGTM - this will require change (again) once closures are emitted in Java-8 style (invokedynamic and LambdaMetaFactory), but it should become easier to find the delambdafy:method-method (no longer need to grep for the accessor callsite in the lambda class).

To support both -Ydelambdafy strategies, look for both inline
(anonfun) and method (lambda) closure classes.

For method (lambda) style, use the anonfun method that is
invoked by the accessor.

Also, the output of javap must be captured eagerly for
filtering for the current target method.

If the user asks for a module, e.g., `Foo$`, don't yield
results for companion class, but for `Foo`, do yield
companion module results.  Just because.
@som-snytt
Copy link
Contributor Author

Pushed the minor edits. Hope it didn't break.

lrytz added a commit that referenced this pull request Nov 5, 2014
SI-8898 javap -fun under new style lambdas
@lrytz lrytz merged commit 90b9eea into scala:2.11.x Nov 5, 2014
@som-snytt
Copy link
Contributor Author

@lrytz it's an inherently brittle feature, at least as impl'd. Wasn't sure it was worth it in terms of bang/LOC. But it's useful when you need it.

@som-snytt som-snytt deleted the issue/8898 branch February 9, 2015 01:13
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.

3 participants