summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ObjectRunner.scala
Commit message (Collapse)AuthorAgeFilesLines
* Removed warningsEECOLOR2015-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | - Added `since` to deprecation statement - Added unit to parameter list - Removed usage of deprecated method polyType - Replaced deprecated `debugwarn` with `devWarning` - Changed switch statement to if else in order to remove a warning - Switched implementation of `init` and `processOptions` to prevent warning - Replaced deprecated `Console.readLine` with `scala.io.StdIn.readLine` - Replaced deprecated `startOrPoint` with `start` - Replaced deprecated `tpe_=` with `setType` - Replaced deprecated `typeCheck` with `typecheck` - Replaced deprecated `CompilationUnit.warning` with `typer.context.warning` - Replaced deprecated `scala.tools.nsc.util.ScalaClassLoader` with `scala.reflect.internal.util.ScalaClassLoader` - Replaced deprecated `scala.tools.ListOfNil` with `scala.reflect.internal.util.ListOfNil` - Replaced deprecated `scala.tools.utils.ScalaClassLoader` with `scala.reflect.internal.util.ScalaClassLoader` - Replaced deprecated `emptyValDef` with `noSelfType` - In `BoxesRunTime` removed unused method and commented out unused values. Did not delete to keep a reference to the values. If they are deleted people might wonder why `1` and `2` are not used. - Replaced deprecated `scala.tools.nsc.util.AbstractFileClassLoader` with `scala.reflect.internal.util.AbstractFileClassLoader`
* Integrate flat classpath with the compilermpociecha2014-12-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit integrates with the compiler the whole flat classpath representation build next to the recursive one as an alternative. From now flat classpath really works and can be turned on. There's added flag -YclasspathImpl with two options: recursive (the default one) and flat. It was needed to make the dynamic dispatch to the particular classpath representation according to the chosen type of a classpath representation. There's added PathResolverFactory which is used instead of a concrete implementation of a path resolver. It turned out that only a small subset of path resolvers methods is used outside this class in Scala sources. Therefore, PathResolverFactory returns an instance of a base interface PathResolverResult providing only these used methods. PathResolverFactory in combination with matches in some other places ensures that in all places using classpath we create/get the proper representation. Also the classPath method in Global is modified to use the dynamic dispatch. This is very important change as a return type changed to the base ClassFileLookup providing subset of old ClassPath public methods. It can be problematic if someone was using in his project the explicit ClassPath type or public methods which are not provided via ClassFileLookup. I tested flat classpath with sbt and Scala IDE and there were no problems. Also was looking at sources of some other projects like e.g. Scala plugin for IntelliJ and there shouldn't be problems, I think, but it would be better to check these changes using the community build. Scalap's Main.scala is changed to be able to use both implementations and also to use flags related to the classpath implementation. The classpath invalidation is modified to work properly with the old (recursive) classpath representation after changes made in a Global. In the case of the attempt to use the invalidation for the flat cp it just throws exception with a message that the flat one currently doesn't support the invalidation. And also that's why the partest's test for the invalidation has been changed to use (always) the old implementation. There's added an adequate comment with TODO to this file. There's added partest test generating various dependencies (directories, zips and jars with sources and class files) and testing whether the compilation and further running an application works correctly, when there are these various types of entries specified as -classpath and -sourcepath. It should be a good approximation of real use cases.
* 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-2/+2
| | | | This reverts commit 951fc3a486.
* Commenting out unused members.Paul Phillips2012-11-191-2/+2
| | | | | | | | | | | | | | | | | | 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 ```
* address "this would catch all throwables" warningsMartin Odersky2012-07-201-1/+1
| | | | | | | | original patch by @odersky in #955 -- criterion for the refactor: "catch Throwable as long as there's no obvious control flow exception going through the catch and the caught exception is processed further" rebased & updated with review comments in #955 and #954
* Implemented manifest-based class-paths.Paul Phillips2011-11-211-6/+8
| | | | | | | | | | | | | | | | | | | | If you run a jar directly, like scala foo.jar Then if a Class-Path attribute is present in the jar manifest, the classpath will be constructed from that instead of the arguments. Some things remain to be determined, like whether it's supposed to replace a classpath given on the command line or supplement it, and whether the master jar should be on the classpath or only and exactly the jars listed in the manifest. There's a really nice test case, which won't be run of course, but I can't stand going any further without tests for these hard to test on all platforms things. The faux .check file shows what I see. Closes SI-4355, review by harrah.
* Updated copyright notices to 2011Antonio Cunei2011-01-201-1/+1
|
* Some cleanups in the *Runners and a few compile...Paul Phillips2010-11-271-2/+2
| | | | | | Some cleanups in the *Runners and a few compiler I/O conveniences. No review.
* In the absence of known reasons why some except...Paul Phillips2010-11-261-5/+2
| | | | | | | | In the absence of known reasons why some exceptions are intercepted or have their stack trace printed and others fly unchallenged, changed script and object runners to handle everything consistently when an exception is thrown. Closes #3978 again, no review.
* Restored the stack traces I'd accidentally smot...Paul Phillips2010-11-081-1/+14
| | | | | | Restored the stack traces I'd accidentally smothered in r23426, and cleaned up ObjectRunner/ScriptRunner a bit. Closes #3978, 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.
* Mostly IO tweaks related to my upcoming partest...Paul Phillips2010-04-021-2/+1
| | | | | | | | | Mostly IO tweaks related to my upcoming partest patch, which to my chagrin is being held up by windows. Also updates the default ANT_OPTS to be the same as the ones the nightlies override it with. (If we know you can't build scala with those settings it seems kind of uncool to leave them for everyone else.) No review.
* Updated copyright notices to 2010Antonio Cunei2009-12-071-1/+1
|
* Removing bits from the library which shouldn't ...Paul Phillips2009-11-181-1/+1
| | | | | | | | | | | | | | | Removing bits from the library which shouldn't make the 2.8 cut. Removed outright: util.Hashable: unused and I have a better plan for this net.Utility: class created to accomodate expansion which never materialized reflect.Invocation: doesn't go far enough, needs love it won't find right now reflect.RichClass: same as Invocation Moved into compiler: util.ScalaClassLoader: too useful to lose, not done enough to ship
* A big yet interim patch emerging from my attemp...Paul Phillips2009-05-261-66/+6
| | | | | | | | | | | | | | | | | | A big yet interim patch emerging from my attempts to centralize common classloader-related code. As it turns out, not that much of the patch is directly associated with that. Most of it is cleanup in the neighborhoods I was visiting, but there are a few new library files about which I'm open to feedback: scala/util/control/Exception - lots of exception handling code. scala/net/Utility - what would be the first file in scala.net.*, more code to follow if that sounds like a good package idea. scala/util/ScalaClassLoader - mostly convenience methods right now, more sophistication to come Also, this adds a :jar command to the repl which adds a jar to your classpath and replays the session.
* Modified ObjectRunner to use Extension classloa...Paul Phillips2009-05-061-3/+20
| | | | | | Modified ObjectRunner to use Extension classloader as parent rather than System classloader. Fixes bug #857.
* Updated (all) copyright notices to 2009Antonio Cunei2009-01-131-1/+1
|
* change in ObjectRunner to avoid the warnings.Martin Odersky2008-07-091-2/+2
|
* -target 1.5 now the default.Martin Odersky2007-12-191-1/+1
|
* - set the Java "context classloader" in ObjectR...Lex Spoon2007-07-131-26/+29
| | | | | | | - set the Java "context classloader" in ObjectRunner and InterpreterLoop - tweaked the start up of the interactive shell so that a prompt appears more quickly
* ObjectRunner now recognizes -Xcodebasemichelou2007-06-041-23/+21
|
* updated for-comprehension syntaxmichelou2007-04-191-3/+2
|
* Refactored portability supportmihaylov2006-11-011-0/+2
|
* cleaned up Scala commentsmichelou2006-10-051-10/+29
|
* test that the main method is static, and throw ...Lex Spoon2006-08-241-0/+2
| | | | | test that the main method is static, and throw NoSuchMethodError if not
* reverse the order of guesses about howtorun: fi...Lex Spoon2006-07-131-3/+23
| | | | | | reverse the order of guesses about howtorun: first look for an object, then look for a script file
* fixed a spelling errorLex Spoon2006-06-301-1/+1
|
* Do not suppress ClassNotFoundException, NoSuchM...Lex Spoon2006-06-221-10/+9
| | | | | | Do not suppress ClassNotFoundException, NoSuchMethodError, or InvocationTargetException. Document that the caller must handle them.
* use getMethod("main",blahblah) instead of getMe...Lex Spoon2006-06-161-17/+3
| | | | | use getMethod("main",blahblah) instead of getMethods().find(blahblah)
* fixed "guess" test in MainGenericRunner.scalamichelou2006-06-151-13/+18
| | | | | added try/catch around Class.forName in ObjectRunner.scala
* added header and svn:keywords to files *Generic...michelou2006-06-151-7/+16
| | | | | added header and svn:keywords to files *Generic*.scala
* (no commit message)Lex Spoon2006-06-151-0/+36