summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* SI-7110 Warn about naked try without catch/finallyJason Zaugg2013-03-294-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, this was allowed: scala> try ( 1 / 0 ) java.lang.ArithmeticException: / by zero But since the advent of util.Try, the subtle difference to the following seems dangerous: scala> import util.Try import util.Try scala> Try ( 1 / 0 ) res4: scala.util.Try[Int] = Failure(java.lang.ArithmeticException: / by zero) Discussion: https://groups.google.com/d/topic/scala-language/fy2vXD_3fF8/discussion There was some concern that this curtails a handy, temporary way to remove the exception handlers from some code. But after thinking about this, I contend that: a) those people can easily stomach the warning temporarily (modulo, of course, those with -Xfatal-warnings.) b) putting this warning behind Xlint will disable it for those who need it most: beginners. I also chose not to refer to 'scala.util.Try' in the error message as I think that has as much potential to confuse as it does to clarify.
* Merge pull request #2316 from vigdorchik/interactive_test_frameworkPaul Phillips2013-03-294-16/+7
|\ | | | | Improve testing interactive experience.
| * Improve testing interactive experience.Eugene Vigdorchik2013-03-264-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the exceptions that happen in the test are swallowed, as the JVM is forced to exit before printing the stack trace. Also assert message doesn't contain information about the problem. The call to "sys.exit" masks bugs in the testing framework, that has to be addressed more elaborately, so here we remove it. Also add the message parameter to assert to make it more informative. After removing "sys.exit" call, doc test starts failing. I suspect there might be a problem when expanding doc variables, but this should be addressed separately.
* | Merge pull request #2333 from paulp/pr/merge-395e90a786Paul Phillips2013-03-2918-120/+228
|\ \ | | | | | | Merge 2.10.x (through 395e90a786) into master.
| * \ Merge commit '395e90a786' into pr/merge-395e90a786Paul Phillips2013-03-2818-119/+227
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '395e90a786': SI-7251, compiler crash with $. SI-7240 fixes language feature lookup SI-7233 Account for aliased imports in Erasure SI-7233 Account for aliased imports in eta expansion. SI-7132 - don't discard Unit type in interpreter SI-6725 `f` interpolator now supports %n tokens Conflicts: src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala src/repl/scala/tools/nsc/interpreter/ExprTyper.scala
| | * | SI-7251, compiler crash with $.Paul Phillips2013-03-164-127/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to assert our way out of tight spots, we can issue an error. Or so I once thought. It turns out lots of assertions have been disappearing before being heard thanks to "case t: Throwable". Under such conditions, a failed assertion is a no-op, but an error is an error. The crash associated with SI-7251 is best avoided by removing the assertion, which allows an error to be issued in the normal course of events. In the course of trying to figure out the above, I cleaned up ClassfileParser somewhat.
| | * | Merge pull request #2234 from scalamacros/ticket/7240Paul Phillips2013-03-125-2/+53
| | |\ \ | | | | | | | | | | SI-7240 fixes language feature lookup
| | | * | SI-7240 fixes language feature lookupEugene Burmako2013-03-125-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As I discovered today, Definitions.getMember have a fallback clause, which accounts for the phases which have inner classes flattened. This fallback uses nme.flattenedName to compute a flattened name, but unfortunately nme.flattenedName produces a TermName, not a TypeName, which means that the fallback will commence search in a wrong namespace with predictable results. The commit also changes another usage of nme.flattenedName in a type name context. That one was correctly converting a TermName result to TypeName, so this is not a bugfix, but just a refactoring for the sake of being consistent.
| | * | | Merge pull request #2230 from retronym/ticket/7233Paul Phillips2013-03-124-1/+24
| | |\ \ \ | | | | | | | | | | | | SI-7233 Account for aliased imports in EtaExpansion / Erasure
| | | * | | SI-7233 Account for aliased imports in ErasureJason Zaugg2013-03-102-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | When we discard the fiction of `scala.Any`.
| | | * | | SI-7233 Account for aliased imports in eta expansion.Jason Zaugg2013-03-102-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buggy: treeCopy.Select(sel, sel.qual, sel.name) setSymbol null Select(sel, sel.qual, sel.name) Okay: treeCopy.Select(sel, sel.qual, sel.name) Select(sel, sel.qual, sel.symbol.name) // but doesn't copyAttrs! It is an easy mistake to make, I've found one more occurance: def foo(a: Any) = { import a.{toString => toS}; toS } error: uncaught exception during compilation: scala.reflect.internal.FatalError scala.reflect.internal.FatalError: class Object does not have a member toS at scala.reflect.internal.Definitions$DefinitionsClass.scala$reflect$internal$Definitions$DefinitionsClass$$fatalMissingSymbol(Definitions.scala:1028) A followup commit will address that problem.
| | * | | | Merge pull request #2222 from scalamacros/ticket/6725Paul Phillips2013-03-125-1/+23
| | |\ \ \ \ | | | | | | | | | | | | | | SI-6725 `f` interpolator now supports %n tokens
| | | * | | | SI-6725 `f` interpolator now supports %n tokensEugene Burmako2013-03-095-1/+23
| | | | |/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the `f` interpolator supports format specifiers which specify conversions for formatted arguments. However Java formatting is not limited to argument-related conversions as explained in: http://docs.oracle.com/javase/6/docs/api/java/util/Formatter.html#detail. Conversions which don't correspond to any arguments are `%` (used to emit verbatim `'%'` characters) and `n` (used to emit platform-specific line separators). Of those only the former is supported, and this patch fixes the oversight.
| | * | | | Merge pull request #2227 from mergeconflict/2.10.x-SI-7132Paul Phillips2013-03-123-15/+22
| | |\ \ \ \ | | | | | | | | | | | | | | SI-7132 - don't discard Unit type in interpreter
| | | * | | | SI-7132 - don't discard Unit type in interpreterDan Rosen2013-03-093-15/+22
| | | | | | |
| * | | | | | Merge commit 'refs/pull/2326/head' into pr/merge-395e90a786Paul Phillips2013-03-281-1/+1
|/| | | | | |
| * | | | | | SI-7302 importing from Any.Paul Phillips2013-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out the "minor tweaks" in 632daed4ed were only minor for major values of minor. You can indeed import members from Any/Object, so long as you rename them. Reverted logic error. Test case will accompany SI-7233 upon merge into master.
* | | | | | | Merge pull request #2323 from paulp/pr/iterator_++Paul Phillips2013-03-283-18/+55
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Iterator.++ no longer blows the stack.
| * | | | | | Iterator.++ no longer blows the stack.Paul Phillips2013-03-263-18/+55
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To my chagrin we still hadn't gotten this one. I took a new approach which seems like a winner to me. Here's a benchmark: object Test { def run(n: Int) = println((1 to n).foldLeft(Iterator.empty: Iterator[Int])((res, _) => res ++ Iterator(1)) sum) def main(args: Array[String]): Unit = run(args(0).toInt) } Runtime before this commit for various n: 500 0.403 real 1000 0.911 real 1500 2.351 real 2000 5.298 real 2500 10.184 real Runtime after this commit, same n: 500 0.346 real 1000 0.359 real 1500 0.368 real 2000 0.379 real 2500 0.390 real In the test case I dial it up to 100000.
* | | | | | Merge pull request #2325 from retronym/ticket/7186-2Paul Phillips2013-03-271-6/+14
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7186 Slim down some TypeRefs by 8 bytes.
| * | | | | | SI-7186 Slim down some TypeRefs by 8 bytes.Jason Zaugg2013-03-271-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By virtue of being defined in object TypeRef, they had two outer pointers. $outer scala.reflect.internal.Types$TypeRef$ $outer scala.tools.nsc.Global This commit moves them out of that object. They also now are no longer shrouded in anonymity, which is pleasant when debugging and profiling. The shallow size leaderboard now looks like: Class % Shallow % Objects Size ----------------------------------------- 1. :: 14% 25% 2. char[] 10% a 5% 3. ClassArgsTypeRef 6% 5% 4. Object[] 6% b 1% 5. TypeHistory 5% 6% 6. AbstractTypeSymbol 4% 2% 7. AbsractNoArgsTypeRef 3% 2% 8. j.l.Class 3% 2% 9. TermSymbol 2% 1% 10. HashEntry 1% c 1% a) 6% of the char[] by size is the name table. Retained source code seems to be sizable => should we discard after parsing? b) Types.uniques c) ZipArchive#DirEntry.entries Confirmation of the slimmer size can be seen in: https://github.com/retronym/scala/compare/ticket/7186 In that branch, I introduced infrastructure to query JVM object size in instrumented tests, and the diff shows: size class instance ======================================================================== - 64 bytes internal.Types$TypeRef$$anon$5 List[Int] - 64 bytes internal.Types$TypeRef$$anon$6 String + 56 bytes nternal.Types$ClassArgsTypeRef List[Int] + 56 bytes ernal.Types$ClassNoArgsTypeRef String I chose not to bring that test infrastructure across to master so as not to burden us with brittle tests built on esoteric facilities. This does not close the ticket which proposes a different space optimization which is also explored in that branch, but no a clear cut improvement.
* | | | | | | Merge pull request #2289 from paulp/pr/name-logicPaul Phillips2013-03-2724-200/+216
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Name logic consistency
| * | | | | | Overhauled local/getter/setter name logic.Paul Phillips2013-03-2524-200/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sifted through extraneous methods trying to find consistency, consolidating and deprecating as I went. The original motivation for all this was the restoration of LOCAL_SUFFIX to originalName, because: It looks like in an attempt to make originalName print consistently with decodedName, I went a little too far and stripped invisible trailing spaces from originalName. This meant outer fields would have an originalName of '$outer' instead of '$outer ', which in turn could have caused them to be mis-recognized as outer accessors, because the logic of outerSource hinges upon "originalName == nme.OUTER". I don't know if this affected anything - I noticed it by inspection, improbably enough. Deprecated originalName - original, compared to what? - in favor of unexpandedName, which has a more obvious complement. Introduced string_== for the many spots where people have given up and are comparing string representations of names. A light dusting of types is still better than nothing. Editoral note: LOCAL_SUFFIX is the worst. Significant trailing whitespace! It's a time bomb.
* | | | | | | Merge pull request #2311 from retronym/topic/repl-intellijAdriaan Moors2013-03-272-0/+26
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | An IntelliJ Module for the recently modularized REPL.
| * | | | | | An IntelliJ Module for the recently modularized REPL.Jason Zaugg2013-03-252-0/+26
| |/ / / / /
* | | | | | Merge pull request #2290 from adriaanm/build-cleanup-squashedAdriaan Moors2013-03-253-2157/+1262
|\ \ \ \ \ \ | | | | | | | | | | | | | | Sanity for build.xml: exscriptus&positus delendus est.
| * | | | | | Merge master.Adriaan Moors2013-03-25158-1066/+2185
| |\| | | | |
| * | | | | | Merge 2.10.x into masterAdriaan Moors2013-03-254-2150/+1265
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merges the relevant part of #2295 (build.xml cleanup), with the relevant differences in build.xml carried forward, as well as a fix in interactive/RangePositions for the sbt interface.
| | * | | | | | Allow getting STARR via maven, also: locker.skipAdriaan Moors2013-03-231-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `ant -Dstarr.version="2.11.0-M2" -Dlocker.skip=YESSIR`, to build quick using 2.11.0-M2 (skipping locker, using starr instead).
| | * | | | | | Use stage/project for taskname instead of scalacforkAdriaan Moors2013-03-231-2/+2
| | | | | | | |
| | * | | | | | Sanity for build.xml: exscriptus&positus delendus est.Adriaan Moors2013-03-234-2440/+1300
| | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduced copy/pasting to the best of my antabilities. The next person to duplicate anything without written permission will be sentenced to a week in xmhell. While I was at it, made sure that layering is respected. The quick phase exclusively uses the locker compiler for building. The jar task will fail when trying to create an empty jar. Replaced the crazy if/unless/depends constructs by if/then/else. Version suffix computation should now be comprehensible. I threw in some validation to make sure the various suffixes are consistent. Also, no more init/pre-foo tasks unless absolutely necessary. Introduced a couple of macros to capture the essence of staged compilation. Notes: - remove lib.extra, standardize on aux.libs - collapse *.javac.path and *.build.path - rename starr.classpath to starr.compiler.path - only repl needs jline, locker.compiler.path = locker.comp.build.path + forkjoin - more uniform build.paths (compiler = reflect + library) - uniformity means slightly bigger classpaths (e.g. forkjoin is only used in library, but inherited by compiler) - pruned: some spurious dependencies removed - compilerpathref = compiler build path - silence test.osgi, by hook or by crook - centralized clean tasks - reduce duplication in property usage - fix pack.xml to pack scaladoc/partest instead of scaladoc/scala-partest - TODO: -XDignore.symbol.file necessary for library? only needed for forkjoin? - document usage from jenkins, fix typo: partest.scalac*_*opts New targets: - quick-opt - strap-opt - test.bc - test.osgi - test.osgi.comp - test.osgi.init - test.stability-opt Removed/replaced targets: - asm.clean asm.lib asm.start - bc.run - dist.latest dist.latest.unix dist.latest.win dist.start - docs.all docs.manmaker docs.pre-comp docs.pre-continuations-plugin - docs.pre-jline docs.pre-lib docs.pre-man docs.pre-partest docs.pre-scalap - forkjoin.clean forkjoin.lib forkjoin.pack forkjoin.start - graph.clean - init.build.nopatch.release init.build.patch.release init.build.release - init.build.snapshot init.build.suffix.done init.extra.tasks - init.fail.bad.jdk init.hasbuildnum init.hasmavensuffix init.jars - init.jars.check init.maven.jars init.maven.tasks init.osgi.suffix - init.osgi.suffix.final init.osgi.suffix.snapshot init.testjava6 - init.version.done init.version.git init.version.release init.version.snapshot - init.warn.jdk7 locker.pre-comp locker.pre-lib locker.pre-reflect - locker.unlock.comp locker.unlock.lib locker.unlock.pre-comp - locker.unlock.pre-lib locker.unlock.pre-reflect locker.unlock.reflect - osgi.clean osgi.test osgi.test.comp osgi.test.init - pack.clean pack.pre-bin pack.pre-comp pack.pre-lib pack.pre-partest - pack.pre-plugins pack.pre-reflect pack.pre-scalap pack.start - palo.comp palo.lib palo.pre-bin palo.pre-comp palo.pre-lib palo.pre-reflect - palo.reflect palo.start quick.pre-bin - quick.pre-comp quick.pre-interactive quick.pre-lib quick.pre-partest - quick.pre-plugins quick.pre-reflect quick.pre-repl quick.pre-scalacheck - quick.pre-scaladoc quick.pre-scalap - sbt.clean sbt.compile sbt.done sbt.libs sbt.start - starr.clean - strap.clean strap.pre-comp strap.pre-lib strap.pre-reflect strap.start - test.debug test.pre-run
* | | | | | | Merge pull request #2299 from retronym/ticket/7294Paul Phillips2013-03-2534-8/+60
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | SI-7294 Towards finality for TupleN
| * | | | | | Cleanup obsolete options in CodeGen.Jason Zaugg2013-03-242-5/+1
| | | | | | |
| * | | | | | SI-7294 Deprecate inheritance from TupleN.Jason Zaugg2013-03-2427-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation is to provide static warnings in cases like: scala> (1, 2) match { case Seq() => 0; case _ => 1 } res9: Int = 1
| * | | | | | SI-7294 Treat TupleN as final under -XfutureJason Zaugg2013-03-245-2/+27
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the purposes of checkability warnings. This will warn in case of: scala> (1, 2) match { case Seq() => 0; case _ => 1 } res9: Int = 1 Given how often Tuples are used as scrutinees, this is a highly desirable place to warn. I was orginally going to unlock this under -Xlint, and could be easily convinced to go that way, given that -Xfuture is a less popular option.
* | | | | | Merge pull request #2285 from vigdorchik/silence_scaladocPaul Phillips2013-03-2362-527/+511
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove unrecognized doc comments
| * | | | | | Doc -> C-style comments for local symbols to avoid "discardingEugene Vigdorchik2013-03-2162-528/+512
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unmoored doc comment" warning when building distribution for scala itself.
* | | | | | | Merge pull request #2265 from rjolly/scripting9Paul Phillips2013-03-235-9/+79
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | script engine : better binding mechanism + reflexive access through bound variable "engine"
| * | | | | | | The script engine is given a better binding mechanism and reflexive accessRaphael Jolly2013-03-223-4/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Better binding mecanism : formerly done through the default SimpleBindings shipped with the API, it now goes through a custom IBindings class which uses the bind method of the interpreter instead of simply making the bindings available as a Map. Reflexive access : the script engine is made available to itself through a bound variable "engine" of type javax.script.ScriptEngine. This will allow "variable injection" i.e. programmatic redefinition of variables, among others.
| * | | | | | | Bypass determination of protection domain when resource is not in a jarRaphael Jolly2013-03-222-5/+11
| | | | | | | |
* | | | | | | | Merge pull request #2260 from som-snytt/issue/5717-assert-pkgdirPaul Phillips2013-03-233-28/+54
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-5717 error when bytecode cannot be written
| * | | | | | | | SI-5717 error when bytecode cannot be writtenSom Snytt2013-03-223-28/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there's an existing file foo when emitting a class file for foo.Bar, then emit an error at foo.Bar, similar to what javac does. The error message looks something like: foo.scala:4: error: error writing object Foo: ./mypkg/Foo.class: ./mypkg is not a directory
* | | | | | | | | Merge pull request #2259 from Blaisorblade/issue/6123-try-3Paul Phillips2013-03-229-6/+53
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | SI-6123: -explaintypes should not explain errors which won't be reported, new attempt
| * | | | | | | | Add positive and negative testcases for SI-6123 (-explaintypes)Paolo G. Giarrusso2013-03-157-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Positive testcases compile reduced known offenders to verify that no output is produced. The negative testcase tests that -explaintypes actually produces output on code which fails to compile. I have altered an existing testcase, `test/files/neg/abstract`, adding -explaintypes to the flags. This testcase is currently mostly ineffective, as partest currently ignores the standard output (SI-7003). It will become more effective when SI-7003 is fixed. But already now, testers would at least be able to notice extraneous output. This argument is somewhat bogus, but this patch is no worse than the other ones which are committed while SI-7003 is open.
| * | | | | | | | SI-6123: -explaintypes should not explain errors which won't be reportedPaolo G. Giarrusso2013-03-152-6/+8
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -explainTypes means that only type tests which *fail* should be reported in more detail by using explainTypes. Hence, callers of explainTypes should check if type errors are being ignored, by checking context.reportErrors. Hence, this check is added to Inferencer, and another call site is redirected to that method. Moreover, explainTypes should only be called if an error exists. Enforce that in checkSubType, and remove spurious home-made explainTypes output. Finally, in ContextErrors, stop checking `settings.explaintypes.value` before calling `explainTypes` which will check it again. Note that this patch does not fix all occurrences, but only the ones which showed up during debugging. The other ones never cause problems, maybe because they occur when contextErrors is in fact guaranteed to be true. We might want to fix those ones anyway. This fixes regressions in c800d1fec5241ed8c29e5af30465856f9b583246 and 78f9ef3906c78413ff8835fdad3849bfe5516be2. Thanks to hubertp (Hubert Plociniczak) for the first round of review. Refs #6123 backport to _2.10.x_
* | | | | | | | Merge pull request #2287 from vigdorchik/ticket/si-7102James Iry2013-03-222-0/+15
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-7102 Override isEmpty for bitsets with an efficient implementation
| * | | | | | | | SI-7102 Specialize isEmpty for bitsetsEugene Vigdorchik2013-03-212-0/+15
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently bitsets use default isEmpty implementation inherited from Set, which tests for "size == 0". Calculating the size of a word in a bitmap requires summing through all bits set, whereas testing for emptyness needs only one comparison with zero. This commit overrides the default implementation with the specialized one looking for a non-zero word in this bitmap.
* | | | | | | | Merge pull request #2239 from paulp/pr/warningsAdriaan Moors2013-03-2148-164/+155
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Warnings removal and other cleanup.
| * | | | | | | Removed dead src directory.Paul Phillips2013-03-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One line of commentary referenced from nowhere can't be very useful.
| * | | | | | | Eliminate a bunch of -Xlint warnings.Paul Phillips2013-03-1243-162/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly unused private code, unused imports, and points where an extra pair of parentheses is necessary for scalac to have confidence in our intentions.