summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1246 from lrytz/t6274Paul Phillips2012-09-042-3/+7
|\ | | | | SI-6274 Fix owners when eta-expanding function with byName param
| * SI-6274 Fix owners when eta-expanding function with byName paramLukas Rytz2012-09-042-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | When eta-expanding a function that takes a by-name param the local definition for the corresponding argument is a function-0 val eta$1 = () => { argument-to-by-name } If there are any definitinos in the `argument-to-by-name`, the symbol owner needs to be changed to the anonymous function's symbol. To know the function symbol in eta expand, we need to type-check the function, and therefore pass the `Typer` instance to `etaExpand`.
* | Merge pull request #1217 from axel22/issue/6294Paul Phillips2012-09-041-2/+5
|\ \ | | | | | | Fix SI-6294.
| * | Fix SI-6294.Aleksandar Prokopec2012-08-301-2/+5
| | |
* | | Merge pull request #1192 from jsuereth/deprecate/low-hangingPaul Phillips2012-09-047-0/+7
|\ \ \ | |_|/ |/| | Deprecate unmaintained/old classes for removal in 2.11
| * | Deprecate unmaintained/old classes for removal in 2.11Josh Suereth2012-08-247-0/+7
| | |
* | | Made Dynamic extend Any.Paul Phillips2012-09-031-5/+5
| | | | | | | | | | | | So it can be used in value classes.
* | | Merge pull request #1235 from paulp/topic/beautify-typedPaul Phillips2012-09-021-140/+51
|\ \ \ | | | | | | | | Formatting cleanup in def typed.
| * | | Formatting cleanup in def typed.Paul Phillips2012-09-011-140/+51
| | | | | | | | | | | | | | | | As seen on scala-internals.
* | | | Merge pull request #1202 from scalamacros/topic/reflectionPaul Phillips2012-09-0213-48/+63
|\ \ \ \ | | | | | | | | | | further polishing of reflection
| * | | | definitive way to learn if a symbol is a val/varEugene Burmako2012-08-272-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | I think `isVal` and `isVar` are the right names, because they exactly map on Scala syntax.
| * | | | Exposes Symbol.sourceModuleEugene Burmako2012-08-272-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed, this is not the best API to expose, because this is an implementation detail that might change. However the ship has sailed. We're already imposing the moduleClass <-> sourceModule quirk to the users of our API: Evidence: http://stackoverflow.com/questions/12128783. There are reflection tasks that cannot be pulled without the knowledge of this implementation detail, so we shouldn't pretend that we can change it on a whim and not break anything. Hence I propose to add sourceModule to the public contract and bear the potential consequences.
| * | | | rehash of source file information for SymbolEugene Burmako2012-08-272-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Symbol.pos is moved to macros.Universe, because it's empty at runtime. Also added Symbol.associatedFile, because it has valid usages during runtime. When reflecting one might want to get to a classfile of the symbol and then analyze it to e.g. decompile the bytecode or find out the associated src file.
| * | | | removes AbstractFileApiEugene Burmako2012-08-279-39/+17
| | | | | | | | | | | | | | | | | | | | | | | | | no longer necessary, since scala.tools.nsc.io.AbstractFile has been long moved to scala-reflect.jar
| * | | | Exposes ToolBox.classLoaderEugene Burmako2012-08-272-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By giving ToolBox.mirror the correct type and constructing the underlying mirror from a proper classloader, we improve user experience w.r.t runtime code generation. Direct motivator: http://stackoverflow.com/questions/12122939, in which instances of a toolbox-generated class are accessed with Scala reflection.
| * | | | exposes MethodSymbol.isPrimaryConstructorEugene Burmako2012-08-271-0/+3
| | | | | | | | | | | | | | | | | | | | Doesn't seem to be inferrable from the API we expose right now
| * | | | Exposes Symbol.deSkolemize to macrosEugene Burmako2012-08-271-0/+2
| | | | |
| * | | | adds Symbol.isJavaEugene Burmako2012-08-272-0/+5
| | | | | | | | | | | | | | | | | | | | Doesn't seem to be inferrable from the API we expose right now
| * | | | adds ClassSymbol.baseClassesEugene Burmako2012-08-272-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sure this stuff is also declared in Type.baseClasses, but this is one of the hot paths in reflection (e.g. like ClassSymbol.typeParams), so I think it's justified to have it as a dedicated method. Unfortunately we cannot remove Type.baseClasses, because it includes ridiculously involved calculation of base classes for compound types.
| * | | | exposes Symbol.childrenEugene Burmako2012-08-272-0/+6
| | |_|/ | |/| | | | | | | | | | As requested in http://stackoverflow.com/questions/12078366/
* | | | Merge pull request #1231 from paulp/issue/6273Josh Suereth2012-09-022-3/+7
|\ \ \ \ | | | | | | | | | | Fix for SI-6273, repl string interpolation.
| * | | | Fix for SI-6273, repl string interpolation.Paul Phillips2012-09-012-3/+7
| | |/ / | |/| | | | | | | | | | | | | | | | | | As usual the hard part is tracing through all the needless abstraction. Begone, 25 layers of parsing error issuing methods!
* | | | Better errors for Any/AnyRef issues.Paul Phillips2012-09-014-50/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an error occurs because some type does not conform to AnyRef (and an AnyRef-derived type would have sufficed) try to say something useful about the situation. This commit also initializes scope members before printing error messages because the + version seems more useful than the - version (taken from one of the checkfile diffs.) - def <init>: <?> - def methodIntIntInt: <?> + def <init>(): X + def methodIntIntInt(x: scala.Int,y: scala.Int): scala.Int
* | | | Fix for SI-6263, futile adaptation.Paul Phillips2012-09-011-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Don't try to implicitly convert an unstable prefix to a stable one by applying a view. As the matrix spoon kid says, "that's impossible."
* | | | Suppressed 'possible cause' mis-warning.Paul Phillips2012-09-011-1/+10
|/ / / | | | | | | | | | | | | I have seen this warning a bunch of times and it has not yet been close to right.
* | | Merge pull request #1227 from paulp/issue/6034Paul Phillips2012-09-013-3/+10
|\ \ \ | | | | | | | | Fix for SI-6034, covariant value classes.
| * | | Fix for SI-6034, covariant value classes.Paul Phillips2012-08-313-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My summary in the ticket was incorrect. The problem was that the class type parameters were being cloned for the method and being allowed to keep their variance. I threw in an assertion for anyone attempting to create a method type with variant type parameters, because hey, why should we allow such madness.
* | | | Merge pull request #1201 from axel22/issue/4581Josh Suereth2012-09-011-2/+8
|\ \ \ \ | | | | | | | | | | Fix SI-4581.
| * | | | Fix SI-4581.Aleksandar Prokopec2012-08-271-2/+8
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Specifically, the final flag on the generated static field is no longer ommitted. Fix 2 failing test-cases.
* | | | Merge pull request #1222 from jsuereth/fix/sbt-buildJosh Suereth2012-09-011-3/+7
|\ \ \ \ | | | | | | | | | | SBT build now works with SBT 0.12.
| * | | | SBT build now works with SBT 0.12.Josh Suereth2012-08-311-3/+7
| | | | | | | | | | | | | | | | | | | | Also fixed partest explosion that happened after partest redesign.
* | | | | Merge pull request #1225 from jsuereth/fix/si-6290Josh Suereth2012-09-012-7/+14
|\ \ \ \ \ | | | | | | | | | | | | Fixes SI-6290 by creating real instnaces of language features.
| * | | | | Fixes SI-6290 by creating real instnaces of language features.Josh Suereth2012-08-312-7/+14
| |/ / / /
* | | / / More useful -Xlog-implicits output.Jason Zaugg2012-09-011-4/+4
| |_|/ / |/| | | | | | | | | | | | | | | The test exercises the most important case, when implicits are invalidated through shadowing. (See SI-4270)
* | | | Merge pull request #1213 from paulp/topic/anyvalJosh Suereth2012-08-3022-113/+133
|\ \ \ \ | | | | | | | | | | Expanded the reach of value classes.
| * | | | Two more value classes.Paul Phillips2012-08-292-53/+50
| | | | | | | | | | | | | | | | | | | | Tuple2Zipped and Tuple3Zipped.
| * | | | Expanded the reach of value classes.Paul Phillips2012-08-2920-60/+83
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now extending AnyVal: - RichInt, RichDouble, etc. - ArrayOps.ofRef, ofBoolean, etc - StringAdd - StringFormat The rest of it is the changes necessary to enable those.
* | | | Merge pull request #1212 from dragos/topic/worksheet-instrumenterJosh Suereth2012-08-302-5/+12
|\ \ \ \ | | | | | | | | | | Two fixes for the worksheet instrumenter
| * | | | Two fixes for the worksheet instrumenterMartin Odersky2012-08-292-5/+12
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | (1) Handle empty worksheets (2) Handle for expressions Review by @dragos (cherry picked from commit 20dc9cd7848863097b07d1cb84ae3f729f7e94da)
* | | | Merge pull request #1160 from rklaehn/SI-6220Josh Suereth2012-08-301-10/+29
|\ \ \ \ | | | | | | | | | | Si 6220
| * | | | Improve efficiency of updatedRuediger Klaehn2012-08-181-10/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added utility method to create a HashTrieSet with two leaf HashSets with different hash Used said utility method instead of creating a temorary HashTrieSet with an empty elems array Added assertions to HashTrieSet to validate tree
* | | | | Merge pull request #1169 from rklaehn/SI-6261Josh Suereth2012-08-302-40/+52
|\ \ \ \ \ | | | | | | | | | | | | Si 6261
| * | | | | Commented out assertionsRuediger Klaehn2012-08-281-3/+3
| | | | | |
| * | | | | Made ListMap.tail O(1) instead of O(N)Ruediger Klaehn2012-08-251-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | That way it is possible to check if a ListMap has one element by checking x.tail.isEmpty. Size is O(1), so size==1 won't do!
| * | | | | Added assertions for tree consistencyRuediger Klaehn2012-08-201-0/+4
| | | | | |
| * | | | | Rewrote makeHashTrieMap so that objects are created in a consistent stateRuediger Klaehn2012-08-201-22/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old approach first created a broken HashTrieSet (with elems(0) == null) and then fixed it afterwards by assigning elems(0) from the outside. But that won't work with the assertion. The new method is recursive, but the maximum recursion depth is 7, and on average the method won't recurse at all.
| * | | | | Check if subNew is the only child and if it is a leaf.Ruediger Klaehn2012-08-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | If this is the case we must return subNew because a HashTrieMap with one leaf element is not allowed by the assertions
| * | | | | Move code to create two-element HashTrieMap into utility method and make use ↵Ruediger Klaehn2012-08-201-27/+30
| | | | | | | | | | | | | | | | | | | | | | | | of it from HashMapCollision1.updated0 as well
| * | | | | Remove unnecessary check for merger eq nullRuediger Klaehn2012-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | While we still have to check for merger eq null in updated0 because updated0 gets called with a nu
| * | | | | Prevent creation of a HashTrieMap with one child unless the child is a ↵Ruediger Klaehn2012-08-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | HashTrieMap itself