| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have lots of core classes for which we need not go through
the symbol to get the type:
ObjectClass.tpe -> ObjectTpe
AnyClass.tpe -> AnyTpe
I updated everything to use the concise/direct version,
and eliminated a bunch of noise where places were calling
typeConstructor, erasedTypeRef, and other different-seeming methods
only to always wind up with the same type they would have received
from sym.tpe. There's only one Object type, before or after erasure,
with or without type arguments.
Calls to typeConstructor were especially damaging because (see
previous commit) it had a tendency to cache a different type than
the type one would find via other means. The two types would
compare =:=, but possibly not == and definitely not eq. (I still
don't understand what == is expected to do with types.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Confusing, now-it-happens now-it-doesn't mysteries lurk
in the darkness. When scala packages are declared like this:
package scala.collection.mutable
Then paths relative to scala can easily be broken via the unlucky
presence of an empty (or nonempty) directory. Example:
// a.scala
package scala.foo
class Bar { new util.Random }
% scalac ./a.scala
% mkdir util
% scalac ./a.scala
./a.scala:4: error: type Random is not a member of package util
new util.Random
^
one error found
There are two ways to play defense against this:
- don't use relative paths; okay sometimes, less so others
- don't "opt out" of the scala package
This commit mostly pursues the latter, with occasional doses
of the former.
I created a scratch directory containing these empty directories:
actors annotation ant api asm beans cmd collection compat
concurrent control convert docutil dtd duration event factory
forkjoin generic hashing immutable impl include internal io
logging macros man1 matching math meta model mutable nsc parallel
parsing partest persistent process pull ref reflect reify remote
runtime scalap scheduler script swing sys text threadpool tools
transform unchecked util xml
I stopped when I could compile the main src directories
even with all those empties on my classpath.
|
| |
|
|
|
|
|
|
|
|
|
| |
A dizzying number of unused imports, limited to files
in src/compiler. I especially like that the unused import
option (not quite ready for checkin itself) finds places
where feature implicits have been imported which are no
longer necessary, e.g. this commit includes half a dozen
removals of "import scala.language.implicitConversions".
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit 'refs/pull/1574/head': (24 commits)
Fixing issue where OSGi bundles weren't getting used for distribution.
Fixes example in Type.asSeenFrom
Fix for SI-6600, regression with ScalaNumber.
SI-6562 Fix crash with class nested in @inline method
Brings copyrights in Scaladoc footer and manpage up-to-date, from 2011/12 to 2013
Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013
SI-6606 Drops new icons in, replaces abstract types placeholder icons
SI-6132 Revisited, cleaned-up, links fixed, spelling errors fixed, rewordings
Labeling scala.reflect and scala.reflect.macros experimental in the API docs
Typo-fix in scala.concurrent.Future, thanks to @pavelpavlov
Remove implementation details from Position (they are still under reflection.internal). It probably needs more cleanup of the api wrt to ranges etc but let's leave it for later
SI-6399 Adds API docs for Any and AnyVal
Removing actors-migration from main repository so it can live on elsewhere.
Fix for SI-6597, implicit case class crasher.
SI-6578 Harden against synthetics being added more than once.
SI-6556 no assert for surprising ctor result type
Removing actors-migration from main repository so it can live on elsewhere.
Fixes SI-6500 by making erasure more regular.
Modification to SI-6534 patch.
Fixes SI-6559 - StringContext not using passed in escape function.
...
Conflicts:
src/actors-migration/scala/actors/migration/StashingActor.scala
src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
src/compiler/scala/tools/nsc/settings/AestheticSettings.scala
src/compiler/scala/tools/nsc/transform/Erasure.scala
src/library/scala/Application.scala
src/library/scala/collection/immutable/GenIterable.scala.disabled
src/library/scala/collection/immutable/GenMap.scala.disabled
src/library/scala/collection/immutable/GenSeq.scala.disabled
src/library/scala/collection/immutable/GenSet.scala.disabled
src/library/scala/collection/immutable/GenTraversable.scala.disabled
src/library/scala/collection/mutable/GenIterable.scala.disabled
src/library/scala/collection/mutable/GenMap.scala.disabled
src/library/scala/collection/mutable/GenSeq.scala.disabled
src/library/scala/collection/mutable/GenSet.scala.disabled
src/library/scala/collection/mutable/GenTraversable.scala.disabled
src/library/scala/collection/parallel/immutable/ParNumericRange.scala.disabled
|
| | |
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
src/compiler/scala/tools/nsc/ast/TreeGen.scala
src/compiler/scala/tools/nsc/settings/AestheticSettings.scala
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
```
|
|/
|
|
|
|
|
|
| |
enteringPhase and exitingPhase are our unambiguously named
phase time travel methods. atPhase is deprecated. Other methods
and uses have all been brought into line with that.
Review by @lrytz.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I guess these are self-explanatory.
@inline final def afterErasure[T](op: => T): T = afterPhase(currentRun.erasurePhase)(op)
@inline final def afterExplicitOuter[T](op: => T): T = afterPhase(currentRun.explicitouterPhase)(op)
...
@inline final def beforeTyper[T](op: => T): T = beforePhase(currentRun.typerPhase)(op)
@inline final def beforeUncurry[T](op: => T): T = beforePhase(currentRun.uncurryPhase)(op)
This commit is basically pure substitution. To get anywhere interesting
with all the phase-related bugs we have to determine why we use atPhase
and capture that reasoning directly. With the exception of erasure, most
phases don't have much meaning outside of the compiler. How can anyone
know why a block of code which says atPhase(explicitouter.prev) { ... }
needs to run there? Too much cargo cult, and it should stop. Every usage
of atPhase should be commented as to intention.
It's easy to find bugs like
atPhase(uncurryPhase.prev)
which was probably intended to run before uncurry, but actually runs
before whatever happens to be before uncurry - which, luckily enough, is
non-deterministic because the continuations plugin inserts phases
between refchecks and uncurry.
% scalac -Xplugin-disable:continuations -Xshow-phases
refchecks 7 reference/override checking, translate nested objects
uncurry 8 uncurry, translate function values to anonymous classes
% scalac -Xshow-phases
selectivecps 9
uncurry 10 uncurry, translate function values to anonymous classes
Expressions like atPhase(somePhase.prev) are never right or are at best
highly suboptimal, because most of the time you have no guarantees about
what phase precedes you. Anyway, I think most or all atPhases expressed
that way only wanted to run before somePhase, and because one can never
be too sure without searching for documentation whether "atPhase" means
before or after, people err on the side of caution and overshoot by a
phase. Unfortunately, this usually works. (I prefer bugs which never work.)
|
|
|
|
|
| |
4th round of clean ups (see r25293, r25285, r25292)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I wrote a warning when nullary methods return Unit. I wimped out of
including it in this patch because we had about 200 of them, and that's
what is fixed in this patch. I will add the warning to some kind of
"-Xlint" feature after 2.9.
This is motivated at least partly by the resolution of #4506, which
indicates the distinction between "def foo()" and "def foo" will
continue to jab its pointy stick into our eyes, so I believe we have a
minimal duty of at least following our own advice about what they mean
and not making a semirandom choice as to whether a method has parens or
not. Review by community.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Imported sbt.Process into trunk, in the guise of package
scala.sys.process. It is largely indistinguishable from the version in
sbt, at least from the outside.
Also, I renamed package system to sys. I wanted to do that from the
beginning and the desire has only grown since then. Sometimes a short
identifier is just critical to usability: with a function like error("")
called from hundreds of places, the difference between system.error and
sys.error is too big. sys.error and sys.exit have good vibes (at least
as good as the vibes can be for functions which error and exit.)
Note: this is just the first cut. I need to check this in to finish
fixing partest. I will be going over it with a comb and writing
documentation which will leave you enchanted, as well as removing other
bits which are now redundant or inferior. No review.
|
|
|
|
|
|
| |
Some accumulated cleanup done while profiling and reducing uses of
length. No review.
|
|
|
|
|
|
|
|
| |
Turned an assert/compiler crash into an error message. Admittedly the
error output is still terrible (the XML positioning looks like it came
from an RNG) but more helpful than the crash. Also misc advantage of a
handy new method. Closes #4069, no review.
|
| |
|
|
|
|
|
| |
Removed more than 3400 svn '$Id' keywords and related junk.
|
|
|
|
|
|
|
|
|
| |
As a brief diversion from real work, implemented Damerau–Levenshtein
and ran it on trunk to elicit obvious misspellings. Unfortunately
they're mostly in places like compiler comments which real people never
see, but I fixed them anyway. All those English Lit majors who peruse
our sources are sure to be pleased. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added ## method to Any as our scala hashCode method which provides
consistent answers for primitive types. And I'm sure we're all tired of
new starrs, but it's hard to add a method to Any without one. This patch
only brings ## into existence, but nothing calls it yet.
// some true assertions
scala> assert(5.5f.## == 5.5f.hashCode)
scala> assert(5.0f.## != 5.0f.hashCode && 5.0f.## == 5L.##)
No review. (Already reviewed by odersky.)
|
| |
|
|
|
|
|
|
| |
Some organization & duplication removal in GenICode stemming from
optimizer appeasement.
|
|
|
|
|
|
|
|
| |
This patch represents breaking out bits of code generation related to
equality so that I can log what they're doing and easily alter them; to
that end there is some code generation refactoring and a couple minor
XML issues that came up.
|
|
|
|
|
| |
Some minor logic simplifying falling out of equality work.
|
| |
|
|
|
|
|
|
|
| |
consistent and reasonably aesthetic naming scheme for operators. Making
progress on consolidating the several different places where code
generation logic has been partially encapsulated.
|
|
|
|
|
|
| |
Removed unused Any_asInstanceOfErased and Any_isInstanceOfErased
variations on is/as.
|
|
|
|
|
|
| |
Riffing off the removal of the cldc library, removed forCLDC and its
special cases. Not as much fun as removing inIDE, but still fun.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Fixed bug ivolving corecions and default conversions.
|
| |
|
|
|
|
|
| |
removed leading/trailing tabs/blanks in scala/concurrent/*.scala
|
| |
|
|
|
|
|
|
| |
Removed the source for the primitive types; create them in the compiler
(in class Definitions) instead
|
| |
|
|
|
|
|
| |
[backend] Do not treat equals,hashCode,toString as primitive operations
|
|
Switching to the new build system and to the new build system. This is a
MAJOR commit, so be careful when updating.
|