| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
s/exist status/exit status/
|
| |
|
|
|
|
| |
and fix a typo while we're at it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Essentially, we fuse mixin and lazyvals into the fields phase.
With fields mixing in trait members into subclasses, we
have all info needed to compute bitmaps, and thus we can
synthesize the synchronisation logic as well.
By doing this before erasure we get better signatures,
and before specialized means specialized lazy vals work now.
Mixins is now almost reduced to its essence: implementing
super accessors and forwarders. It still synthesizes
accessors for param accessors and early init trait vals.
Concretely, trait lazy vals are mixed into subclasses
with the needed synchronization logic in place, as do
lazy vals in classes and methods. Similarly, modules
are initialized using double checked locking.
Since the code to initialize a module is short,
we do not emit compute methods for modules (anymore).
For simplicity, local lazy vals do not get a compute method either.
The strange corner case of constant-typed final lazy vals
is resolved in favor of laziness, by no longer assigning
a constant type to a lazy val (see widenIfNecessary in namers).
If you explicitly ask for something lazy, you get laziness;
with the constant-typedness implicit, it yields to the
conflicting `lazy` modifier because it is explicit.
Co-Authored-By: Lukas Rytz <lukas@lightbend.com>
Fixes scala/scala-dev#133
Inspired by dotc, desugar a local `lazy val x = rhs` into
```
val x$lzy = new scala.runtime.LazyInt()
def x(): Int = {
x$lzy.synchronized {
if (!x$lzy.initialized) {
x$lzy.initialized = true
x$lzy.value = rhs
}
x$lzy.value
}
}
```
Note that the 2.11 decoding (into a local variable and a bitmap) also
creates boxes for local lazy vals, in fact two for each lazy val:
```
def f = {
lazy val x = 0
x
}
```
desugars to
```
public int f() {
IntRef x$lzy = IntRef.zero();
VolatileByteRef bitmap$0 = VolatileByteRef.create((byte)0);
return this.x$1(x$lzy, bitmap$0);
}
private final int x$lzycompute$1(IntRef x$lzy$1, VolatileByteRef bitmap$0$1) {
C c = this;
synchronized (c) {
if ((byte)(bitmap$0$1.elem & 1) == 0) {
x$lzy$1.elem = 0;
bitmap$0$1.elem = (byte)(bitmap$0$1.elem | 1);
}
return x$lzy$1.elem;
}
}
private final int x$1(IntRef x$lzy$1, VolatileByteRef bitmap$0$1) {
return (byte)(bitmap$0$1.elem & 1) == 0 ?
this.x$lzycompute$1(x$lzy$1, bitmap$0$1) : x$lzy$1.elem;
}
```
An additional problem with the above encoding is that the `lzycompute`
method synchronizes on `this`. In connection with the new lambda
encoding that no longer generates anonymous classes, captured lazy vals
no longer synchronize on the lambda object.
The new encoding solves this problem (scala/scala-dev#133)
by synchronizing on the lazy holder.
Currently, we don't exploit the fact that the initialized field
is `@volatile`, because it's not clear the performance is needed
for local lazy vals (as they are not contended, and as soon as
the VM warms up, biased locking should deal with that)
Note, be very very careful when moving to double-checked locking,
as this needs a different variation than the one we use for
class-member lazy vals. A read of a volatile field of a class
does not necessarily impart any knowledge about a "subsequent" read
of another non-volatile field of the same object. A pair of
volatile reads and write can be used to implement a lock, but it's
not clear if the complexity is worth an unproven performance gain.
(Once the performance gain is proven, let's change the encoding.)
- don't explicitly init bitmap in bytecode
- must apply method to () explicitly after uncurry
|
|\
| |
| |
| | |
Resolved conflicts as in b0e05b67c7
|
| |
| |
| |
| | |
The formatting style is based on -g and -target.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
merge/2.11.x-to-2.12.x-20160225
Conflicts:
scripts/jobs/integrate/bootstrap
src/build/maven/scala-actors-pom.xml
test/files/pos/t3420.flags
Conflicts were trivial to resolve.
|
| |
| |
| |
| |
| |
| |
| | |
GIJ is uncommonly used so general guidance on setting memory configuration
in the fsc, scala and scalac man pages would only be of use to a highly
select group of individuals. For 99.99999999999999% of users this info
would be an historical curio at best and random noise at worst.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
- 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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Any.scala: Link to the guide instead of the SIP.
- AnyVal.scala: Remove SIP link and align guide link to Any.scala.
- Commands.scala: Use a less out of date team link.
- Logic.scala: Link was broken. Substitute found.
- Process.scala: Links were 403 & 404. Fixed as this is a code sample.
- TypeMaps.scala: Move old EPFL Trac to JIRA.
- RedBlackTree.scala: Replaced broken link with substitutes based on site maintainer input [1].
[1] When asked where Data-Set-RBTree.html had gone Don@UNSW advised
"I think it's on the Haskell wiki now. It was Chris Okazaki's version".
The closest I could find to what this document probably was is this
paper by Hinze edited by Okasaki,
http://www.cs.ox.ac.uk/ralf.hinze/publications/WAAAPL99b.ps.gz
The paper cites the Okasaki document so I included a link to that as
well.
The Haskell Wiki does have a link to a RB document but that's broken
too,
https://wiki.haskell.org/Research_papers/Data_structures >
Constructing red-black trees
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
merge/2.11.x-to-2.12.x-20150713
Conflicts:
src/eclipse/partest/.classpath
src/eclipse/repl/.classpath
test/files/run/nothingTypeNoFramesNoDce.scala
test/files/run/repl-javap-app.check
Also fixup two .classpath files with updated partest, xml and
parser combinators JARs.
|
| | |
|
| |
| |
| |
| | |
We neglected to do this earlier.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Require Java 8 in ant build
- use -source 1.8 and -target 1.8 for javac
- Default scalac's -target to `jvm-1.8`, ignore and deprecate attempts
to use `jvm-1.{6.7}`
- Remove fragile javap-app test. The feature itself is slated for removal.
- Remove obsolete Java6 checkfile
- Adapt DCE tests
- Remove deprecated/redundant -target:jvm-1.6 from flags where the
intent was to trigger generation of stack map frames.
- Remove tests with -target:jvm-1.5 that tested without stack
map frames
- Ignore OpenJDK JVM warnings (via test/[files|scaladoc]/filters).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit corrects many typos found in scaladocs, comments and
documentation. It should reduce a bit number of PRs which fix one
typo.
There are no changes in the 'real' code except one corrected name of
a JUnit test method and some error messages in exceptions. In the case
of typos in other method or field names etc., I just skipped them.
Obviously this commit doesn't fix all existing typos. I just generated
in IntelliJ the list of potential typos and looked through it quickly.
|
|\
| |
| | |
add -Xsource:version to scalac man page
|
| |
| |
| |
| | |
The flag was added in d43618a (PR #3340) by @huitseeker.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Take away `argv` and make `args` the standard parameter name.
This is a quick fix to avoid "unused local" lint error. All
the examples use `args`; in particular, "Step 4. Write some
Scala scripts" in "Programming in Scala" uses `args`.
I see the footnote there is also where Odersky concatenation is
specified, `"Hello, "+ args(0) +"!"` with no space next to the
literals.
Also removes `argv` from `StdNames`. Was torn whether just to
add `argc`. Maybe start a new project to house Names, emeritus.
|
|
|
|
|
| |
They had fallen quite a bit behind the output of
"scalac -X" and "scalac -Xshow-phases".
|
| |
|
|
|
|
|
|
|
| |
Most of this was revealed via -Xlint with a flag which assumes
closed world. I can't see how to check the assumes-closed-world
code in without it being an ordeal. I'll leave it in a branch in
case anyone wants to finish the long slog to the merge.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/compiler/scala/tools/nsc/doc/Settings.scala
src/compiler/scala/tools/nsc/interpreter/CompletionOutput.scala
src/compiler/scala/tools/nsc/matching/Patterns.scala
src/compiler/scala/tools/nsc/transform/UnCurry.scala
src/compiler/scala/tools/nsc/typechecker/Infer.scala
src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/reflect/scala/reflect/internal/settings/MutableSettings.scala
src/reflect/scala/reflect/runtime/Settings.scala
src/swing/scala/swing/SwingActor.scala
src/swing/scala/swing/SwingWorker.scala
test/files/run/t6955.scala
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
| |
It lives on in a branch born from this commit's parent.
It's abrupt; no attempt is made to offer a "smooth transition"
for the serious msil userbase, population zero. If anyone feels
very strongly that such a transition is necessary, I will be
happy to talk you into feeling differently.
|
|\ |
|
| |
| |
| |
| | |
2013
|
| | |
|
|/
|
|
| |
so don't include them in external documentation setting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are the regexp replacements performed:
Sxcala
-> Scala
Copyright (\d*) LAMP/EPFL
-> Copyright $1-2012 LAMP/EPFL
Copyright (\d*)-(\d*)(,?) LAMP/EPFL
-> Copyright $1-2012 LAMP/EPFL
Copyright (\d*)-(\d*) Scala Solutions and LAMP/EPFL
-> Copyright $1-2012 Scala Solutions and LAMP/EPFL
\(C\) (\d*)-(\d*) LAMP/EPFL
-> (C) $1-2012 LAMP/EPFL
Copyright \(c\) (\d*)-(\d*)(.*?)EPFL
-> Copyright (c) $1-2012$3EPFL
The last one was needed for two HTML-ified copyright notices.
Here's the summarized diff:
Created using
```
git diff -w | grep ^- | sort | uniq | mate
git diff -w | grep ^+ | sort | uniq | mate
```
```
- <div id="footer">Scala programming documentation. Copyright (c) 2003-2011 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div>
- copyright.string=Copyright 2002-2011, LAMP/EPFL
- <meta name="Copyright" content="(C) 2002-2011 LAMP/EPFL"/>
- * Copyright 2002-2011 LAMP/EPFL
- * Copyright 2004-2011 LAMP/EPFL
- * Copyright 2005 LAMP/EPFL
- * Copyright 2005-2011 LAMP/EPFL
- * Copyright 2006-2011 LAMP/EPFL
- * Copyright 2007 LAMP/EPFL
- * Copyright 2007-2011 LAMP/EPFL
- * Copyright 2009-2011 Scala Solutions and LAMP/EPFL
- * Copyright 2009-2011 Scxala Solutions and LAMP/EPFL
- * Copyright 2010-2011 LAMP/EPFL
- * Copyright 2012 LAMP/EPFL
-# Copyright 2002-2011, LAMP/EPFL
-* Copyright 2005-2011 LAMP/EPFL
-/* NSC -- new Scala compiler -- Copyright 2007-2011 LAMP/EPFL */
-rem # Copyright 2002-2011, LAMP/EPFL
```
```
+ <div id="footer">Scala programming documentation. Copyright (c) 2003-2012 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div>
+ copyright.string=Copyright 2002-2012 LAMP/EPFL
+ <meta name="Copyright" content="(C) 2002-2012 LAMP/EPFL"/>
+ * Copyright 2002-2012 LAMP/EPFL
+ * Copyright 2004-2012 LAMP/EPFL
+ * Copyright 2005-2012 LAMP/EPFL
+ * Copyright 2006-2012 LAMP/EPFL
+ * Copyright 2007-2012 LAMP/EPFL
+ * Copyright 2009-2012 Scala Solutions and LAMP/EPFL
+ * Copyright 2010-2012 LAMP/EPFL
+ * Copyright 2011-2012 LAMP/EPFL
+# Copyright 2002-2012 LAMP/EPFL
+* Copyright 2005-2012 LAMP/EPFL
+/* NSC -- new Scala compiler -- Copyright 2007-2012 LAMP/EPFL */
+rem # Copyright 2002-2012 LAMP/EPFL
```
|
| |
|
|
|
|
|
|
|
| |
Removed all the trailing whitespace to make eugene happier.
Will try to keep it that way by protecting at the merge level.
Left the tabs in place because they can't be uniformly changed
to spaces, some are 2, some are 4, some are 8, whee.
|
|
|
|
|
|
|
|
| |
The EmitHtmlPage and EmitManPage utilities now write to a file
if there is more than one argument on the command line.
This allows the SBT build to fork them and still generate
a file without having to capture the output stream.
|
|
|
|
|
| |
updated man pages, fixed svn props, did some cleanup
|
|
|
|
|
| |
cleanups (scaladoc 2, deprecation warnings, trailing blanks)
|
| |
|
|
|
|
|
| |
We migrated the Scala wiki from Trac to Confluence. Review by rytz.
|
|
|
|
|
| |
We rename Trac and start using JIRA as the issue tracking system.
|
| |
|
| |
|
|
|
|
|
|
| |
Reverts r23174, which I believe will bring the build back to life. It
only chokes under -optimise. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
patches for #3887 and #3888, but I determined that I could achieve the
same effect by deleting a bunch of code, so I did. This left only a few
lines in TransMatch, so I eliminated it, which led me to remember that
many places still reference non-existent phase transmatch, so those were
updated. Notes:
* This swaps equality tests on stable identifier patterns. They
have never conformed to the spec (as noted long ago in ticket #785)
which says "The pattern matches any value v such that r == v" whereas
until now the test being performed was v == r.
* An issue was introduced with specialization in that the implementation
of "isTupleType" in Definitions relied upon sym == TupleClass(elems.length).
This test is untrue for specialized tuples, causing mysterious behavior
because only some tuples are specialized. There is now "isTupleTypeOrSubtype"
although it seems likely the former implementation is unnecessary.
The issue is sidestepped if one uses "getProductArgs" to retrieve the element
types because it sifts through the base types for the Product symbol.
Closes #3887 and #3888, review by dmharrah.
|
| |
|
|
|
|
|
|
| |
[scaladoc] Fixed typo in Scaladoc man page (thanks Stéphane). No
review.
|
| |
|
|
|
|
|
| |
Removed more than 3400 svn '$Id' keywords and related junk.
|
| |
|