-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Issue/5117 #14
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
Merged
Merged
Issue/5117 #14
Conversation
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
- Make Enumeration.ValueSet a SortedSet and back it by a BitSet - Add toBitMask and fromBitMask methods for value sets - Add an Ordering for the values - Deprecate names seq in the Enumeration constructor - Add + method to Value for easy ValueSet creation
Closes SI-5117.
heathermiller
pushed a commit
to heathermiller/scala
that referenced
this pull request
Oct 11, 2012
scala.reflect.api.Position documentation
lrytz
pushed a commit
to lrytz/scala
that referenced
this pull request
May 20, 2016
And use this as the target of the default methods or statically resolved super or $init calls. The call-site change is predicated on `-Yuse-trait-statics` as a stepping stone for experimentation / bootstrapping. I have performed this transformation in the backend, rather than trying to reflect this in the view from Scala symbols + ASTs. Once we commit to this change, we can remove the `lateInterfaces` bookkeeping from the backend, as we no long will need to add ancestor interfaces as direct parents to allow use of invokespecial for super calls. ``` > ;scalac sandbox/test.scala ; scala Test [info] Running scala.tools.nsc.MainGenericRunner -usejavacp Test T C [success] Total time: 2 s, completed 04/05/2016 11:07:13 AM > eval "javap -classpath . -c -private C".!! [info] ans: String = Compiled from "test.scala" [info] public class C implements T { [info] public C(); [info] Code: [info] 0: aload_0 [info] 1: invokespecial scala#14 // Method java/lang/Object."<init>":()V [info] 4: aload_0 [info] 5: invokespecial scala#17 // Method T.$init$:()V [info] 8: getstatic scala#23 // Field scala/Predef$.MODULE$:Lscala/Predef$; [info] 11: ldc scala#24 // String C [info] 13: invokevirtual scala#28 // Method scala/Predef$.println:(Ljava/lang/Object;)V [info] 16: aload_0 [info] 17: invokespecial scala#32 // Method T.foo:()I [info] 20: pop [info] 21: return [info] } > ;scalac -Yuse-trait-statics sandbox/test.scala ; scala Test [info] Running scala.tools.nsc.MainGenericRunner -usejavacp Test T C [success] Total time: 2 s, completed 04/05/2016 11:07:39 AM > eval "javap -classpath . -c -private C".!! [info] ans: String = Compiled from "test.scala" [info] public class C implements T { [info] public C(); [info] Code: [info] 0: aload_0 [info] 1: invokespecial scala#14 // Method java/lang/Object."<init>":()V [info] 4: aload_0 [info] 5: invokestatic scala#18 // Method T.$init$:(LT;)V [info] 8: getstatic scala#24 // Field scala/Predef$.MODULE$:Lscala/Predef$; [info] 11: ldc scala#25 // String C [info] 13: invokevirtual scala#29 // Method scala/Predef$.println:(Ljava/lang/Object;)V [info] 16: aload_0 [info] 17: invokestatic scala#33 // Method T.foo:(LT;)I [info] 20: pop [info] 21: return [info] } > eval "javap -classpath . -c -private T".!! [info] ans: String = Compiled from "test.scala" [info] public interface T { [info] public static int foo(T); [info] Code: [info] 0: iconst_0 [info] 1: ireturn [info] [info] public int foo(); [info] Code: [info] 0: aload_0 [info] 1: invokestatic scala#15 // Method foo:(LT;)I [info] 4: ireturn [info] [info] public static void $init$(T); [info] Code: [info] 0: getstatic scala#24 // Field scala/Predef$.MODULE$:Lscala/Predef$; [info] 3: ldc scala#25 // String T [info] 5: invokevirtual scala#29 // Method scala/Predef$.println:(Ljava/lang/Object;)V [info] 8: return [info] [info] public void $init$(); [info] Code: [info] 0: aload_0 [info] 1: invokestatic scala#32 // Method $init$:(LT;)V [info] 4: return [info] } ```
lrytz
pushed a commit
to lrytz/scala
that referenced
this pull request
May 25, 2016
And use this as the target of the default methods or statically resolved super or $init calls. The call-site change is predicated on `-Yuse-trait-statics` as a stepping stone for experimentation / bootstrapping. I have performed this transformation in the backend, rather than trying to reflect this in the view from Scala symbols + ASTs. Once we commit to this change, we can remove the `lateInterfaces` bookkeeping from the backend, as we no long will need to add ancestor interfaces as direct parents to allow use of invokespecial for super calls. ``` > ;scalac sandbox/test.scala ; scala Test [info] Running scala.tools.nsc.MainGenericRunner -usejavacp Test T C [success] Total time: 2 s, completed 04/05/2016 11:07:13 AM > eval "javap -classpath . -c -private C".!! [info] ans: String = Compiled from "test.scala" [info] public class C implements T { [info] public C(); [info] Code: [info] 0: aload_0 [info] 1: invokespecial scala#14 // Method java/lang/Object."<init>":()V [info] 4: aload_0 [info] 5: invokespecial scala#17 // Method T.$init$:()V [info] 8: getstatic scala#23 // Field scala/Predef$.MODULE$:Lscala/Predef$; [info] 11: ldc scala#24 // String C [info] 13: invokevirtual scala#28 // Method scala/Predef$.println:(Ljava/lang/Object;)V [info] 16: aload_0 [info] 17: invokespecial scala#32 // Method T.foo:()I [info] 20: pop [info] 21: return [info] } > ;scalac -Yuse-trait-statics sandbox/test.scala ; scala Test [info] Running scala.tools.nsc.MainGenericRunner -usejavacp Test T C [success] Total time: 2 s, completed 04/05/2016 11:07:39 AM > eval "javap -classpath . -c -private C".!! [info] ans: String = Compiled from "test.scala" [info] public class C implements T { [info] public C(); [info] Code: [info] 0: aload_0 [info] 1: invokespecial scala#14 // Method java/lang/Object."<init>":()V [info] 4: aload_0 [info] 5: invokestatic scala#18 // Method T.$init$:(LT;)V [info] 8: getstatic scala#24 // Field scala/Predef$.MODULE$:Lscala/Predef$; [info] 11: ldc scala#25 // String C [info] 13: invokevirtual scala#29 // Method scala/Predef$.println:(Ljava/lang/Object;)V [info] 16: aload_0 [info] 17: invokestatic scala#33 // Method T.foo:(LT;)I [info] 20: pop [info] 21: return [info] } > eval "javap -classpath . -c -private T".!! [info] ans: String = Compiled from "test.scala" [info] public interface T { [info] public static int foo(T); [info] Code: [info] 0: iconst_0 [info] 1: ireturn [info] [info] public int foo(); [info] Code: [info] 0: aload_0 [info] 1: invokestatic scala#15 // Method foo:(LT;)I [info] 4: ireturn [info] [info] public static void $init$(T); [info] Code: [info] 0: getstatic scala#24 // Field scala/Predef$.MODULE$:Lscala/Predef$; [info] 3: ldc scala#25 // String T [info] 5: invokevirtual scala#29 // Method scala/Predef$.println:(Ljava/lang/Object;)V [info] 8: return [info] [info] public void $init$(); [info] Code: [info] 0: aload_0 [info] 1: invokestatic scala#32 // Method $init$:(LT;)V [info] 4: return [info] } ```
lrytz
pushed a commit
to lrytz/scala
that referenced
this pull request
Jun 6, 2016
And use this as the target of the default methods or statically resolved super or $init calls. The call-site change is predicated on `-Yuse-trait-statics` as a stepping stone for experimentation / bootstrapping. I have performed this transformation in the backend, rather than trying to reflect this in the view from Scala symbols + ASTs. ``` > ;scalac sandbox/test.scala ; scala Test [info] Running scala.tools.nsc.MainGenericRunner -usejavacp Test T C [success] Total time: 2 s, completed 04/05/2016 11:07:13 AM > eval "javap -classpath . -c -private C".!! [info] ans: String = Compiled from "test.scala" [info] public class C implements T { [info] public C(); [info] Code: [info] 0: aload_0 [info] 1: invokespecial scala#14 // Method java/lang/Object."<init>":()V [info] 4: aload_0 [info] 5: invokespecial scala#17 // Method T.$init$:()V [info] 8: getstatic scala#23 // Field scala/Predef$.MODULE$:Lscala/Predef$; [info] 11: ldc scala#24 // String C [info] 13: invokevirtual scala#28 // Method scala/Predef$.println:(Ljava/lang/Object;)V [info] 16: aload_0 [info] 17: invokespecial scala#32 // Method T.foo:()I [info] 20: pop [info] 21: return [info] } > ;scalac -Yuse-trait-statics sandbox/test.scala ; scala Test [info] Running scala.tools.nsc.MainGenericRunner -usejavacp Test T C [success] Total time: 2 s, completed 04/05/2016 11:07:39 AM > eval "javap -classpath . -c -private C".!! [info] ans: String = Compiled from "test.scala" [info] public class C implements T { [info] public C(); [info] Code: [info] 0: aload_0 [info] 1: invokespecial scala#14 // Method java/lang/Object."<init>":()V [info] 4: aload_0 [info] 5: invokestatic scala#18 // Method T.$init$:(LT;)V [info] 8: getstatic scala#24 // Field scala/Predef$.MODULE$:Lscala/Predef$; [info] 11: ldc scala#25 // String C [info] 13: invokevirtual scala#29 // Method scala/Predef$.println:(Ljava/lang/Object;)V [info] 16: aload_0 [info] 17: invokestatic scala#33 // Method T.foo:(LT;)I [info] 20: pop [info] 21: return [info] } > eval "javap -classpath . -c -private T".!! [info] ans: String = Compiled from "test.scala" [info] public interface T { [info] public static int foo(T); [info] Code: [info] 0: iconst_0 [info] 1: ireturn [info] [info] public int foo(); [info] Code: [info] 0: aload_0 [info] 1: invokestatic scala#15 // Method foo:(LT;)I [info] 4: ireturn [info] [info] public static void $init$(T); [info] Code: [info] 0: getstatic scala#24 // Field scala/Predef$.MODULE$:Lscala/Predef$; [info] 3: ldc scala#25 // String T [info] 5: invokevirtual scala#29 // Method scala/Predef$.println:(Ljava/lang/Object;)V [info] 8: return [info] [info] } ```
OlivierBlanvillain
pushed a commit
to OlivierBlanvillain/scala
that referenced
this pull request
Jun 27, 2017
Drop internalNameString and make javaBinaryName return a String
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.
Make Enumeration.ValueSet Serializable
Closes SI-5117.
(depends on #13)