| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \ \
| | | | | |
| | | | | | |
Small optimizations around use of Scopes.
|
| | | | | | |
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`Scope`'s `filter` is implemented using `toList`,
so may as well start with `toList`ourselves.
Also fused some `filter`/`foreach` combos.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix comparisons involving NaN
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | | |
Floating point comparisons involving NaN should always return false,
except for !=. Fixes a regression introduced by #4963.
|
|\ \ \ \ \
| | |_|/ /
| |/| | | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-7898 Read user input during REPL warmup
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The compiler is created on main thread and user input is read
on an aux thread (opposite to currently).
Fixes completion when `-i` is supplied.
Now `-i` means pasted and new option `-I` means line-by-line.
The temporary reader uses postInit to swap in the underlying
reader.
Completion is disabled for the temporary reader, rather than
blocking while it waits for a compiler. But manically hitting
tab is one way of knowing exactly when completion is live.
|
|\| | | | | |
|
| |\ \ \ \ \
| | |/ / / /
| |/| | | | |
SI-4625 Recognize App in script
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fixed the warning when main module is accompanied by snippets.
Minor clean-up so even I can follow what is returned.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It's pretty confusing when your script object becomes a local
and then nothing happens. Such as when you're writing a test and
it takes forever to figure out what's going on.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In an unwrapped script, where a `main` entry point is discovered
in a top-level object, retain all top-level classes.
Everything winds up in the default package.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Scripting knows it by name.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Cheap name test: if the script object extends "App",
take it for a main-bearing parent.
Note that if `-Xscript` is not `Main`, the default,
then the source is taken as a snippet and there is
no attempt to locate an existing `main` method.
|
|\| | | | |
| |_|/ / /
|/| | | | |
|
| |/ / / |
|
|\ \ \ \
| | | | |
| | | | | |
Improvements to deprecations related to `since` parameter
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
SI-9794 Error advice uses decoded method name
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
So much work went into polishing this error message,
it's worth buffing the method name when it's an operator.
The message now says `+` instead of `$plus`.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-2712 Add support for partial unification of type constructors
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Debug flag to print a summary of the inliner's work
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Example output below. Note that inlining List.map fails because the
trait forwarder uses `INVOKESPECIAL` for now, will change with pr 5177.
$ cat Test.scala
class C {
def foo = Map(1 -> 'a', 2 -> 'b')
def bar(l: List[Int]) = l.map(_ + 1)
}
$ qsc -Yopt-log-inline _ -Yopt:l:classpath Test.scala
Inlining into C.foo (initially 36 instructions, ultimately 72):
- Inlined scala/Predef$ArrowAssoc$.$minus$greater$extension (8 instructions) 2 times: the callee is annotated `@inline`
Inlining into C.bar (initially 12 instructions, ultimately 12):
- Failed to inline scala/collection/immutable/List.map (the callee is a higher-order method, the argument for parameter (bf: Function1) is a function literal): The callee scala/collection/immutable/List::map(Lscala/Function1;Lscala/collection/generic/CanBuildFrom;)Ljava/lang/Object; contains the instruction INVOKESPECIAL scala/collection/TraversableLike.map (Lscala/Function1;Lscala/collection/generic/CanBuildFrom;)Ljava/lang/Object;
that would cause an IllegalAccessError when inlined into class C.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Keep -Yopt-inline-heuristics and -Yopt-trace unchanged
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
SI-8044 Allow binding backquoted varid in patterns
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Allows arbitrary identifier in `X @ pat`, including
non-varids. This goes to regularity.
Users of this syntax are not likely to be confused
by the "backquoted var id is stable" rule.
Also for sequence pattern, `X @ _*`.
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously, a varid could not be backquoted, so that it was not
possible to introduce variables with names such as `type` in a
match expression.
This commit allows backquoted varids in `case x @ _` and
`case x: Int`. In neither position is a stable id accepted,
that is, an id with leading uppercase.
Therefore, this commit merely relaxes the backquoted varid to
be taken as a normal varid in these contexts.
|
|\ \ \ \
| | | | |
| | | | | |
Check left side of an assignment expression for errors; fixes SI-9781
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`convertToAssignment` is triggered on a type error but it doesn't seem
to really care what the error is as long as the expression can be
converted to an assignment expression.
This patch fixes that by checking whether the qualifier of the selection
contains any errors before deciding to continue with the conversion.
|
|\ \ \ \
| | | | |
| | | | | |
SI-9760 Fix for higher-kinded GADT refinement
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-9121 test case (fixed in new optimizer), SI-9179 test case
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Also adds a mising phase travel in the backend. A comment already
points out why it's necessary, but it was actually forgotten.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-9361 fixed assert allowing display of improved error message.
|
| | |_|_|_|/
| |/| | | | |
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
SI-5463 Check .jars before using them
|
| |/ / / /
| | | | |
| | | | |
| | | | | |
Make broken JAR files on compiler classpath cause a fatal error
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
SI-9665 Backquoted vbar in extractor pattern
|
| | | | |
| | | | |
| | | | |
| | | | | |
Allow an infix extractor named `|`, when backquoted.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-9671, SI-7397 fix null.asInstanceOf[Int] when pt erases to Object
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Erasure first replaces null.asInstanceOf[Int] by unbox(null). If the
expected type erases to object, erasure then introduces a box operation,
yielding box(unbox(null)). Note that this value is a box of zero, not
null.
Erasure has an optimization to replace box(unbox(x)) in case x is
of primitive type. 60f1b4b extended this to the case when x is null,
which is incorrect in general. The reason was to prevent creating a
primitive box to be stored in the unused generic field when creating
an instance of a specialized class. A special case ensures that this
optimization is still performed.
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We used to disable generation of static forwarders when a object had a
trait as a companion, as one could not add methods with bodies to an
interface in JVM 6.
The JVM lifted this restriction to support default methods in interfaces,
so we can lift the restriction on static forwarders, too.
Fixes https://github.com/scala/scala-dev/issues/59
|
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Java generic signature generation was making the wrong
assumption about how refinement types should erase to
Java generics.
This commit passes through the current value of `primitiveOk`,
rather than forcing it to `true`.
This flag is true when generating the signature for `f2`,
but false in `i2` (as we are in a type argument position).
|
|\ \ \ \
| | | | |
| | | | | |
SI-9045 Error on recursive ctor
|