| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
If delambdafy:method is not enabled, the delambdafy method is a nop.
|
| |
|
|
|
|
|
|
|
| |
Make the fields of CoreBTypes non-variable. Instead, replace the
CoreBTypes instance on each compiler run. That results in fewer
variables, and the initialization code is directly where the fields
are declared, instead of an init method.
|
|
|
|
| |
Review was in https://github.com/scala/scala/pull/3855
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, a ClassBType was just a name. The `exemplars` map
stored a Tracked instance for every ClassBType. Tracked stored
type information that is required later in the backend when things
may run concurrently. In particular: superclass, interfaces, flags
and information for emitting the InnerClass attribute. Now we put all
the information stored in Tracked directly in the ClassBType.
There is still one hash map: `classBTypeFromInternalNameMap` maps
a JVM internal class name (e.g. "scala/Predef$") to the corresponding
ClassBType. This map is used during bytecode generation, when the
ASM framework computes stack map frames.
In order to compute stack map frames, the ASM framework needs to be
able to get the LUB of two types. The default implementation uses
reflection to get type information, however that doesn't work in our
case: the classes we compile are not on the classpath. So instead,
the backend overwrites the method `getCommonSuperClass` of the
ClassWriter. This method receives two class internal names and
computes their LUB. This is done by looking up the ClassBTypes in the
`classBTypeFromInternalNameMap` and invoking `jvmWiseLUB`.
This commit was reviwed in https://github.com/scala/scala/pull/3855.
It consists of all commits labelled [squash-after-review], squashed
into one.
|
| |
|
|\
| |
| | |
SI-8512 Infer a type for f"$args"
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid the widening bug for q. This resolution also suffers
from the inference of Any, which can trigger a warning and
an anxiety attack. But that's still better than doing the
wrong thing.
Right?
|
|/
|
|
|
|
|
|
|
|
|
|
| |
The f-interpolator gets a type param that better be Any to avoid
unfortunate widenings.
Hey, it worked!
Unfortunately, when `Any` is inferred, `-Xlint:infer-any` takes notice.
This is probably a greater problem for the f-interpolator than for
quasiquotes, which are a more specialized tool.
|
|\
| |
| | |
test for InnerClass and EnclosingMethod attributes
|
| |
| |
| |
| |
| |
| | |
Some parts of the test assert (current) buggy behavior. This is marked
in the test file with TODO. It will be fixed in later work on the
backend.
|
|\ \
| | |
| | | |
a few missing deprecations in proxy collections.
|
| | |
| | |
| | |
| | |
| | |
| | | |
SeqProxy was properly deprecated, so were the CollProxyLike classes, and
the ones in collection.immutable, but these four somehow survived
the Big Proxy Deprecation (tm).
|
|\ \ \
| | | |
| | | | |
SI-4563 friendlier behavior for Ctrl+D in the REPL
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Closing the REPL with Ctrl+D does not issue a newline, so the user's
prompt displays on the same line as the `scala>` prompt. This is bad.
We now force a newline before closing the interpreter, and display
`:quit` while we're at it so that people know how to exit the REPL
(since `exit` doesn't exist anymore).
The tricky part was to only add a newline when the console is
interrupted, and *not* when it is closed by a command (like `:quit`),
since commands are processed after their text (including newline) has
been sent to the console.
|
|\ \ \
| |_|/
|/| | |
SI-6476 Improve error on escapement
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Strictly trivial updates for readability.
I used to prefer procedure syntax, but since it was
scheduled for removal, I can't scan a def without an
equals sign.
|
| | |
| | |
| | |
| | | |
And adjust the test.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Behavior of escape processing under string interpolation can
be confusing. This commit improves the exception message so
you know at least what sort of escapes are handled.
This came up on SO in the form `s"\d".r`, where it may not
be obvious what is throwing and how to work around it.
```
scala> s"\d".r
scala.StringContext$InvalidEscapeException: invalid escape '\d' not one of [\b, \t, \n, \f, \r, \\, \", \'] at index 0 in "\d". Use \\ for literal \.
scala> s"a\"
scala.StringContext$InvalidEscapeException: invalid escape at terminal index 1 in "a\". Use \\ for literal \.
```
Referencing SI-6476 because that has become the magnet ticket
for "escape processing under string interpolation, huh?"
This doesn't address `$"` and doesn't handle the more interesting
parse error `s"a\"b"`.
|
|\ \ \
| | | |
| | | | |
Orphan check file
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
Orphaned by the override check reversion that deleted the test source.
2524fdde3edc7b668fdb4bf68e990141d3ec18d6
|
|\ \ \
| | | |
| | | | |
remove jline sources from src/ now that we use a released jline.
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
We don't need those, right?
We don't even build that folder anymore (since 1b0fa91), it is just dead
code.
|
|\ \ \
| |/ /
|/| | |
SI-8781 Avoid double-expansion under -Ymacro-expand:discard
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This mode of macro expansion is used by the presentation compiler to
leave the original macro applications ("expandees") in the type
checked trees, annotated with the types of the expansions.
However, under some circumstances involving implicits, we would
re-expand the macro. If the macro wasn't stable, this could lead
to a type mismatch.
The originally reported problem was with the shapeless
`mkSingletonOps` macro. Its expansion had the type of a freshly-named
class local to the expansion. Upon the re-expansion, a new class
was generated, which lead to errors like:
client/Client.scala:4: error: type mismatch;
found : fresh$macro$2
required: fresh$macro$1
This commit suppressed re-expansion of the expandee by use of
the existing, tree attachment driven mechanism.
|
|\ \
| | |
| | | |
Also update jline.version when update.versions is set during build
|
| | | |
|
|\ \ \
| | | |
| | | | |
Better error message than 'bad symbolic reference'.
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
Let's not scare people, and try to give them some advice.
PS: we should really come up with a better mechanism for testing errors/warnings
|
|\ \ \
| | | |
| | | | |
Bump versions for Scala 2.11.2
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Remove "throws InvalidEscapeException" from StringContext.raw doc
|
| | | |
| | | |
| | | | |
As pointed out by @som-snytt, \u0023 is #, not \u0025.
|
| |/ /
| | |
| | | |
Since StringContext.raw doesn't escape its input, it does not call `treatEscapes` and cannot throw the InvalidEscapeException.
|
|\ \ \
| | | |
| | | | |
Remove invalidation from Global.scala
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The invalidation has been introduced in these commits:
https://github.com/scala/scala/commit/167309afd10f9b65b35e6874a30ea6340a1ddc44
https://github.com/scala/scala/commit/ace051ff0abe112b767c3912f846eb4d50e52cf5
https://github.com/scala/scala/commit/e156d4a7cf4afdab91b7c281a0e8ae6e4743cc4a
It's safe to remove this functionality. It was added originally to support an experiment with resident compilation. The experiment was performed in sbt and dropped in https://github.com/sbt/sbt/commit/6def08e029e474dc35af04b7403a2aeaddd0dec6
Since then Scala team concluded to not work on resident compilation so it's safe to delete unused code.
|
|\ \ \ \
| | | | |
| | | | | |
Assortiment of cleanups and comments around the backend
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
The final flag is computed correctly by javaFlags.
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
SI-8743 Fix crasher with poly-methods annotated with @varargs
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The code that generated the Java varargs forwarder was basing
things on the `ValDef-s` of the parameters of the source method.
But, their types refer to a type parameter skolems of the enclosing
method, which led to a type mismatch when typechecking the forwarder.
Instead, I've reworked the code to simply use the `DefDef`-s symbol's
info, which *doesn't* refer to skolems. This actually simplifies the
surrounding code somewhat; rather than repeated symbols in a map
we can just time travel the pre-uncurry method signatures to figure
out which params are releated.
|
|\ \ \ \
| | | | |
| | | | | |
SI-8736 Restore -language to former glory
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Now `-language` with no option will emit an error:
```
$ skalac -feature -language unused.scala
scalac error: '-language' requires an option. See '-language:help'.
scalac -help gives more information
```
|