Skip to content

Commit c5a14a5

Browse files
committed
Merge branch '2.9.x' of github.com:scala/scala into 2.9.x
2 parents 313d1a6 + cb9a968 commit c5a14a5

File tree

15 files changed

+92
-109
lines changed

15 files changed

+92
-109
lines changed

build.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,10 @@ INITIALISATION
257257
</condition>
258258

259259
<exec osfamily="unix" executable="tools/get-scala-commit-sha" outputproperty="git.commit.sha" failifexecutionfails="false" />
260-
<exec osfamily="windows" executable="tools/get-scala-commit-sha.bat" outputproperty="git.commit.sha" failifexecutionfails="false" />
261260
<exec osfamily="unix" executable="tools/get-scala-commit-date" outputproperty="git.commit.date" failifexecutionfails="false" />
262-
<exec osfamily="windows" executable="tools/get-scala-commit-date.bat" outputproperty="git.commit.date" failifexecutionfails="false" />
263-
<exec osfamily="unix" executable="tools/get-scala-commit-drift" outputproperty="git.commit.drift" failifexecutionfails="false" />
264-
<exec osfamily="windows" executable="tools/get-scala-commit-drift.bat" outputproperty="git.commit.drift" failifexecutionfails="false" />
265261
<!-- some default in case something went wrong getting the revision -->
266-
<property name="git.describe" value="-unknown-"/>
262+
<property name="git.commit.sha" value="unknown"/>
263+
<property name="git.commit.date" value="unknown"/>
267264

268265
<property name="init.avail" value="yes"/>
269266

@@ -273,7 +270,7 @@ INITIALISATION
273270
value="${version.major}.${version.minor}.${version.patch}${version.suffix}${maven.version.suffix}"/>
274271
<property
275272
name="version.number"
276-
value="${maven.version.number}-${git.commit.date}-${git.commit.drift}-${git.commit.sha}"/>
273+
value="${version.major}.${version.minor}.${version.patch}${version.suffix}-${git.commit.date}-${git.commit.sha}"/>
277274
<property
278275
name="osgi.version.number"
279276
value="${version.major}.${version.minor}.${version.patch}.v${git.commit.date}${version.suffix}-${git.commit.sha}"/>
@@ -307,6 +304,8 @@ INITIALISATION
307304
<echo message=" java args: ${env.ANT_OPTS} ${jvm.opts}" />
308305
<echo message=" javac args: ${javac.args}" />
309306
<echo message=" scalac args: ${scalac.args}" />
307+
<echo message=" git date: ${git.commit.date}" />
308+
<echo message=" git hash: ${git.commit.sha}" />
310309
<echo message=" maven version: ${maven.version.number}"/>
311310
<echo message=" OSGi version: ${osgi.version.number}" />
312311
<echo message="canonical version: ${version.number}" />
@@ -1555,7 +1554,7 @@ DOCUMENTATION
15551554
<taskdef name="genman"
15561555
classname="scala.tools.docutil.ManMaker"
15571556
classpathref="manual.classpath"/>
1558-
<genman command="fsc, sbaz, scala, scalac, scaladoc, scalap"
1557+
<genman command="fsc, scala, scalac, scaladoc, scalap"
15591558
htmlout="${build-docs.dir}/manual/html"
15601559
manout="${build-docs.dir}/manual/genman"/>
15611560
<!-- On Windows source and target files can't be the same ! -->

docs/README

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
Scala Software Distributions
33
----------------------------
44

5-
- scala-<major>.<minor>.<patch>.tar.bz2 Unix distribution
6-
- scala-<major>.<minor>.<patch>.tar.gz Unix distribution
5+
- scala-<major>.<minor>.<patch>.tgz Unix distribution
76
- scala-<major>.<minor>.<patch>.zip Windows distribution
87

98
The standard distributions require Java 1.5 or above. If you don't
@@ -32,15 +31,10 @@ directly accessible.
3231

3332
You may test the distribution by running the following commands:
3433

35-
$ ./bin/sbaz install scala-devel-docs
36-
$ ./bin/scalac doc/scala-devel-docs/examples/sort.scala
37-
$ ./bin/scala examples.sort
38-
[6,2,8,5,1]
39-
[1,2,5,6,8]
4034
$ ./bin/scala
41-
scala> examples.sort.main(null)
42-
[6,2,8,5,1]
43-
[1,2,5,6,8]
35+
scala> Array(4,3,2,1).sorted
36+
res0: Array[Int] = Array(1, 2, 3, 4)
37+
4438
scala>:quit
4539
$
4640

src/actors/scala/actors/scheduler/ThreadPoolConfig.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private[actors] object ThreadPoolConfig {
4545

4646
// on IBM J9 1.6 do not use ForkJoinPool
4747
// XXX this all needs to go into Properties.
48-
isJavaAtLeast("1.6") && ((javaVmVendor contains "Sun") || (javaVmVendor contains "Apple"))
48+
isJavaAtLeast("1.6") && ((javaVmVendor contains "Oracle") || (javaVmVendor contains "Sun") || (javaVmVendor contains "Apple"))
4949
})
5050
catch {
5151
case _: SecurityException => false

src/build/pack.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ MAIN DISTRIBUTION PACKAGING
7373
<exclude name="logs/**"/>
7474
<exclude name="sandbox/**"/>
7575
<exclude name="test/partest"/>
76+
<exclude name=".git"/>
7677
</tarfileset>
7778
<tarfileset dir="${basedir}" prefix="scala-${version.number}-sources" filemode="755">
7879
<include name="test/partest"/>

src/compiler/scala/tools/ant/templates/tool-unix.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ function restoreSttySettings() {
2525
function onExit() {
2626
if [[ "$saved_stty" != "" ]]; then
2727
restoreSttySettings
28-
exit $scala_exit_status
2928
fi
29+
exit $scala_exit_status
3030
}
3131

3232
# to reenable echo if we are interrupted before completing.

src/library/scala/collection/mutable/FlatHashTable.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ trait FlatHashTable[A] extends FlatHashTable.HashUtils[A] {
231231
else java.util.Arrays.fill(sizemap, 0)
232232
}
233233

234-
private[collection] final def totalSizeMapBuckets = if (sizeMapBucketSize < table.length) 1 else table.length / sizeMapBucketSize
234+
private[collection] final def totalSizeMapBuckets = (table.length - 1) / sizeMapBucketSize + 1
235235

236236
protected def calcSizeMapSize(tableLength: Int) = (tableLength >> sizeMapBucketBitSize) + 1
237237

@@ -264,7 +264,7 @@ trait FlatHashTable[A] extends FlatHashTable.HashUtils[A] {
264264
}
265265

266266
private[collection] def printSizeMap() {
267-
println(sizemap.toList)
267+
println(sizemap.mkString("szmap: [", ", ", "]"))
268268
}
269269

270270
protected def sizeMapDisable() = sizemap = null

src/library/scala/collection/mutable/HashSet.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ extends Set[A]
5757
def contains(elem: A): Boolean = containsEntry(elem)
5858

5959
def += (elem: A): this.type = { addEntry(elem); this }
60+
6061
def -= (elem: A): this.type = { removeEntry(elem); this }
6162

6263
override def par = new ParHashSet(hashTableContents)
6364

6465
override def add(elem: A): Boolean = addEntry(elem)
66+
6567
override def remove(elem: A): Boolean = removeEntry(elem).isDefined
6668

6769
override def clear() = clearTable()

src/library/scala/collection/parallel/package.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ package object parallel {
4848
private[parallel] def getTaskSupport: TaskSupport =
4949
if (util.Properties.isJavaAtLeast("1.6")) {
5050
val vendor = util.Properties.javaVmVendor
51-
if ((vendor contains "Sun") || (vendor contains "Apple")) new ForkJoinTaskSupport
51+
if ((vendor contains "Oracle") || (vendor contains "Sun") || (vendor contains "Apple")) new ForkJoinTaskSupport
5252
else new ThreadPoolTaskSupport
5353
} else new ThreadPoolTaskSupport
5454

test/files/run/t4895.scala

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
3+
4+
5+
object Test {
6+
7+
def checkPar(sz: Int) {
8+
import collection._
9+
val hs = mutable.HashSet[Int]() ++ (1 to sz)
10+
assert(hs.par.map(_ + 1).seq.toSeq.sorted == (2 to (sz + 1)))
11+
}
12+
13+
def main(args: Array[String]) {
14+
for (i <- 0 until 100) checkPar(i)
15+
for (i <- 100 until 1000 by 50) checkPar(i)
16+
for (i <- 1000 until 10000 by 500) checkPar(i)
17+
for (i <- 10000 until 100000 by 5000) checkPar(i)
18+
}
19+
20+
}

tools/get-scala-commit-date

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
[[ $# -eq 0 ]] || cd "$1"
1212

1313
lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
14+
lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
1415

1516
# 20120324
16-
echo "${lastcommitdate//-/}"
17+
echo "${lastcommitdate//-/}-${lastcommithours//:/}"

0 commit comments

Comments
 (0)