| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
```
⚡ qscala -deprecation
Welcome to Scala 2.12.0-20160126-000825-1e302b76aa (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_66).
Type in expressions for evaluation. Or try :help.
scala> import reflect.macros.blackbox.Context; import language.experimental.macros
import reflect.macros.blackbox.Context
import language.experimental.macros
scala> def impl(c: Context) = {println(c.universe.showRaw(c.parse("val then = 0"))); c.literalUnit}; def m: Unit = macro impl;
<console>:13: warning: method literalUnit in trait ExprUtils is deprecated: Use quasiquotes instead
def impl(c: Context) = {println(c.universe.showRaw(c.parse("val then = 0"))); c.literalUnit}; def m: Unit = macro impl;
^
impl: (c: scala.reflect.macros.blackbox.Context)c.Expr[Unit]
defined term macro m: Unit
scala> m
<console>:16: error: exception during macro expansion:
scala.MatchError: pos: source-<macro>,line-1,offset=4 then is now a reserved word; usage as an identifier is deprecated WARNING (of class scala.tools.nsc.reporters.StoreReporter$Info)
at scala.reflect.macros.contexts.Parsers$class.scala$reflect$macros$contexts$Parsers$class$$$anonfun$1(Parsers.scala:17)
```
|
|
|
|
|
|
|
|
| |
Currently, exhaustivity analysis only runs for scrutinees with
a sealed type.
This commit treats any case class as a one-element, sealed type
to enable additional analysis, such as in the new test case.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hash consing of trees within pattern match analysis was broken, and
considered `x1.foo#1` to be the same tree as `x1.foo#2`, even though
the two `foo`-s referred to different symbols.
The hash consing was based on `Tree#correspondsStructure`, but the
predicate in that function cannot veto correspondance, it can only
supplement the default structural comparison.
I've instead created a custom tree comparison method for use in
the pattern matcher that handles the tree shapes that we use.
|
|\
| |
| | |
SI-9437 Emit and support parameter names in class files
|
| |
| |
| |
| |
| |
| |
| |
| | |
JEP 118 added a MethodParameters attribute to the class file spec which
holds the parameter names of methods when compiling Java code with
`javac -parameters`.
We emit parameter names by default now.
|
| | |
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
This commit updates color and shape of the inheritence graphs. Also adds
a dropshadow on hover instead of opacity change.
Graphviz broke upon trying to include svg buttons instead of png.
Looking for a solution.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before this commit, multiple invocations of universe.showRaw used a
shared weak map that caches footnotes. If the two printed objects
have equal components printed as footnotes, e.g., an equal TypeRef,
the result of the second invocation depends on whether the object
has been collected (and removed from the weak map) or not.
See https://github.com/scala/scala-dev/issues/70#issuecomment-171701671
|
| |\
| | |
| | | |
SI-9507 Make ArrayStack an IndexedSeqOptimized
|
| | |
| | |
| | |
| | | |
Just like `ArraySeq`, `ArrayBuffer` and all other collections that use an array as underlying data structure, `ArrayStack` should also be an instance of `IndexedSeq` and `IndexedSeqOptimized`. As expected by both of the traits, `ArrayStack` has constant-time random element access and length computation.
|
| |\ \
| | | |
| | | | |
SI-9622 Native method may be private
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This was lost in a refactor.
https://github.com/scala/scala/commit/290f687fb6ab91b6aef62d871036ddc3829f12b4
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Until now, the warning was only emitted for enums from Java class files.
This commit fixes it by
- aligning the flags set in JavaParsers with the flags set in
ClassfileParser (which are required by the pattern matcher to
even consider checking exhaustiveness)
- adding the enum members as childs to the class holding the enum
as done in ClassfileParser so that the pattern matcher sees the enum
members when looking for the sealed children of a type
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit addresses the need for an improved mobile viewing
experience. Specifically it introduces CSS media queries to adjust
sizing and indentation of elements on mobile devices. This includes
the following changes:
- replace absolute font sizing with relative font sizing
- fix font-resizing issues for mobile by fixing viewport
- hide related links when viewport too small
- fix missing trigram from heaven on Android
- remove indentation on annotations e.g. `@throws` and place associated
text on a separate line
- fix bottom scoll-bar appearing on code-snippets
- add spacing between entity icons in browser
- add dynamic top offset for entity description
- fix long entity names corrupting style
- remove "EXPERIMENTAL" button from shortcomment divs on mobile
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit adds a new look to scaladoc without changing its behaviour.
Features in this commit:
- New scaladoc look
- SVG icons instead of png for HiDPI displays
- Better layout of existing features
- Better title-bar colors for each entity type: trait, object, class
|
| |\ \
| | | |
| | | | |
Create a full Scala distribution from sbt [2.12]
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- ManMaker is compiled in a new subproject “manual”. A simple command
line runner complements the ant task so that it can be run from sbt.
- Another new subproject “scala-dist” is responsible for building
the scala-dist.jar artifact.
Conflicts:
build.sbt
|
| |\ \
| | | |
| | | | |
[SI-9454] Add isAlive method into sys.process.Process trait
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Language imports are preceding other imports
- Deleted empty file: InlineErasure
- Removed some unused private[parallel] methods in
scala/collection/parallel/package.scala
This removes hundreds of warnings when compiling with
"-Xlint -Ywarn-dead-code -Ywarn-unused -Ywarn-unused-import".
|
| |\ \ \
| | | | |
| | | | | |
Desugar module var and accessor in refchecks/lazyvals
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The `cond` tree is used in two places, so make it a by-name parameter
to create distinct Trees.
Also, remove a dangling comment.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Rather than leaving it until mixin.
The broader motivation is to simplify the mixin phase of the
compiler before we get rid of implementatation classes in
favour of using JDK8 default interface methods.
The current code in mixin is used for both lazy val and modules,
and puts the "slow path" code that uses the monitor into a
dedicated method (`moduleName$lzyCompute`). I tracked this
back to a3d4d17b77. I can't tell from that commit whether the
performance sensititivity was related to modules or lazy vals,
from the commit message I'd say the latter.
As the initialization code for a module is just a constructor call,
rather than an arbitraryly large chunk of code for a lazy initializer,
this commit opts to inline the `lzycompute` method.
During refchecks, mixin module accessors are added to classes, so
that mixed in and defined modules are translated uniformly. Trait
owned modules get an accessor method with an empty body (that shares
the module symbol), but no module var.
Defer synthesis of the double checked locking idiom to the lazyvals
phase, which gets us a step closer to a unified translation of
modules and lazy vals.
I had to change the `atOwner` methods to to avoid using the
non-existent module class of a module accessor method as the
current owner. This fixes a latent bug. Without this change,
retypechecking of the module accessor method during erasure crashes
with an accessibility error selecting the module var.
In the process, I've tweaked a tree generation utility method
to wvoid synthesizing redundant blocks in module desugaring.
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-9110 Pattern `O.C` must check `$outer eq O` for a top level O
|
| | | |_|/
| | |/| |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The outer check was not being generated when the prefix was a
top level module. The enclosed test shows that we in fact must
synthesize the outer check in that case.
Perhaps the bug was introduced by neglecting to consider that
a module can inherit member classes.
|
| | |_|/
| |/| | |
|
| |\ \ \
| | | | |
| | | | | |
IntelliJ README improvements
|
| | |/ /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* fix typo (`withing`)
* fix repeated text about bootstrapping
* fix bad Markdown (no blank line before bullet list)
* generally rewrite/reformat/overhaul
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fix a batch of code inspection recommendations generated by IntelliJ 14.1.5.
Categories of fix,
Unnecessary public modifier in interface
Replace filter+size with count
Replace filter+nonEmpty with exists
Replace filter+headOption with find
Replace `if (x != null) Some(x) else None` with Option(x)
Replace getOrElse null with orNull
Drop redundant semicolons
Replace anon fun with PF
Replace anon fun with method
|
| | |\ \ \
| | | | | |
| | | | | | |
Create a full Scala distribution from sbt
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- ManMaker is compiled in a new subproject “manual”. A simple command
line runner complements the ant task so that it can be run from sbt.
- Another new subproject “scala-dist” is responsible for building
the scala-dist.jar artifact.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
Clarify source of f function in TailCalls flatMap
|
| | | |_|/ /
| | |/| | | |
|
| | | | | | |
|
| |/ / / / |
|
| |\ \ \ \
| | | | | |
| | | | | | |
DRY-er trees in pattern matcher code gen.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Rather than building a cascade of if/elses, push additional conditions
into a conjunction in the condition of a single if/else. This is
possible when emitting conditions for the list of arguments of a
pattern.
Here's an example of the improvement to post-pattern matcher trees:
https://gist.github.com/retronym/0d8f7126157061d72b81
While we could try to rely on the optimizer to coalesce the repeated
else clauses, it seems wasteful to emit the code in that way in
the first place.
|
| |\ \ \ \ \
| | | |/ / /
| | |/| | | |
|
| | |\ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
janekdb/2.11.x-scaladoc-fix-one-off-dot-restart-note
Align DotRunner dot restart count with command option description
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is the command option description,
val docDiagramsDotRestart = IntSetting(
"-diagrams-dot-restart",
"The number of times to restart a malfunctioning dot process before disabling diagrams (default: 5)",
5,
None,
_ => None
)
Prior to this change dot was restarted four times instead of five. Maybe the
intention of the option was to allow a total number of attempts to be specified
but with 5 restarts we need 6 attempts. The local var was renamed to reflect this.
|
| | |\ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
janekdb/2.11.x-remove-lagged-scaladoc-setttings-notes
Remove notes about -doc-title and -doc-version not being used
|
| | | |/ / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Confirmed these options are used by editing build-ant-macros.xml and viewing
the output,
<scaladoc docRootContent="${src.dir}/@{project}/${@{project}.docroot}"
destdir="${build-docs.dir}/@{project}"
- doctitle="${@{project}.description}"
+ doctitle="${@{project}.description} - test-title"
docfooter="epfl"
- docversion="${version.number}"
+ docversion="${version.number} - test-version"
|
| | |\ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
janekdb/2.11.x-add-missing-scaladoc-commands-to-help-output
Add two missed scaladoc commands into scaladoc specific help section
|
| | | |/ / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Prior to this change these scaladoc options were buried in the scalac section
of the help text,
-doc-external-doc
-implicits-sound-shadowing
With this change the options are listed in the scaladoc section.
This will make the commands easier to discover.
|
| | |\ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
janekdb/2.11.x-scaladoc-excluded-classnames-more-data-like
Refactor excluded qname test to be more data like
|
| | | |/ / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This refactoring extracts data from code into a form which is closer to
configuration data.
This is a step change toward making this configurable.
|
| | |/ / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The Performance section got sucked into a wormhole and popped up in the
example tag. The laws of physics differ in the attributes block resulting
in the loss of the line break between the Time and Space paragraphs.
Fixed by moving the section out of the example tag.
|