summaryrefslogtreecommitdiff
path: root/src/compiler
Commit message (Collapse)AuthorAgeFilesLines
* Generate EnclosingMethod classfile attributes. Iulian Dragos2010-11-124-4/+16
| | | | | | | | This should fix java signatures when they refer to method type parameters. I unrolled Adriaans previous fix for #3249, as this one is more general. Closes #3249, review by moors.
* A revival of r21442, which I had reverted based...Paul Phillips2010-11-121-2/+2
| | | | | | A revival of r21442, which I had reverted based on the mistaken belief it was causing mysterious trunk issues of the day. No review.
* Half of an implementation of sealedness for jav...Paul Phillips2010-11-122-5/+20
| | | | | | | | | Half of an implementation of sealedness for java enums. Since it's only half it's behind -Xexperimental, but it works like a charm for the half where it works (that being compiling against bytecode.) Need input on how to approach the source half. References ticket #2442. Review by moors.
* Some more work on options related to showing co...Paul Phillips2010-11-116-111/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some more work on options related to showing compiler structures during compilation. The pickler knew more than was healthy about things like compiler settings, so I let the pickler worry about pickling and moved that logic somewhere closer to the surface. Some convenience oriented tweaks to command line phase parsing. The end result is as follows (some output trimmed for brevity.) // dippy.scala class Dippy { def f[T <: Dippy](x: T) = (x, x) object DingusDippy extends util.Random { } } // className@phaseString should be reliably unambiguous % scalac -Xshow-class Dippy@typer,erasure,jvm dippy.scala <<-- class Dippy after phase 'typer' -->> Members (excluding Any/AnyRef unless overridden): final object DingusDippy extends object Dippy.this.DingusDippy def f[T <: Dippy](x: T): (T, T) <<-- class Dippy after phase 'erasure' -->> Members (excluding Any/AnyRef unless overridden): private lazy var DingusDippy$module: object Dippy#DingusDippy lazy val DingusDippy(): object Dippy#DingusDippy def f(x: Dippy): Tuple2 <<-- class Dippy after phase 'jvm' -->> Members (excluding Any/AnyRef unless overridden): protected var bitmap$0: Int private lazy var DingusDippy$module: object Dippy$DingusDippy lazy val DingusDippy(): object Dippy$DingusDippy def f(x: Dippy): Tuple2 No review.
* Some minor fixes found by findbugs. No review.Paul Phillips2010-11-111-1/+1
|
* Unsuppressed generic signatures for members wit...Paul Phillips2010-11-111-5/+8
| | | | | | Unsuppressed generic signatures for members with expanded names. Closes #3897, review by dragos.
* Introduces "Origins" for all your superhero bac...Paul Phillips2010-11-113-9/+117
| | | | | | | | Introduces "Origins" for all your superhero backstory needs. It logs where all the calls are coming from: that's all for the moment. It's explained in the comments and test case, so I'm sure you don't need it all repeated here. No review.
* protected[this] members should be accessible to...Paul Phillips2010-11-101-7/+9
| | | | | | protected[this] members should be accessible to super.x calls. Closes #464, review by odersky.
* Closes #3980. Review by dragos.Hubert Plociniczak2010-11-091-6/+13
|
* Restored the stack traces I'd accidentally smot...Paul Phillips2010-11-083-30/+46
| | | | | | Restored the stack traces I'd accidentally smothered in r23426, and cleaned up ObjectRunner/ScriptRunner a bit. Closes #3978, no review.
* Deprecation patrol.Paul Phillips2010-11-0810-20/+25
| | | | | | | | | the same issues as JavaConversions with respect to overloading implicit methods making them inaccessible to view bounds. Fixed JavaConverters. Added a warning for when people overload parameterized implicits: in almost all cases the name is irrelevant so there's little point in unwittingly suffering degraded functionality. No review.
* Fixed crasher with @elidable on parameterized m...Paul Phillips2010-11-081-8/+9
| | | | | | Fixed crasher with @elidable on parameterized methods. Closes #3981, no review.
* This is work on -Ycheck:icode.Paul Phillips2010-11-0819-400/+486
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | distribution can now be built with that option, with or without optimization, and almost all tests cases can. (Those which can't are due to different -Ycheck: issues.) Major changes of interest are as follows: * LOAD_EXCEPTION and THROW are parameterized on the throwable symbol. * Does not squash all traits down to AnyRef, but instead deals with issues as they arise. By observation the cases where one needs a "Foo with Product" to manifest as both a "Foo" and a "Product" at different places are quite rare, so we need not throw out the whole baby. * Exception handlers now have positions. * The remaining checker failures removed, such as CALL_METHOD wanting to pop a value off the stack after calling a constructor. * Many multiply defined values such as REFERENCE(ObjectClass) put in one place (ICodes.scala) and reused. * -Ycheck:icode output (if also given -Ydebug) worthy of Michelangelo. Here is a class and the -Ycheck:icode -Ydebug output for f's block. class A { def f(x: Int, y: String) = try println(x + y.length) catch { case x: NullPointerException => () } } ** Checking Block 4 [S: 3, 2] [P: 1] <closed> 1-> REF(singleton class Predef) 3 + LOAD_MODULE object Predef 2-> INT 3 + LOAD_LOCAL(value x) 3-> REF(class String) 3 + LOAD_LOCAL(value y) 2<- REF(class String) 3 - CALL_METHOD java.lang.String.length (dynamic) 3-> INT 3 + CALL_METHOD java.lang.String.length (dynamic) 2<- INT 3 - CALL_PRIMITIVE(Arithmetic(ADD,INT)) 1<- INT 3 - """ 2-> INT 3 + CALL_PRIMITIVE(Arithmetic(ADD,INT)) 1<- INT 3 - BOX INT 2-> REF(class Integer) 3 + BOX INT 1<- REF(class Integer) 3 - CALL_METHOD scala.Predef.println (dynamic) 0<- REF(singleton class Predef) 3 - CALL_METHOD scala.Predef.println (dynamic) Review by dragos (I marked the specific spots I thought of interest with "PP to ID" which makes it sound like I'm talking to my primal self. Next week on programmer theater: "PP to SUPEREGO.")
* Modified the lub calculation in TypeKinds to av...Paul Phillips2010-11-082-15/+42
| | | | | | | | | | | Modified the lub calculation in TypeKinds to avoid the icode checker failures described in ticket #3872. This does not alter the compiler's lub calculation as I'd hoped because I could not figure out how to accomplish this without having unintended consequences. I think that either Symbol.isLess could be adjusted, or perhaps the implementation of spanningTypes, or other places... but it eluded me and I defer to the type wizards. No review.
* A bit of -Xshow-class / -Xshow-object which did...Paul Phillips2010-11-081-15/+45
| | | | | | | | | | | | A bit of -Xshow-class / -Xshow-object which didn't quite make the Global patch. Now type selections should do the right thing, e.g. scalac -Xshow-class Global#Run src/compiler/scala/tools/nsc/Global.scala will show you interesting things about Run. Or see the test case for even more thrills. No review.
* Proper fix for adaptToNewRun for toplevel class...Eugene Vigdorchik2010-11-081-3/+5
| | | | | | Proper fix for adaptToNewRun for toplevel classes; if the compiler is running after flatten, then nothing to adapt
* [scaladoc] Fixes build. No review.Gilles Dubochet2010-11-082-58/+71
|
* An overhaul of Global.Paul Phillips2010-11-078-323/+407
| | | | | | | | | | | | | | | | | | consistently, and remove things which are not being used anywhere in the visible universe. Beyond general polish here are some of the feature-like additions I can remember: * -Xshow-phases now includes descriptions of the phases. * -Xshow-class and -Xshow-object did not work as far as I could tell: if they didn't, now they do. If they did, now they work better. And you don't have to give it a fully qualified name anymore. * -Xprint-icode will generate *.icode files (don't also have to say -Xprint:icode) * counts of deprecation and unchcked warnings are given * More documentation of what global is doing. I tried not to break anything which might be using Global, but let me know if I overshot somewhere. No review.
* [scaladoc] Annotations are modeled and printed.Gilles Dubochet2010-11-054-32/+103
|
* Temporarily UndoEugene Vigdorchik2010-11-051-1/+1
|
* Sync toplevels after namer but before typecheck...Eugene Vigdorchik2010-11-051-2/+4
| | | | | | Sync toplevels after namer but before typechecker to be in time to flag toplevel removal. Review by odersky
* Need to rebind toplevel symbols to handle delet...Eugene Vigdorchik2010-11-051-1/+1
| | | | | | Need to rebind toplevel symbols to handle delete/recreate scenario. Review by odersky.
* Presentation compiler: not adapting to the new ...Eugene Vigdorchik2010-11-041-1/+1
| | | | | | Presentation compiler: not adapting to the new symbol for ThisType for class syms causes false errors in Eclipse
* Check for npe in the last commitHubert Plociniczak2010-11-041-1/+1
|
* Some further changes related to r23434.Hubert Plociniczak2010-11-043-18/+17
|
* Determined that half a dozen ways of checking f...Paul Phillips2010-11-0420-254/+263
| | | | | | | | | | | Determined that half a dozen ways of checking for varargs and by-name-ness in param lists exceeded the legal limit. Also assessed that names which are only used as type names would be a lot easier to deal with if we created them as type names up front. Performed the changes implied by the preceding along with a partial cleanup on TreeInfo which one can see hasn't had a good look in a long time. (And still hasn't.) No review.
* Some minor patmat/symbols cleanups, some of whi...Paul Phillips2010-11-043-13/+9
| | | | | | Some minor patmat/symbols cleanups, some of which I could swear I'd already checked in. No review.
* The probable cause of the failing build.Paul Phillips2010-11-031-2/+3
| | | | | | a nice picture of a trap doesn't mean I can't also put my foot through the frame. Aaaagh, my leg, my leg. No review.
* One more mr.Paul Phillips2010-11-0210-363/+327
| | | | | | | | This performs some Name related organization: putting similar name machinery in the same place, renaming some things to be consistent with the other things, giving some names to naked strings, beating back the creeping "if (forMSIL)" tests into class polymorphism, etc. No review.
* Closes #3973. Review by extempore.Iulian Dragos2010-11-021-3/+2
|
* One of those annoying patches for which I apolo...Paul Phillips2010-11-0249-332/+323
| | | | | | | | | | One of those annoying patches for which I apologize in advance. It's a step toward a better world. Almost all the changes herein are simple transformations of "x hasFlag FOO" to "x.isFoo", with the remainder minor cleanups. It's too big to review, so let's say no review: but I'm still all ears for input on the issues mostly outlined in HasFlags.scala.
* Make compile runner thread volatile + remove a ...Eugene Vigdorchik2010-11-021-2/+3
| | | | | | Make compile runner thread volatile + remove a race condition. Review by odersky.
* Added separate bitmaps for private and transien...Hubert Plociniczak2010-11-022-31/+82
| | | | | | | | | | Added separate bitmaps for private and transient lazy vals. Closes #3038, #1573. Review by dragos. I had to fix a couple of initialization issues that checkinit forced me to do and that weren't a problem before because the bitmap was serialized even for @transitive. For that I needed to change the setters in checkinit so that they also update the bitmap.
* Don't crash the compiler for the 'companions in...Hubert Plociniczak2010-11-023-11/+33
| | | | | | | Don't crash the compiler for the 'companions in different files' error. This turned out to be pretty bad for the presentation compiler. References #1286. Review by extempore
* Closes #3932, #1537. Review by extemporeHubert Plociniczak2010-11-022-5/+3
|
* Closes #3927. No reviewHubert Plociniczak2010-11-021-1/+1
|
* Closes #3816. Review by moors.Hubert Plociniczak2010-11-021-2/+3
|
* some cleanup. no reviewHubert Plociniczak2010-11-022-3/+2
|
* Closes #2792. no reviewHubert Plociniczak2010-11-022-8/+17
|
* Created @strictfp annotation in scala.annotation.Paul Phillips2010-11-013-2/+6
| | | | | | your fp with no tolerance for tomfoolery, this is the commit for you. Closes #1708, review by community.
* Don't call exit from MainGenericRunner in a way...Paul Phillips2010-11-011-17/+24
| | | | | | Don't call exit from MainGenericRunner in a way which is impossible to avoid. Closes #3901, no review.
* Don't truncate stack traces in the repl.Paul Phillips2010-11-011-4/+5
|
* Sprinkling in some names to avoid reflective ca...Paul Phillips2010-11-013-6/+11
| | | | | | Sprinkling in some names to avoid reflective calls in the compiler as suggested by magarcia. Closes #3974, no review.
* Removed a disappointly small amount of code ass...Paul Phillips2010-11-011-42/+0
| | | | | | Removed a disappointly small amount of code associated with the obsolete namePos. No review.
* Relaxed non-sensible warning for comparisons wh...Paul Phillips2010-11-012-3/+6
| | | | | | | Relaxed non-sensible warning for comparisons when ScalaNumber is involved, since there is special number logic which makes it wrong to chastise us. No review.
* Made an @inline marked method final because oth...Paul Phillips2010-10-301-1/+1
| | | | | | Made an @inline marked method final because otherwise it won't be inlined. No review.
* Widened the pattern type in the pattern matcher...Paul Phillips2010-10-301-1/+1
| | | | | | | | Widened the pattern type in the pattern matcher's attempt to statically rule out matches so that "abc" match { case _: x.type => } is not incorrectly excluded. No review.
* presentation compiler hardenings.Martin Odersky2010-10-295-7/+17
|
* Some deletions in global based on adriaan's goo...Paul Phillips2010-10-291-37/+12
| | | | | Some deletions in global based on adriaan's good advice. No review.
* Correctly find completion proposals for ImportT...Iulian Dragos2010-10-281-13/+18
| | | | | Correctly find completion proposals for ImportType. review by odersky