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

SI-6546 InnerClasses attribute refers to absent class #3097

Merged
merged 1 commit into from Nov 7, 2013
Merged

SI-6546 InnerClasses attribute refers to absent class #3097

merged 1 commit into from Nov 7, 2013

Conversation

paulp
Copy link
Contributor

@paulp paulp commented Nov 5, 2013

At issue is that the optimizer would eliminate closure classes
completely, then neglect to eliminate those classes from the
container's InnerClasses attribute. This breaks tooling which
expects those entries to correspond to real classes.

The code change is essentially mgarcia's - I minimized it and
put the caches in perRunCaches, and added the test case which
verifies that after being compiled under -optimise, there are
no inner classes. Before/after:

  7,8d6
  <   InnerClasses:
  <        public final #22; //class A_1$$anonfun$f$1
  37,45c35,40
  <   #21 = Utf8               A_1$$anonfun$f$1
  <   #22 = Class              #21            //  A_1$$anonfun$f$1
  <   #23 = Utf8               Code
  ---
  >   #21 = Utf8               Code

At issue is that the optimizer would eliminate closure classes
completely, then neglect to eliminate those classes from the
container's InnerClasses attribute. This breaks tooling which
expects those entries to correspond to real classes.

The code change is essentially mgarcia's - I minimized it and
put the caches in perRunCaches, and added the test case which
verifies that after being compiled under -optimise, there are
no inner classes. Before/after:

  7,8d6
  <   InnerClasses:
  <        public final #22; //class A_1$$anonfun$f$1
  37,45c35,40
  <   #21 = Utf8               A_1$$anonfun$f$1
  <   #22 = Class              #21            //  A_1$$anonfun$f$1
  <   #23 = Utf8               Code
  ---
  >   #21 = Utf8               Code
@paulp
Copy link
Contributor Author

paulp commented Nov 5, 2013

Review by @JamesIry.

@ghost ghost assigned JamesIry Nov 6, 2013
JamesIry added a commit that referenced this pull request Nov 7, 2013
SI-6546 InnerClasses attribute refers to absent class
@JamesIry JamesIry merged commit 79788af into scala:2.10.x Nov 7, 2013
@paulp paulp deleted the issue/6546-for-210 branch November 10, 2013 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants