| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fix for SI-6687, wrong isVar logic.
|
| |
| |
| |
| |
| | |
Fields which back lazy vals need to be excluded via !isLazy
lest isVar return true.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
# By Jason Zaugg (8) and others
# Via Adriaan Moors (6) and Josh Suereth (5)
* origin/2.10.0-wip:
Removing controversial `either` method from Futures API.
SI-6624 set info of case pattern binder to help find case field accessors
Fixes SI-6628, Revert "Fix for view isEmpty."
SI-6661 - Remove obsolete implicit parameter of scala.concurrent.promise method
Fixes SI-6559 - StringContext not using passed in escape function.
SI-6648 copyAttrs must preserve TypeTree#wasEmpty
Fix raw string interpolator: string parts which were after the first argument were still escaped
Update comment.
SI-6646 `ident` or Ident is always new binding.
SI-6440 Address regressions around MissingRequirementError
Refine the message and triggering of MissingRequirementError.
SI-6640 Better reporting of deficient classpaths.
SI-6644 Account for varargs in extmethod forwarder
SI-6646 Fix regression in for desugaring.
Update tools/epfl-publish
|
| |\
| | |
| | | |
SI-6640 Better reporting of deficient classpaths.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Go back to using globalError to report when a stub's info is referenced,
and only throw the MissingRequirementError when compilation really
must abort due to having a StubTermSymbol in a place where a
StubClassSymbol would have been a better choice.
This situation arises when an entire package is missing from the
classpath, as was the case in the reported bug.
Adds `StoreReporterDirectTest`, which buffers messages issued
during compilation for more structured interrogation. Use this
in two test for manifests -- these tests were using a crude means
of grepping compiler console output to focus on the relevant output,
but this approach was insufficient with the new multi-line error
message emitted as part of this change.
Also used that base test class to add two new tests: one for
the reported error (package missing), and another for a simpler
error (class missing). The latter test shows how stub symbols
allow code to compile if it doesn't the subset of signatures
in some type that refer to a missing class.
Gave the INFO/WARNING/ERROR members of Reporter sensible
toString implementations; they inherit from Enumeration#Value
in an unusual manner (why?) that means the built in toString of
Enumeration printed `Severity@0`.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- To force a failure of the stub, call a new method `failIfStub`
rather than `info`.
- Offer a broader range of potential root causes in the
error message.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In a55788e, StubSymbols were introduced to fail-slow when
the classpath was deficient. This allowed compilation to
succeed in cases when one didn't actually use the part of
class A which referred to some missing class B.
But a few problems were introduced.
Firstly, when the deferred error eventually happened, it was
signalled with abort(msg), rather than through a thrown
MissingRequirementError. The latter is desirable, as it doesn't
lead to printing a stack trace.
Second, the actual error message changed, and no longer
included the name of the class file that refers to the missing
class.
Finally, it seems that we can end up with a stub term symbol
in a situation where a class symbol is desired. An assertion
in the constructor of ThisType throws trips when calling .isClass,
before the useful error message from StubSymbol can be emitted.
This commit addresses these points, and rewords the error
a little to be more accessible. The last point is the most fragile
in this arrangement, there might be some whack-a-mole
required to find other places that also need this.
I don't see a clean solution for this, but am open to suggestions.
We should really build a facility in partest to delete
specified classfiles between groups in separate compilation
tests, in order to have tests for this. I'll work on that as a followup.
For now, here's the result of my manual testing:
[info] Set current project to default-821d14 (in build file:/Users/jason/code/scratch1/)
> compile
[info] Compiling 1 Scala source to /Users/jason/code/scratch1/target/scala-2.10/classes...
[error]
[error] while compiling: /Users/jason/code/scratch1/test.scala
[error] during phase: typer
[error] library version: version 2.10.0-RC2
[error] compiler version: version 2.10.0-RC2
...
[error] last tree to typer: Ident(SwingWorker)
[error] symbol: <none> (flags: )
[error] symbol definition: <none>
[error] symbol owners:
[error] context owners: object Test -> package <empty>
...
[error] uncaught exception during compilation: java.lang.AssertionError
[trace] Stack trace suppressed: run last compile:compile for the full output.
[error] (compile:compile) java.lang.AssertionError: assertion failed: value actors
[error] Total time: 2 s, completed Nov 10, 2012 3:18:34 PM
>
> set scalaHome := Some(file("/Users/jason/code/scala/build/pack"))
[info] Defining *:scala-home
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to default-821d14 (in build file:/Users/jason/code/scratch1/)
^[compile
[info] Compiling 1 Scala source to /Users/jason/code/scratch1/target/scala-2.10/classes...
[error] /Users/jason/code/scratch1/test.scala:4: A signature in SwingWorker.class refers to term actors in package scala which is missing from the classpath.
[error] object Test extends SwingWorker
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed
[error] Total time: 2 s, completed Nov 10, 2012 3:18:45 PM
|
| |\ \
| | | |
| | | | |
SI-6648 copyAttrs must preserve TypeTree#wasEmpty
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This field tracks whether the type is an inferred
on, subject to removal in `resetAttrs`, or an explicit
type, which must remain.
In ae5ff662, `ResetAttrs` was modified to duplicate
trees, rather than mutate trees in place. But the
tree copier didn't pass `wasEmpty` on to the new tree,
which in turn meant that the subsequent typing run
on the tree would not re-infer the types. If the
type refers to a local class, e.g. the anonymous
function in the enclosed test case, the reference
to the old symbol would persist.
This commit overrides `copyAttrs` in TypeTree to
copy `wasEmpty`.
We might consider representing this as a tree
attachment, but this would need to be validated
for the performance impact.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The previous commit regressed in these cases:
// no withFilter
for (X <- List("A single ident is always a pattern")) println(X)
for (`x` <- List("A single ident is always a pattern")) println(`x`)
At the top level of the LHS of a <-, such identifiers represent
new bindings, not stable identifier patterns.
|
| |/
| |
| |
| |
| |
| | |
The early check in the parser of pattern irrefutability,
added in c82ecab, failed to consider InitCaps and
`backquoted` identifiers.
|
|\ \
| | |
| | | |
SI-6673 fixes macro problems with eta expansions
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Eta expansions previously caused the typer to disable macros. That was
done in order to detect eta expansion of macro defs and show the user
an appropriate error message.
Macros were disabled because to find out whether we're expanding
a macro def, we need to get its symbol, and to get a symbol of something
we need to typecheck that something. However typechecking automatically
expands macros, so, unless we disable macros, after a typecheck we won't
be able to analyze macro occurrences anymore.
Unfortunately this solution has a fatal flaw. By disabling macros we
not only prevent the eta-expandee from macro expanding, but also all
the subtrees of that eta-expandee (see SI-6673).
This commit adds a mechanism for fine-grained control over macro
expansion. Now it's possible to prohibit only the node, but not its
children from macro expanding.
|
|\ \ \
| | | |
| | | | |
SI-5330, SI-6014 deal with existential self-type
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This has been broken since https://github.com/scala/scala/commit/b7b81ca2#L0L567.
The existential rash is treated in a similar manner as in fc24db4c.
Conceptually, the fix would be `def selfTypeSkolemized =
widen.skolemizeExistential.narrow`, but simply widening before
narrowing achieves the same thing. Since we're in existential voodoo
territory, let's go for the minimal fix: replacing `this.narrow` by
`widen.narrow`.
--
Original patch by @retronym in #1074, refined by @paulp to
only perform widen.narrow incantation if there are
existentials present in the widened type, as
narrowing is expensive when the type is not a singleton.
The result is that compiling the entirety of quick, that
code path is hit only 143 times. All the other calls hit
.narrow directly as before. It looks like the definition
of negligible in the diff of -Ystatistics when compiling
src/library/scala/collection:
< #symbols : 306315
---
> #symbols : 306320
12c13
< #unique types : 293859
---
> #unique types : 293865
I'm assuming based on the 2/1000ths of a percent increase
in symbol and type creation that wall clock is manageable,
but I didn't measure it.
|
|\ \ \ \
| |/ / /
|/| | | |
sane printing of renamed imports
|
| |/ /
| | |
| | |
| | |
| | | |
Having a select named "foo" with an underlying symbol named "bar"
and trying to make sense of all that by prettyprinting is very confusing
|
|\ \ \
| | | |
| | | | |
SI-6539 Annotation for methods unfit for post-typer ASTs
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Don't default the message, and show it exclusively.
- Fix cut-and-pasto in the @since tag
- Be tolerant if the annotaion class is missing, as seems to
have been the case compiling the continuations plugin.
- s/\t/ / in the test file to show the errors are positioned
correctly.
- Use defensive getOrElse
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Motivated by the `.value` method in the SBT task-syntax branch,
which should only be called within the context of the argument
to a setting initialization macro.
The facility is akin to a fatal deprecation.
|
|\ \ \
| |/ /
|/| | |
SI-6616 Check that unsafe operations are only called on the presentation...
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
compiler thread.
The method that checks the actual constraint is @elidable, expecting it to be used
for nightly builds but stripped-off in release builds. This way we don't lose any
performance, but 'fail-fast' in IDE nightlies.
This assumes that release builds will have at least `-Xelide-below ASSERTION`, but
this pull request does not do that.
|
|\ \ \
| |/ /
|/| /
| |/ |
|
| |\
| | |
| | | |
Fixes example in Type.asSeenFrom
|
| | |
| | |
| | |
| | |
| | |
| | | |
It was written in some form of non-executable pseudo-code before and
that might be quite confusing for people who are not familiar with scala
reflection.
|
| |\ \
| | |/
| |/| |
Updated copyright dates throughout compiler and stdlib for upcoming release
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
e6b4204604 moved access widenings from ExplicitOuter to
SuperAccessors to reflect them in pickled signatures so
that the inliner can take advantage of them under separate
compilation.
The followup discussion [1] determined that this wasn't
the right solution: while it enabled new separate compilation
inlinings, it failed to widen access of outer pointers and
hence prevented certain inlinings.
A better solution was proposed: modify the inliner to know
that access widening is guaranteed to have happened in
ExplicitOuter for any field accessed by an @inline-d method
body, rather than relying solely on the pickled types.
But this hasn't happened yet. In the meantime 07f94297 / #1121
reinstated the access widening to SuperAccessors, but took a
slightly different approach, using `Symbol#enclMethod` rather
than `closestEnclMethod`. That deviation triggers SI-6562.
This commit goes back to `closestEnclMethod`.
[1] https://groups.google.com/forum/#!topic/scala-internals/iPkMCygzws4
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
- Added the labels across scala.reflect and scala.reflect.macros
- Added the styling in template.css that is used by all labels
|
| |/
| |
| |
| | |
reflection.internal). It probably needs more cleanup of the api wrt to ranges etc but let's leave it for later
|
| |
| |
| |
| |
| |
| |
| | |
Previous fix to value classes uncovered some questionable cases in the backend where result types of constructor signatures are surprising. It's not a big deal because these types will be ignored afterwards anyway. But
the method uncovered some questionable situations which we should follow up on. However, breaking 2.9 code because of this is way too harsh. That's why the asserts were converted to warnings.
review by @paulp, @adriaanm
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
# By Jason Zaugg (5) and others
# Via Josh Suereth (5) and others
* origin/2.10.0-wip:
Use Typed rather than .setType
Wider use and a new variant of typedPos.
SI-6575 Plug inference leak of AbstractPartialFun
Disabled generation of _1, _2, etc. methods.
SI-6526 Additional test case.
Fix SI-6552, regression with self types.
avoid single-art assert where harmful in duration-tck
Fix for SI-6537, inaccurate unchecked warning.
SI-6526 Tail call elimination should descend deeper.
Changes Tree and Type members from vals to defs.
Fixes SI-6170: issue with dragging scaladoc splitter over central iframe
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In 6eb55d4b7a we put in a remedy for an old issue SI-4560 which
had accumulated a number of sketchy partial remedies which carried
no tests to illustrate their necessity. Looks like at least one of
those was doing something useful. Here's to reversion-reversion.
This reverts commit c8bdf199, which itself reverted cb4fd6582.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Explanatory email:
The reflection API defines a great many abstract vals. I would
like these all to be defs. I'm sending a pull request to that end.
Reasons: for starters, they should default to being defs. It's a
decision to use vals for which one should have to supply reasons.
The reason for THAT is that defs can be implemented with vals, but
not vice versa.
Why does this matter? I can't find my long writing on the subject
of TypeRef. In short, we waste a huge amount of memory on its
fields, because given the way TypeRef is defined, each one demands
a pre, a sym, and an args. Except that somewhere between 1/3 and
1/2 have prefix "NoPrefix", and somewhere between 1/3 and 1/2 have
args "Nil". We know it at creation time, but we give every typeref
the whole field anyway.
At present there's no way to fix this which has acceptable
performance - i.e. custom subclasses save us lots of memory, but
are too much slower for having to use an extractor - but there's
no reason we should have to choose, and I fully expect to fix it
eventually. Let's not make that fix into a breaking change by
abstractly defining "pre" and "args" as field-requiring vals.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Until now lazy accessors were handled somehow special because their symbol was created in typers but the corresponding tree was only added in Refchecks. This irregularity caused serious problems for value classes. Also it now looks just better when lazy value is treated in a similar way as other fields.
I needed to adapt reifier so that it handles the new implementation correctly. Previously it had to recreate lazy val only by removing defdef and renaming. Now we basically need to recreate lazy val from scratch.
There is one minor change to cps plugin but that is still fine because lazy vals were never really part of the transformation.
Some range positions needed to be fixed manually. We could do it at the creation time but that would require a lot more "if (symbol.isLazy)" conditions for MethodSyntheis and Symbol/Tree creation and would just unnecessary complicate api. If someone has a better idea, please speak up. Range positions changes were necessary because previously accessors were created at refchecks and they weren't checked by validator (even though they were wrong).
This commit removes lazy val implementation restriction introduced for 2.10.0.
(cherry-picked from 981424b)
|
| |
|
| |
|
|
|
|
|
| |
Additionally includes improvements, formatting fixes, and link
additions and fixes.
|
| |
|
| |
|
|
|
|
| |
blocked by SI-6511
|
|
|
|
| |
and warning cleanup
|
| |
|
|
|
|
| |
Oh those pretty groups, u gotta luv'em...
|
| |
|
| |
|