summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* evicts calls to reify from our codebaseEugene Burmako2012-07-205-32/+44
| | | | | | | | | | | | | Until reflection design is stabilized (i.e. 2.10.0 final is released), it's a good idea to refrain from using reify in our codebase (either directly in quasiquotes, or indirectly via materialized type tags). This increases the percentage of changes to reflection that don't require rebuilding the starr. The change to build.xml will expose reifications going on during our build (by printing out their results to the console, so that they bug everyone), making it easier to spot and fix them.
* an improvement based on Adriaan's commentEugene Burmako2012-07-201-1/+7
| | | | | | | | | | | | | | | """ why use asTypeConstructor for a prefix? shouldn't that be BaseUniverseClass.thisType? also, why does the prefix need to be changed at all? I'm sure there's a valid reason, but it would be good to document it. if you don't need to change the prefix, use appliedType(tagType.typeConstructor, List(tpe)) """ Because we need to look for an implicit of type base.Universe # TypeTag[$tpe]. I figured out that this is exactly the internal representation of that type.
* SI-5999 staticXXX is now friendly to packagelessEugene Burmako2012-07-201-47/+77
|
* SI-5949 updates documentation of staticClassEugene Burmako2012-07-201-0/+18
|
* SI-5999 removes the macro context mirrorEugene Burmako2012-07-202-45/+1
| | | | | | | | | It is impossible to enforce macro programmers to use this mirror instead of c.universe.rootMirror, so it has to be let go. As to packageless symbol loading, which was the sole purpose of introducing a special mirror for macro contexts, it will be integrated into the compiler mirror in subsequent commits.
* more meaningful name for a missing hook methodEugene Burmako2012-07-201-2/+2
|
* SI-5999 deploys a new starrEugene Burmako2012-07-201-4/+0
| | | | That doesn't require Context.reify anymore.
* SI-5999 removes Context.reifyEugene Burmako2012-07-205-49/+11
| | | | | | | | | | | | | | | | | | | | | | Currently there are discrepancies between the behavior of c.reify and c.universe.reify. First step in fixing these problems is removing the duplication in the API. That's why I'm cutting away the Context.reify shortcut. Context.reify is a magic macro, hardwired in the fast track mechanism, so removing it requires redeploying the starr (because an old starr will crash if launched on sources that don't contain Context.reify). To cleanly redeploy a starr I've left a Context.reify stub in sources, but hidden it behind a `protected` modifier. When starr is redeployed (in a subsequent commit) the stub will be removed. I've also updated the tests to use c.universe.reify instead of c.reify. This will break some of them, because c.universe.reify uses a standard compiler mirror, which unlike a macro mirror doesn't like packageless classes. That's an annoyance, but I think having clean separation of commits is more important that being 100% consistent.
* Merge pull request #929 from scalamacros/ticket/5895Adriaan Moors2012-07-203-53/+150
|\ | | | | fixes field mirrors and also improves docs and exceptions for all mirrors
| * improves docs of scala.reflect.api.MirrorsEugene Burmako2012-07-191-34/+110
| |
| * SI-5984 improves error reporting in JavaMirrorsEugene Burmako2012-07-192-17/+31
| | | | | | | | | | | | | | | | | | | | Factors out error raising code and introduces a special exception class for Scala reflection errors. Also adds membership sanity checks to reflectXXX. Previously reflectField, reflectMethod, reflectClass and reflectModule in InstanceMirror didn't check that the symbols being passed to them actually correspond to some member of the related class.
| * SI-5895 fixes FieldMirrorsEugene Burmako2012-07-171-9/+16
| | | | | | | | | | | | | | reflectField now accepts getters and setters along with the field symbols, it also checks whether a field has a reasonable binary representation (this is necessary, because ctor parameters that are unused outside of their declaring constructors don't get compiled down to Java fields/methods).
* | Merge pull request #952 from adriaanm/ticket-4897Adriaan Moors2012-07-191-1/+1
|\ \ | | | | | | SI-4897 derive expected value from single type
| * | SI-4897 derive expected value from single typeAdriaan Moors2012-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | when the type in a type test is, say, `C.this.A.type`, must use the corresponding term `C.this.A` to test for equality if you use the naive REF(<C.this.A.type>.symbol), you'll get a path like `OwnerOfA.this.A`, where `OwnerOfA` might be a superclass of `C`, and explicitouter won't like that
* | | Merge pull request #947 from phaller/topic/sip14-critical-fixes-blockingAdriaan Moors2012-07-198-440/+70
|\ \ \ | | | | | | | | Critical bugfixes/leak fixes/API corrections + ScalaDoc for SIP-14
| * | | Clean ups in impl.Futurephaller2012-07-192-13/+4
| | | |
| * | | Critical bugfixes/leak fixes/API corrections + ScalaDoc for SIP-14Viktor Klang2012-07-197-427/+66
| | | |
* | | | Print the stack trace.Paul Phillips2012-07-191-1/+2
| | | | | | | | | | | | | | | | We're not completely blind in there, are we.
* | | | Shield from InterruptedException in partest.Paul Phillips2012-07-191-1/+4
|/ / / | | | | | | | | | Sorry, I'm not in practice with java.util.concurrent.
* | | Merge pull request #919 from scalamacros/ticket/6086Adriaan Moors2012-07-191-1/+1
|\ \ \ | | | | | | | | SI-6086 magic symbols strike back
| * | | SI-6086 magic symbols strike backEugene Burmako2012-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the symbols inside the compiler get created on the fly, because there are no physical entities in classfiles corresponding to them. This curious fact needs to be taken into account when loading symbols, so that the magic symbols get correctly loaded by reflective mirrors. magicSymbols (as defined in Definitions.scala) include not only top-level classes, but some other stuff (e.g. String_+ or methods on Any). Hence a filtering was done to exclude the stuff that's irrelevant to reflective symbol loading. Unfortunately a filter was configured to accept only _.isClass, which consequently ruled out scala.AnyRef (that is a type alias).
* | | | Merge pull request #944 from dgruntz/issue/EpsilonAdriaan Moors2012-07-192-6/+0
|\ \ \ \ | | | | | | | | | | Removes Float.Epsilon and Double.Epsilon
| * | | | Removes Float.Epsilon and Double.EpsilonDominik Gruntz2012-07-192-6/+0
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Float.Epsilon and Double.Epsilon contain the wrong value. Epsilon should be an upper bound on the relative error due to rounding errors in floating point arithmetic, i.e. it is 1/2 ULP (unit in the last position) which is 2^(-24) for Float and 2^(-53) for Double. This was discussed in detail in https://issues.scala-lang.org/browse/SI-3791 and it was decided to deprecate Epsilon for 2.9 and to remove it for 2.10 and to reintroduce it with the correct value for 2.11. See also the discussion (and comment from Martin) on https://groups.google.com/forum/?fromgroups#!topic/scala-internals/m763WjBdfyo
* | | | Merge pull request #943 from adriaanm/rebase-ticket-5939Adriaan Moors2012-07-193-17/+12
|\ \ \ \ | | | | | | | | | | SI-5939 resident compilation of sources in empty package
| * | | | SI-5939 resident compilation of sources in empty packageMartin Odersky2012-07-193-17/+12
| |/ / / | | | | | | | | | | | | Empty packages can now be cleanly invalidated.
* | | | Merge pull request #906 from adriaanm/optimize-findmemberAdriaan Moors2012-07-1911-73/+226
|\ \ \ \ | |/ / / |/| | | Optimize findmember
| * | | Variation #10 to optimze findMemberMartin Odersky2012-07-143-49/+55
| | | | | | | | | | | | | | | | Undoing the memberType caching. This seems to make it slower rather than faster. Also, comparing new vs old statistics shows that only very few asSeenFrom operations are saved by the caching.
| * | | Attempt #9 to opimize findMember.Martin Odersky2012-07-141-24/+43
| | | | | | | | | | | | | | | | Also avoid recomputation of memberType in findMembers
| * | | Attempt #8 to opimize findMember.Martin Odersky2012-07-141-1/+3
| | | | | | | | | | | | | | | | Only consider DEFERRED members in 2nd pass.
| * | | Attempty #7 to optimize findMemberMartin Odersky2012-07-141-18/+45
| | | | | | | | | | | | | | | | memberType operations are not cached, so that at most one memberType is taken per found symbol.
| * | | Fixing problem that caused fingerprints to fail in reflection.Martin Odersky2012-07-144-4/+5
| | | | | | | | | | | | | | | | Also fixed test case that failed when moving to findMembers. Avoids similar problems in the future by renaming nme.ANYNAME
| * | | Attemmpt #6 to optimize findMemberMartin Odersky2012-07-141-16/+19
| | | | | | | | | | | | | | | | Replace scope by ::-list, where new elements are added at the end.
| * | | Attempt #5 to optimize findMember.Martin Odersky2012-07-141-53/+52
| | | | | | | | | | | | | | | | Specific optimizations to findMember that have become possible because findMembers is its own function now.
| * | | Attempt #4 to optimize findMemberMartin Odersky2012-07-141-1/+70
| | | | | | | | | | | | | | | | broke out findMembers as a separate operation to streamline the code. findMember itself still needs to be optimized.
| * | | Attempt #3 to optimize findMemberMartin Odersky2012-07-144-8/+23
| | | | | | | | | | | | | | | | Fixed fingerPrinting scheme to work with rehashes, also added finger prints to typedIdent searches.
| * | | Attempt #2 to optimize findMemberMartin Odersky2012-07-143-12/+12
| | | |
| * | | Attempt #1 to optimize findMemberMartin Odersky2012-07-142-4/+16
| | | | | | | | | | | | | | | | Keeps fingerprints in scopes which are bitsets telling you what the last 6 bits of each hashcode of the names stored in the scope are. findMember will avoid looking in a scope if inferprints do not match.
* | | | Merge pull request #922 from dragos/issue/fix-SI-6092Adriaan Moors2012-07-192-6/+16
|\ \ \ \ | | | | | | | | | | SI-6092 don't leak in LazyAnnotationInfo, don't lift try{}finally{}
| * | | | Fixed SI-6092. Fixed leaky annotations, and relaxed the conditions under ↵Iulian Dragos2012-07-182-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which a try-catch is lifted out to an inner method. Less known fact: lazy values null-out their dependent values is their accessed only from their initializer. The analysis is not context-dependent (meaning the owner where a reference happens needs to be exactly that lazy value). * Removed no-op code around positions in `LazyAnnotationInfo` * Don't lift expressions that have no `catch` clause The two changes combined fix a memory leak that's been plaguing the IDE: an annotation (even when forced) would hang on to a namer, through the outer field of its call-by-name parameter. The test for the memory leak is in the IDE project (couldn't find a simple way to reproduce it outside the IDE), but there's a test checking that the field is null after initialization.
* | | | | Merge pull request #939 from adriaanm/ticket-6089Adriaan Moors2012-07-191-5/+11
|\ \ \ \ \ | | | | | | | | | | | | SI-6089 better tail position analysis for matches
| * | | | | SI-6089 better tail position analysis for matchesAdriaan Moors2012-07-181-5/+11
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | we mistakenly went into apply nodes to look for matchEnd-labeldefs in tail positions -- only apply nodes that jump to labels in tailpos should be traversed (this arises for nested matches)
* | | | | Merge pull request #940 from axel22/issue/5937Adriaan Moors2012-07-181-10/+16
|\ \ \ \ \ | | | | | | | | | | | | SI-5937: Vector updated, +:, and :+ ignore provided builder, breaking type safety
| * | | | | Make field strict and private.Aleksandar Prokopec2012-07-181-1/+1
| | | | | |
| * | | | | Fix SI-5937.Aleksandar Prokopec2012-07-181-10/+16
| | | | | |
* | | | | | Merge pull request #935 from scalamacros/ticket/5695Adriaan Moors2012-07-182-5/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-5695 removes Context.enclosingApplication
| * | | | | | SI-5695 removes Context.enclosingApplicationEugene Burmako2012-07-182-5/+0
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently it's impossible to find out the enclosing Apply node if you're an argument being typechecked (because the arguments are typechecked separately from the enclosing Apply). This functionality is by far not a core feature of macros, so I'm removing it.
* | | | | | Merge pull request #909 from lrytz/t5892Adriaan Moors2012-07-182-2/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-5892 allow implicit views in annotation args
| * | | | | | SI-5892 allow implicit views in annotation argsLukas Rytz2012-07-182-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the problem was that lazy annotations got completed in phase pickler. the `inferView` method in Typers bails out if `isPastTyper`. now the lazy annotations completes `atPhase(typerPhase)`. test case in `pos`. the second test case in `neg` is for another bug that is discussed in a comment of SI-5892. when type checking arguments of type parameter annotations, the class members should not be in scope. this was alreay fixed in 9129cfe9.
* | | | | | | Merge pull request #934 from paulp/partest-timeoutAdriaan Moors2012-07-181-1/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Increase partest timeout and emit warning when it hits.
| * | | | | | | Increase partest timeout and emit warning when it hits.Paul Phillips2012-07-171-1/+2
| | |/ / / / / | |/| | | | |