| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Deprecated tpe_= on Tree, which is redundant with and
less useful than setType. To provide a small layer of
insulation from the direct nulling out of mutable fields
used to signal the typer, added def clearType() which is
merely tree.tpe = null but is shamefaced about the null
and var-settings parts like a respectable method should be.
|
|\
| |
| | |
Deskolemize type skolems before pickling.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Lex Spoon noticed what appeared to be duplicate symbols
in methods read from classfiles. The duplicates turned out
to be type skolems, which because they're not supposed to
be pickled in the first place (right?) are unpickled
without turning back into skolems. Now pickler is careful
to deskolemize before writing anything down.
The effort implied by test case is more than can possibly
be justified for this obscure compiler corner, but I'll
chalk it up to reflection exploration.
|
|\
| |
| | |
Removing more of that which merits removal
|
| |
| |
| |
| | |
All attrition and no execution gives test a dull edge.
|
| |
| |
| |
| |
| | |
Prying one more stowaway off the side of the train.
This isn't used, hasn't been used, and won't be used.
|
|\ \
| |/
|/| |
Add convenience attribute operator to NodeSeq
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Compared to the current method of reading the string text of an
attribute:
(x \ "@bar").text
...the new operator removes the need for a pair of parenthesis and
shortens the overall expression by 7 chars :
x \@ "bar"
Discussion on scala-internals:
https://groups.google.com/d/topic/scala-internals/BZ-tfbebDqE/discussion
|
|\ \
| | |
| | | |
Fix for SI-6595, lost modifiers in early defs.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Saw this by accident; the trees created for early defs would
wholesale replace the modifiers with PRESUPER rather than
combining them. FINAL was lost that way, as would be any other
modifiers which might be valid there.
|
|\ \ \
| | | |
| | | | |
reduce sharing between trees
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There's no longer any need to maintain a distinction, as
the tree sharing among literals which it is trying to avoid
no longer takes place.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Tracking shared trees led to various perpetrators, the simplest of
which are addressed herein. More consideration will be required:
we need to approach the problem with sufficient command to assure
both that trees are only shared when safe (which might without
architectural changes be "never") but also that we do not
duplicate definition trees unless it is appropriate.
Why do we care about tree sharing? Sometimes, a lot of the time
even, you can get away with sharing trees - but that's also why
it's responsible for all kinds of trouble. If the compiler would
break obviously and immediately then we wouldn't be doing it.
The danger of sharing is that one piece of an AST may undergo a
transformation or mutation and an unrelated piece of the AST will
be partially dragged into the change. The danger has become more
urgent with the arrival of macros. The first step in preventing
tree sharing mishaps is to reduce the amount the compiler does so
whatever is left is a lot easier to see. As a happy accident, it
will also fix bugs.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When all the logic in a method is for symbol creation,
and then at the last minute it throws on a hastily zipped
ValDef, it's really not a tree generation method, it's a
symbol creation method.
Eliminated redundancy and overgeneralization; marked some
bits for further de-duplication. Did my best with my limited
archeological skills to document what is supposed to be
happening in eliminateModuleDefs.
|
|\ \ \
| | | |
| | | | |
Merge 2.10.x into master.
|
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* merge-wip-into-2.10.x: (44 commits)
Cleanups of reifyBoundTerm and reifyBoundType
SI-5841 reification of renamed imports
Share the empty LinkedList between first0/last0.
SI-4922 Show default in Scaladoc for generic methods.
SI-6614 Test case for fixed ArrayStack misconduct.
SI-6690 Release reference to last dequeued element.
SI-5789 Use the ReplTest framework in the test
SI-5789 Checks in the right version of the test
SI-5789 Removes assertion about implclass flag in Mixin.scala
SI-6766 Makes the -Pcontinuations:enable flag a project specific preference
more ListOfNil => Nil
DummyTree => CannotHaveAttrs
evicts assert(false) from the compiler
introduces global.pendingSuperCall
refactors handling of parent types
unifies approaches to call analysis in TreeInfo
TypeApply + Select and their type-level twins
SI-6696 removes "helper" tree factory methods
SI-6766 Create a continuations project in eclipse
Now the test suite runs MIMA for compatibility testing.
...
Conflicts:
src/compiler/scala/reflect/reify/codegen/GenUtils.scala
src/compiler/scala/tools/nsc/ast/Trees.scala
src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
src/compiler/scala/tools/nsc/typechecker/Contexts.scala
src/compiler/scala/tools/nsc/typechecker/Namers.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/eclipse/scala-compiler/.classpath
src/eclipse/scalap/.classpath
src/reflect/scala/reflect/internal/StdNames.scala
src/reflect/scala/reflect/internal/TreeInfo.scala
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
# By Eugene Burmako (1) and others
# Via Adriaan Moors (2) and others
* origin/2.10.0-wip:
Fixing OSGi distribution.
Fix for rangepos crasher.
SI-6685 fixes error handling in typedApply
|
| |\ \ \ \
| | | | | |
| | | | | | |
Ticket/5841
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Cases in reifyBoundTerm are merged by constructors; conditions in reifyBoundType are linearized;
also, in latter, or-patterns are used to merge some cases;
and some minor stuff not worth mentioning.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Reification of renamed imports is done by catching Selects with name != their tree.symbol.name,
replacing this name with tree.symbol.name, and then doing reifyProduct in case
of renamed terms and reifyBoundType (inner) in case of renamed types.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
SI-5877 Support implicit classes in package objects
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Reuses existing function `isInPackageObject` and reads
better.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This used to crash, as both the package and the package object
had the synthetic method in `decls`, and the typer tried to add
the tree to both places.
Now, synthetics in the package object are excluded from the pacakge
itself.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Investigatory tools for SI-5877
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-6558: typecheck lazy annotation info using non-silent context
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Reporting some errors prevents reporting others. This
residual issue had been lodged as SI-6758.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Make context for typing lazy annotations always non-silent. If lazy annotation info was created in local (silent) context, error could go unnoticed because later they would still use silent typer for typing the annotation.
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-4922 Show default in Scaladoc for generic methods.
|
| | | |_|/ / / /
| | |/| | | | |
| | | | | | | |
| | | | | | | | |
We must account for cloned symbols.
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-6614 Test case for fixed ArrayStack misconduct.
|
| | |/ / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Not sure when it was fixed, but in 2.9.2 things were
messed up:
scala> (for (i <- 0 to 10) yield { val in = ArrayStack.tabulate(i)(_.toString); (in, (in filter (_ => true)) == in) }).mkString("\n")
res14: String =
(ArrayStack(),true)
(ArrayStack(0),true)
(ArrayStack(0, 1),true)
(ArrayStack(1, 2, null),false)
(ArrayStack(0, 1, 2, 3),true)
(ArrayStack(3, 4, null, null, null),false)
(ArrayStack(2, 3, 4, 5, null, null),false)
(ArrayStack(1, 2, 3, 4, 5, 6, null),false)
(ArrayStack(0, 1, 2, 3, 4, 5, 6, 7),true)
(ArrayStack(7, 8, null, null, null, null, null, null, null),false)
(ArrayStack(6, 7, 8, 9, null, null, null, null, null, null),false)
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-6690 Release reference to last dequeued element.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This is in line with the existing implementation
of `MutableList#clear`, and in line with an newly
created empty collection.
|
| | | |_|/ / / /
| | |/| | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Avoids leaks in MutableList and its more better known child,
mutable.Queue, when the last element is dequeued or when we
take the tail of a one element collection.
Refactors copy/pasted code between the two implementations of
tail.
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-5789 Removes assertion about implclass flag in Mixin.scala
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Don't check for the crashed message, just dump the output
from the REPL. Use the ReplTest framework to the make
the test clean
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
In my other commit I had a version of the test that didn't
actually reproduce the problem because it didn't set the
optimize flag
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The assertion that the class being mixed from should be an implclass
seems reasonable, but the flag isn't always set. In order to stop the
bleeding this fix turns the assertion into a debug warning. Issue SI-6782
will track figuring out the root cause of the missing flag.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-5894 Don't emit static forwarders for macros.
|
| | | | | | | | | | |
|
| | | |/ / / / / /
| | |/| | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Refactoring of the the zero-risk variety. The extraction of
`ExcludedForwarderFlags` is the motivation here; we'll need that
next commit to fix SI-5894.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-1672 Catches are in tail position without finally.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
- Includes a run test to check bytecode verifies and behaves
- Show this isn't possible when try is used as an expression,
and a `liftedTree` local method is needed.
|
| | |/ / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
So we can eliminate tail calls within.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Warn when generated classfiles differ only in case.
|
| | |/ / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We should most likely prohibit it completely, but warning
is a start.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-6535 Step back from the precipice of a cycle
|
| | |/ / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Adding any non-local parent to WrapAsScala will trigger a valid
cyclic reference error. By moving the import of `Wrapper._`
inside `WrapAsScala` and `WrapAsJava`, it is not in scope when
typing the parents of those, and we avoid the cycle.
Adds a test case to show the essense of the promiscious mutual
imports that triggers this.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-6549 Improve escaping in REPL codegen.
|