summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/CompilerCommand.scala
Commit message (Collapse)AuthorAgeFilesLines
* No warn when discarding r.f(): r.typeSom Snytt2016-09-101-9/+1
| | | | | | | | | | The paradigm is `def add(x: X): Unit = listBuffer += x`. The value that is discarded is not new information. Also cleans up the recent tweaks to help messaging. Adds newlines in case they ask for multiple helps.
* Allow all settings to be helpingLukas Rytz2016-09-011-1/+1
|
* Use Enumeration for MultiChoiceSettingSom Snytt2014-09-051-1/+1
| | | | | | | | | | | This is pretty easy, since a ValueSet is a BitSet. When the setting is updated, recompute the current set of values, which is cheap and succinct. Checking a flag is also easy and fast. Choices in MultiChoiceSettings may enable other choices.
* SI-8525 MultiChoice takes a helper functionSom Snytt2014-07-181-1/+1
| | | | | | Clean-up code review comments. MultiChoice takes a helper function for outputting help text.
* SI-8525 Multichoice helpSom Snytt2014-07-171-1/+9
| | | | | | Enables -Xlint:help and -language:help. The Settings API makes it difficult to innovate.
* SI-8503 -version is info settingSom Snytt2014-05-291-2/+9
| | | | | | | | | | | And the Scala runner exits with 0 for info settings. Producing the version string is consolidated. The compiler driver uses the default settings hook to short-circuit on -version. That's to avoid creating the compiler; really it should check shouldStopWithInfo first, as the runner does.
* SI-7622 -Xgenerate-phase-graph is an info optionSom Snytt2013-08-211-14/+14
| | | | | | | | -Xgenerate-phase-graph is comparable to -Xshow-phases. The knowledge about what is an info-only option is refactored to Settings, which also knows which group of options comprise the optimiser set.
* Name boolean arguments in src/compiler.Jason Zaugg2013-03-051-4/+4
| | | | | | | | | | What would you prefer? adaptToMemberWithArgs(tree, qual, name, mode, false, false) Or: adaptToMemberWithArgs(tree, qual, name, mode, reportAmbiguous = false, saveErrors = false)
* Remove code from compiler central.Paul Phillips2012-11-201-5/+0
| | | | | All those old-timey methods whose melodies have become unfashionable.
* Revert "Commenting out unused members."Paul Phillips2012-11-191-3/+3
| | | | This reverts commit 951fc3a486.
* Commenting out unused members.Paul Phillips2012-11-191-3/+3
| | | | | | | | | | | | | | | | | | I want to get this commit into the history because the tests pass here, which demonstrates that every commented out method is not only unnecessary internally but has zero test coverage. Since I know (based on the occasional source code comment, or more often based on knowing something about other source bases) that some of these can't be removed without breaking other things, I want to at least record a snapshot of the identities of all these unused and untested methods. This commit will be reverted; then there will be another commit which removes the subset of these methods which I believe to be removable. The remainder are in great need of tests which exercise the interfaces upon which other repositories depend.
* Removed unused imports.Paul Phillips2012-11-061-1/+0
| | | | | | | | | 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".
* Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013Heather Miller2012-11-021-1/+1
|
* update and normalize copyright noticeAdriaan Moors2012-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* Enabling postfix ops feature warning, and working on libs to avoid them.Martin Odersky2012-04-121-1/+1
|
* Reflection toolboxes now respect settings that ...Eugene Burmako2011-11-281-0/+2
| | | | | | | | | | | Reflection toolboxes now respect settings that are provided to them. Before the fix CompilerCommand lacked the (args, settings, errorFn) ctor. I added it and provided means to augment passed settings with custom errorFn. Closes SI-5239. Review by odersky.
* More changes to get Reflect compiler working.Martin Odersky2011-08-291-1/+0
|
* Created infrastructure for testing icode + sett...Paul Phillips2011-08-221-1/+1
| | | | | | | | | | | | | | | | Created infrastructure for testing icode + settings/partest yak shaving. See enclosed test files/run/inline-ex-handlers.scala. To compare optimized and unoptimized icode after a given phase, all you need in a partest source file is this: import scala.tools.partest.IcodeTest object Test extends IcodeTest { override def printIcodeAfterPhase = "inlineExceptionHandlers" } Other things can be done, see IcodeTest.scala. Review by ureche.
* Documented what I could figure out about late f...Paul Phillips2011-06-141-1/+3
| | | | | | | Documented what I could figure out about late flags and anti-flags. Eliminated some indirection in flag usage. Made -Xshow-phases print out more info about flags if -Ydebug is also given. No review.
* Wanting to deprecate -make, first I had to writ...Paul Phillips2011-03-301-17/+26
| | | | | | | | | | | | | | | Wanting to deprecate -make, first I had to write a way to deprecate -make. So there's that, now you can do val s = SomeSetting(...) withDeprecationMessage "don't use this" And it will do the usual deprecation things. And, deprecated -make. And couldn't resist fixing a bug in -make, it would crash if you gave it its own default option (i.e. -make:all.) Let's deprecate more! I also did further cleaning up of our help outputs. Do I smell a pulitzer in the making? No review.
* A paltry 570 cases failing in -Xcheckinit due t...Paul Phillips2011-03-281-1/+1
| | | | | | A paltry 570 cases failing in -Xcheckinit due to some uninitialized val or other. It is but a trifle! No review.
* Trying to get fsc doing the right thing with re...Paul Phillips2011-03-271-7/+15
| | | | | | | | | | | | | | | | | | | | Trying to get fsc doing the right thing with respect to absolute and relative paths. My knowledge of the problem had heretofore been second hand, and my understanding of it incomplete. The real problem I have determined is that there are a bunch of different things which go wrong if relative paths start being resolved from a different base, each of which needs custom handling. classpath-style options, e.g. fsc -cp ../foo.jar path-style options, e.g. fsc -d ../mydir file arguments, e.g. fsc ../foo.scala So it was more work than I had realized, or I probably wouldn't have even touched it. But now it seems to be working as one would want. I also poured some readability onto the fsc help output. Closes #4395, no review, but community input would be great.
* Improved the error message when one gives inval...Paul Phillips2011-03-181-1/+3
| | | | | | Improved the error message when one gives invalid options to scala. Similar improvements for scalac/fsc/etc has to wait. No review.
* Eliminating duplication and trying to outrun ob...Paul Phillips2011-02-011-11/+7
| | | | | | Eliminating duplication and trying to outrun obsolescence in the exciting world of fsc. No review.
* Updated copyright notices to 2011Antonio Cunei2011-01-201-1/+1
|
* Investigating what can be done about our 2000 o...Paul Phillips2010-12-311-20/+20
| | | | | | | | | | Investigating what can be done about our 2000 or so closures created via by-name calls takes me through uncurry with a mop. Sifting through compiler generated classfiles I am horrified at one example of decadent closure creation perpetrated by a certain extempore. CompilerCommand goes from 28 classfiles to 16 and manages to get smaller anyway anyway. Some people just can't be trusted with closures. No review.
* Cleaned up and brought up to date the help text...Paul Phillips2010-12-051-10/+32
| | | | | | | | Cleaned up and brought up to date the help text for -X and -Y options. Made some enhancements to PhasesSetting, which are documented if you run scalac -X or -Y. (Try it!) Disabled some dead settings and renamed others to reflect their current purpose. No review.
* Removed more than 3400 svn '$Id' keywords and r...Antonio Cunei2010-05-121-1/+0
| | | | | Removed more than 3400 svn '$Id' keywords and related junk.
* While working on partest discovered that Compil...Paul Phillips2010-03-251-23/+16
| | | | | | | | | | | | | | | | | | | While working on partest discovered that CompilerCommand ignores half its constructor arguments and a couple dozen places blithely pass it those arguments as if they're being used. Then there were setups like this: class OfflineCompilerCommand( arguments: List[String], settings: Settings, error: String => Unit, interactive: Boolean) extends CompilerCommand(arguments, new Settings(error), error, false) Hey offline compiler command, why throw away the perfectly good settings you were given? Ever heard 'reduce, reuse, recycle'? How did you ever work... or do you? No review.
* Removed ArgumentsExpander in favor of having al...Paul Phillips2010-03-231-2/+15
| | | | | | Removed ArgumentsExpander in favor of having all arguments parsed the same way. No review.
* One minute too many trying to figure out where ...Paul Phillips2010-03-071-2/+3
| | | | | | | | | One minute too many trying to figure out where some partest classpath mutation was disappearing on me, and I snapped and started the process of creating an immutable Settings. This commit is for the most part infrastructure to enable its smooth and uneventful entrance. Review by community.
* Some much needed housecleaning regarding system...Paul Phillips2010-02-231-3/+3
| | | | | | | | | Some much needed housecleaning regarding system properties. If you can possibly resist the temptation, it'd be great if people could try to go through the properties classes to get and set them, and also to set property values somewhere fixed rather than using strings directly. Review by community.
* More laboring on Settings, ClassPaths, Ant Task...Paul Phillips2010-02-221-2/+2
| | | | | | More laboring on Settings, ClassPaths, Ant Tasks, Partest, and similar epicenters of thrilldom. No review.
* More work on classpaths.Paul Phillips2010-02-111-1/+1
| | | | | | | | | which we must have no test cases at all. In the short term there will probably be a few more minor disruptions since with classpaths constructed a half dozen different ways, achieving consistency requires flushing out the undocumented accidents upon which any given island might depend. Review by community.
* Some work on classpaths.Paul Phillips2010-02-081-57/+17
| | | | | | | | | | | | | | | | | | | | | | | | at https://lampsvn.epfl.ch/trac/scala/wiki/Classpath modulo some minor details which remain to be investigated. It is not entirely integrated, and should not involve any behavioral changes. The patch also contains a number of small improvements targetting widely duplicated code. PathResolver offers a main method. If run with no arguments it will output a pile of information about classpath relevant environment vars and properties. If given arguments, it will output the classpath info that any scala runner script would use if given the same args. There is a wrapper in the tools directory. Example: tools/pathResolver -extdirs /foo -sourcepath /bar | egrep "sourcePath|scalaExtDirs" scalaExtDirs = /foo sourcePath = /bar There is also a (probably temporary) command line option -Ylog-classpath which will print out the settings.classpath value anytime it changes. Review by community.
* Digging into why the repl is so slow, discovere...Paul Phillips2010-01-191-2/+2
| | | | | | | | | | | | | | | | | | Digging into why the repl is so slow, discovered that fsc is once again never reusing compiler instances (but for a different reason than #1683.) Small changes break equality and the little troopers are so darn quiet about it. Steady state, hot fsc repl startup times before this patch: 0m1.747s 0m1.789s 0m1.842s 0m1.690s After this patch: 0m1.139s 0m1.148s 0m1.090s 0m1.091s No review. Could use a test case but I have trouble coaxing partest this far outside the box.
* Updated copyright notices to 2010Antonio Cunei2009-12-071-1/+1
|
* closes #1904Antonio Cunei2009-11-301-0/+3
|
* Deprecation patrol continues patrolling.Paul Phillips2009-08-221-1/+1
|
* Various cleanups and redundancy-removal related...Paul Phillips2009-03-161-4/+4
| | | | | Various cleanups and redundancy-removal related to properties.
* fix for a typo which had disabled -Xshow-phases.Paul Phillips2009-03-131-1/+1
|
* A big cleanup of Settings code.Paul Phillips2009-03-121-92/+56
| | | | | | | manage existing settings and add new ones. It's paving the way for low-fuss scalac preferences so we can exert fine grained config file based control over compiler behavior.
* removed deprecated warning, updated svn props, ...michelou2009-03-101-17/+17
| | | | | removed deprecated warning, updated svn props, cleaned up code
* repaired init order issue with the fix for #1602.Paul Phillips2009-02-091-5/+13
|
* Inelegant fix for bug #1602; will revisit.Paul Phillips2009-02-061-1/+5
|
* Updated (all) copyright notices to 2009Antonio Cunei2009-01-131-1/+1
|
* fixed #1269.Lukas Rytz2009-01-121-1/+9
|
* Fix for #296Antonio Cunei2008-10-151-0/+30
| | | | | | | | | | | The handling of informative messages in CompileServer and in Main was duplicated, and the two copies slowly diverged over time. The code has now been refactored, cleaned up, and made more general. The FakePos(fsc) message was due to a missing override def toString. Both problems are fixed.
* 1) Fix in backend to print meaningful filenames...Martin Odersky2008-05-201-3/+4
| | | | | | | 1) Fix in backend to print meaningful filenames (previously it was "[wrote DataOutputStream@6747]" 2) Treat java varargs as Scala varargs 3) Allow parsing of Java source files
* ScalaDoc, etc.Geoffrey Washburn2008-03-051-9/+3
| | | | | | | | | | | of Settings. All doc related settings have been commented out of Settings (soon to be removed) and are now found in doc.Settings. -Ydoc is no more. I believe I have updated the scaladoc Ant task correctly, but it is not clear how to test it.