summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1023 from paulp/issue/6084Adriaan Moors2012-08-042-1/+16
|\ | | | | Fix for SI-6084, type alias crasher.
| * Fix for SI-6084, type alias crasher.Paul Phillips2012-07-302-1/+16
| | | | | | | | | | | | "no need for pt.normalize here, is done in erasure" ORLY? Review by @adriaanm.
* | Merge pull request #1040 from hubertp/issue/asm-long-signatures-againJosh Suereth2012-08-042-4/+3009
|\ \ | | | | | | Fixes SI-6172.
| * | Fixes SI-6172.Hubert Plociniczak2012-08-022-4/+3009
| | | | | | | | | | | | | | | All the credit for fixing magical constants in the encoding algorithm goes to @magarciaEPFL. This time provided a test case that exercises GenASM.
* | | Merge pull request #1028 from odersky/topic/worksheetAdriaan Moors2012-08-044-22/+47
|\ \ \ | | | | | | | | Made worksheet output wrap around after custimizable # of output columns
| * | | Better worksheet support.Martin Odersky2012-08-034-19/+40
| | | | | | | | | | | | | | | | We now move instrumentation info to the end of lines where possible so that line and column positions are kept unchanged wrt original source. This is important for error reporting.
| * | | Made worksheet output wrap around after custimizable # of output columns.Martin Odersky2012-07-312-8/+12
| | | |
* | | | Merge pull request #1046 from scalamacros/topic/statictpe-actualtpeJosh Suereth2012-08-043-7/+7
|\ \ \ \ | | | | | | | | | | staticTpe => staticType, actualTpe => actualType
| * | | | staticTpe => staticType, actualTpe => actualTypeEugene Burmako2012-08-043-7/+7
|/ / / /
* | | | Merge pull request #1022 from odersky/ticket/5764Josh Suereth2012-08-031-1/+1
|\ \ \ \ | | | | | | | | | | SI-5764 Honor -language:_
| * | | | SI-5764 Honor -language:_Martin Odersky2012-07-301-1/+1
| | |_|/ | |/| | | | | | | | | | We now enable all language feature if -language:_ is given on the command line. Review by @paulp
* | | | Merge pull request #982 from adriaanm/ticket-wolfcryJosh Suereth2012-08-0312-22/+56
|\ \ \ \ | | | | | | | | | | SI-5930 SI-5897 reduce redundant warnings in matches, fix flags usage
| * | | | use hasAllFlags to detect gadt skolemsAdriaan Moors2012-07-241-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trying to compromise between - easy discovery of what special mix of flags identifies a gadt skolem - ensuring that hasAllFlags is used and not hasFlag keeping the secret combo close to the creator/detector methods instead of moving them to Flags ideally, we'd allocate a new bit in Flags, but that's to invasive right now these symbols are also relatively short-lived: thet are created in adaptConstrPattern and removed at the end of typedCase
| * | | | SI-5930 don't warn about dead code in jump to caseAdriaan Moors2012-07-243-1/+10
| | | | |
| * | | | SI-5897 don't check sensicality in matchAdriaan Moors2012-07-243-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | the pattern matching analysis should be more precise anyway (don't warn twice)
| * | | | move synthetic case symbol detection to treeInfoAdriaan Moors2012-07-246-17/+28
| | | | | | | | | | | | | | | | | | | | encapsulate creating synthetic case labels while we're at it
* | | | | Merge pull request #1034 from xuwei-k/fix-scaladocJosh Suereth2012-08-034-5/+5
|\ \ \ \ \ | | | | | | | | | | | | minor fixes scaladoc
| * | | | | minor fixes scaladocxuwei-k2012-08-014-5/+5
| | | | | |
* | | | | | Merge pull request #1039 from scalamacros/topic/ultimate-reflection-pull-requestJosh Suereth2012-08-02311-997/+1330
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | Ultimate reflection pull request
| * | | | | first stab at serialization of exprs and tagsEugene Burmako2012-08-0213-25/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of trying to serialize the entire universe and failing miserably (which happens now), exprs and type tags will now serialize their creators and deserialize into scala.reflect.basis. Since creators produced by reification are not serializable right now, serialization will crash. That's a small improvement over state of the art functionality-wise, but it's a step forward robustness-wise. Next step in this direction is generation of serialization code for creators. Related issues: SI-5919 and SI-5908. Also see the discussion at scala-internals http://groups.google.com/group/scala-internals/browse_thread/thread/ef63f8b5bd194c7c
| * | | | | deploys a new starr that knows reify is a macroEugene Burmako2012-08-026-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reify has just been moved to base.Universe from api.Universe, so the fast track in the old starr doesn't know about its existence. Therefore locker is built without reify having the MACRO flag, thus it won't be able to expand reify. Strictly speaking we don't need a new starr, because reify isn't used in scalac so, even though locker won't recognize reify, quick will be fine. However you don't know where a little sloppiness is going to bite you, so I took time to rebuild and push the new starr. It was as simple as "ant build starr.done" of the parent commit. No file mingling was required.
| * | | | | moves Expr from api to baseEugene Burmako2012-08-0210-88/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first step in supporting serialization for exprs and type tags. Generally speaking universes and mirrors cannot be serialized (even not taking into account all the amount of scalac-specific transient stuff, java mirrors use classloaders, which are not serializable). Hence we can only serialize tree and type creators, and deserialize them into the mirror we surely know will be there - the scala.reflect.basis.rootMirror. To do that we need to have exprs in scala.reflect.base. Luckily all the trees are already in base, we only need to move a single file to scala-library.jar. Another good news is that reification logic is simplified, because we don't have to special case exprs as being defined in ApiUniverseClass.
| * | | | | evicts last traces of makro from our codebaseEugene Burmako2012-08-02167-238/+222
| | | | | | | | | | | | | | | | | | | | | | | | Removes the stubs left out to appease the old starr, fixes macro tests.
| * | | | | reflect.makro => reflect.macros (Step I)Eugene Burmako2012-08-0260-78/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Builds a starr that uses stuff from scala.reflect.macros for macro activities. Crucial makro thingies (such as makro.Context or makro.internal.macroImpl) are temporarily left in place, because they are necessary for previous starr. Macro tests will be fixed in a dedicated commit, so that they don't pollute meaningful commits, making the life easy for reviewers and spelunkers.
| * | | | | removes -Xmacro-(.*)-classpath compiler optionsEugene Burmako2012-08-024-68/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These options were meant to be used to bootstrap macros defined in our codebase However we can bootstrap perfectly without any additional effort, because library classpath classloader can delegate to tool classpath classloader to load macro implementations from starr. Since then (for several months) this functionality hasn't proven to be useful, neither anyone on the mailing list or stackoverflow asked questions about it (even despite it was explicitly mentioned in the "cannot load macro impl" error message). Hence I suggest that it is totally unnecessary and should be removed.
| * | | | | prepares our macro defs for refactoring (Step II)Eugene Burmako2012-08-027-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the previous commit the compiler doesn't need any help to find out that fast-tracked macros are macros. Hence I'm replacing their RHSes with the universal ??? body. This way macro definitions defined in scala (for example, tag materialization macros or certain string formatters) won't stand in the way of the changes to the macro system.
| * | | | | prepares our macro defs for refactoring (Step I)Eugene Burmako2012-08-028-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In our codebase we have a bunch of macros, and some of those macros (namely, tag materialization macros and string context "f" formatter) are used inside the compiler itself. The logic of those macros is hardwired into starr's fast track, so it doesn't rely on any of the subsystems of the macro engine to be located, bound and executed. But to trigger this logic we need to color these macros as macros, i.e. as term symbols having the MACRO flag. Currently this works automatically, because fast track macros (the same as regular macros) have their rhs in the "macro ???" form. Having seen the "macro" keyword, the compiler knows that the corresponding def declares a macro and sets the MACRO flag. As the latest refactoring attempt has shown, the "macro" in "macro ???" is unnecessary and might stand in the way of macro refactorings. After all if some symbol is in the fast track registry, then it's definitely a macro. Hence I'm changing the compiler to not need the "macro" keyword in declarations of fast track macros anymore.
| * | | | | more refinements of reflection APIEugene Burmako2012-08-0213-148/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a bunch of test methods to symbols to cover public flags: (e.g. isPrivate, isFinal, isOverride, isImplicit, etc). I'd argue that the API duplication w.r.t flag sets is trumped by unified interface to tests and better encapsulation. Also updated the API to be easier to understand after prior exposure to Java or .NET reflection APIs: 1) Added typeParams to TypeSymbol and ClassSymbol. 2) Renamed MethodSymbol.resultType to returnType. 3) Removed the distinction between MethodSymbol.params vs MethodSymbol.allParams now we just have MethodSymbol.params: List[List[Symbol]].
| * | | | | SI-5888 Mirrors now have sane toStringsEugene Burmako2012-08-023-1/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds informative toString for InstanceMirror, FieldMirror, MethodMirror (for methods and constructors), ClassMirror and ModuleMirror. Universe mirrors (e.g. JavaMirrors or compiler mirrors) already have good toString methods that show their affiliation and/or classpaths.
| * | | | | renames asType to toType and asXXXSymbol to asXXXEugene Burmako2012-08-0245-181/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This renaming arguably makes the intent of `asType` more clear, but more importantly it shaves 6 symbols off pervasive casts that are required to anything meaningful with reflection API (as in mirror.reflectMethod(tpe.member(newTermName("x")).asMethodSymbol)).
| * | | | | miscellaneous refinements of reflection APIEugene Burmako2012-08-0215-101/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Removed unnecessary (i.e. implementable with pattern matching) type APIs. 2) Renamed isHigherKinded to takesTypeArgs making it easier to understand. 2) typeParams and resultType have been moved from MethodType to MethodSymbol Strictly speaking they are superfluous, but they are used very often.
| * | | | | navigation between fields and accessorsEugene Burmako2012-08-025-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This works around SI-5736 that's been deemed too risky to be fixed in 2.10.0. A reflection newbie will be unlikely to acquire a field symbol from its name, but the `accessed` method provides an easy way to navigate to it from a getter.
| * | | | | moves most of symbol tests in API to descendantsEugene Burmako2012-08-021-73/+61
| | | | | | | | | | | | | | | | | | | | | | | | Things like tpe.member("foo").isSkolem don't make much sense.
| * | | | | simplifies flag APIEugene Burmako2012-08-028-42/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flag ops now only include | and hasFlag, flag bearer ops now only include flags and hasFlag. These abstractions are enough to implement everything else, so let's stick to them for the sake of minimalism.
| * | | | | SI-5732 members and derivatives now return ScopeEugene Burmako2012-08-0221-121/+178
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firstly this unifies the reflection API - now both decls and members return Scope (not Scope and List[Symbol] as it were before). Secondly this fixes SI-5732 without having to sort the result of members. Type.members now returns Scope, a distinguished type, which has the `sorted` method, which does the required sorting if necessary. Also removes nonPrivateMembers and nonPrivateDeclarations to keep the API minimalistic (as can be seen from their implementation in internal.Types they are just members and decls with bridges and private members removed).
* | | | | Merge pull request #1030 from scalamacros/ticket/5751Josh Suereth2012-08-029-113/+153
|\ \ \ \ \ | | | | | | | | | | | | SI-5751 cleans up toolboxes for the release
| * | | | | SI-5751 cleans up toolboxes for the releaseEugene Burmako2012-07-319-113/+153
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes the `freeTypes` parameters on `typeCheckExpr` and `runExpr`, since we now have public `substituteTypes` on both trees and types. Also implements long-awaited `inferImplicitValue` and `inferImplicitView` (thanks to Miles Sabin for nudging me!)
* | | | | Merge pull request #1032 from hubertp/issue/asm-long-signaturesJosh Suereth2012-08-011-2/+7
|\ \ \ \ \ | | | | | | | | | | | | I actually managed to hit the limit of Scala signature annotation not fi...
| * | | | | I actually managed to hit the limit of Scala signature annotation not ↵Hubert Plociniczak2012-07-311-2/+7
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fitting into a single string (high five everyone) and entered the undisovered region of arrEncode in GenASM. arrEncode returns Array[String] so asm.AnnotationWriter is not going to like it. Already discussed with @magarciaEPFL but please review again.
* | | | | Merge pull request #1029 from odersky/ide/getlinkposJosh Suereth2012-08-011-4/+15
|\ \ \ \ \ | |/ / / / |/| | | | Added more variants to achieve getLinkPos
| * | | | Added more variants to achieve getLinkPosMartin Odersky2012-07-311-4/+15
| |/ / / | | | | | | | | | | | | getLinkPos is known to be flakey. This commit tries some variants and logs what failed.
* | | | Merge pull request #1024 from paulp/topic/type-printingJosh Suereth2012-07-312-12/+18
|\ \ \ \ | |/ / / |/| | | Fixed maddening "..." lately in printed types.
| * | | Checkfile update.Paul Phillips2012-07-301-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | I screwed around with type printing for a long time and now I have to be done, so I suggest we accept the imperfection in here for now because it's still way ahead of "..." as types go.
| * | | Fixed maddening "..." lately in printed types.Paul Phillips2012-07-301-2/+8
| | |/ | |/| | | | | | | | | | | | | This must have been me when I eliminated some of the remaining distinction between TypeRef(_, moduleClass, Nil) and SingleType(_, moduleClass). Sorry I didn't track it down sooner. Review by anyone who is around because this is overdue.
* | | Merge pull request #1020 from odersky/ticket/5866Josh Suereth2012-07-303-2/+23
|\ \ \ | | | | | | | | SI-5866 Support casting null to value classes
| * | | SI-5866 Support casting null to value classesMartin Odersky2012-07-303-2/+23
| | | | | | | | | | | | | | | | The fix now supports null.asInstanceOf[C] where C is a value class that wraps a primitive type.
* | | | Merge pull request #1018 from scalamacros/topic/classtag-of-nothingJosh Suereth2012-07-302-32/+37
|\ \ \ \ | | | | | | | | | | ClassTag.Nothing now throws an exception
| * | | | ClassTag.Nothing now throws an exceptionEugene Burmako2012-07-302-32/+37
| |/ / / | | | | | | | | | | | | | | | | Nothing is a bottom type, so it doesn't make much sense for it to have a meaningful erasure (ClassTag.Nothing.runtimeClass).
* | | | Merge pull request #1016 from hubertp/2.10.x-issue/5031Josh Suereth2012-07-308-5/+28
|\ \ \ \ | | | | | | | | | | Fixed SI-5031. Only consider classes when looking for companion class.
| * | | | Fixed SI-5031. Only consider classes when looking for companion class.Hubert Plociniczak2012-07-308-5/+28
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | sym.effectiveOwner revealed this piece of inconsistency. companionModule is fine because similar check is there already. Review by @paulp.