forked from scala/scala
-
Notifications
You must be signed in to change notification settings - Fork 1
Backport/names names names #39
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
Closed
Closed
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
No longer run the classfile parser on Scala generated classfiles that don't have a Scala signature (module classes, inner classes, etc). Various cleanups in the classfile parser, minimize the work performed on Scala classfiles. Before, the attributes section was parsed twice: once to find the ScalaSig attribute, the second time to find the ScalaSignature in the RuntimeVisibleAnnotations. Now everything happens in the first iteration. Also fixes a bug in the backend: classes ending in `$` did not get a ScalaSignature by mistake. They were filtered out by the name-based test that is supposed to identify module classes. (cherry picked from commit 3aea776)
We can just keep these are short-lived Strings, rather than interning them into the Name table for the entire lifetime of Global. (cherry picked from commit 688bf0f)
…ass/method I've used lazy types for field/method/class infos, which is analagous to what we do in `Unpickler` for scala originated types. We read all data needed by the inner class table and the type completers from the pool eagerly, but still be lazy about interning strings to Names and completion of the field/method types themselves. This fixes some long standing spurious cyclic errors: Manually tested with: ``` $ scalac -cp $(coursier fetch -q -p com.datastax.cassandra:dse-driver:1.0.0) test.scala test.scala:2: error: illegal cyclic reference involving class Cluster new com.datastax.driver.dse.DseCluster.Builder() ^ one error found $ /code/scala/build/quick/bin/scalac -cp $(coursier fetch -q -p com.datastax.cassandra:dse-driver:1.0.0) test.scala $ cat test.scala class Test { new com.datastax.driver.dse.DseCluster.Builder() } ``` ``` class Test { new com.datastax.driver.dse.DseCluster.Builder() } ``` It subsumes `-Ybreak-cycles`. I was to compile `pos/cycle{-jsoup,}` without the experimental `-Ybreak-cycles`. I've removed the entire `-Ybreak-cycles` option and supporting code. It also subsumes the existing implementation related to cycle avoidance (`queueLoad` / `raiseLoaderLevel`.) Descriptor, signature, constant, and param names are made available to the field/method lazy completer which can use them if and when the symbol is completed. After classfile parsing the constant pool is discarded (some entries are of course captured by the lazy type completers.) Fixes scala/bug#3809 (cherry picked from commit 4554e02)
Classfile parsing does re-enter when we're reading package objects or classfiles for things like `scala/native.class`. But for the most part the prior refactorings mean that we typically only parse a single classfile at a time, and as such we can profit from a one-element cache for the buffer to read this into. (cherry picked from commit ed8d95e)
There is no good reason for these dotted names to be Names and stick around in the name table. Let's use short lived strings instead. Reduces the name table by 5% in terms of entries and 10% in terms of characters when compiling src/scalap/**/*.scala (cherry picked from commit ae18049)
Compiling @deprecated val foo: T = some.deprecated(call) yielded private[this] val `foo `: T = some.deprecated(call) @deprecated <accessor> def foo: T = this.`foo ` where the `@deprecated` has been slapped on the def (where it'll incur deprecation warnings on callers) but not on the val (where it'll suppress deprecation warnings on the body. Just copy the annotation across. Fixes scala/bug#11538 in an expedient manner.
…and InterruptedException as well as Awaitable.ready.
Awaitable.result should have a throws annotation of TimeoutException and InterruptedException as well as Awaitable.ready
Also deprecate backing field symbols.
Windows compat for PipelineMainTest, finally?
Submitted to scala/scala |
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.
No description provided.