summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Incorporated reviewer feedback.Paul Phillips2013-05-164-62/+60
| | | | Made things a little more consistent and self-apparent.
* Merge branch 'master' into HEADPaul Phillips2013-05-1637-841/+223
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: SI-7469 Remove @deprecated scala.util.logging SI-3943 Test case for already-fixed Java interop bug Fix formatting for couple of docs in the compiler SI-7476 Add documentation to GenericTraversableTemplate SI-7469 Remove @deprecated scala.util.parsing.ast SI-7469 Remove @deprecated MurmurHash elements SI-7469 Remove deprecated elements in s.u.parsing.combinator SI-7469 Make @deprecated elems in scala.concurrent private[scala] removes duplication in inferImplicitValue SI-7047 fixes silent for c.inferImplicitXXX SI-7167 implicit macros decide what is divergence macroExpandAll is now triggered in all invocations of typed SI-5923 instantiates targs in deferred macro applications SI-6406 Restore deprecated API SI-6039 Harden against irrelevant filesystem details Limit unnecessary calls to Type#toString. fix typo in comment SI-7432 add testcases SI-7432 Range.min should throw NoSuchElementException on empty range AbstractFile.getDirectory does not return null when outDir is "." Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala
| * Merge pull request #2519 from som-snytt/issue/regex-revertAdriaan Moors2013-05-161-0/+14
| |\ | | | | | | SI-6406 Restore deprecated API
| | * SI-6406 Restore deprecated APISom Snytt2013-05-121-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original patch for SI-6406 was intended for 2.10 but during those volatile weeks of early autumn, it missed the boat. A deprecated method was incorrectly tagged at 2.10 and later removed; this restores the method and its test, and resets the deprecation clock to 2.11. The deprecation tool should confirm that changes occur on the git timeline as claimed.
| * | SI-7469 Remove @deprecated scala.util.loggingSimon Ochsenreither2013-05-166-86/+18
| | |
| * | Merge pull request #2527 from soc/SI-7476Jason Zaugg2013-05-161-4/+50
| |\ \ | | | | | | | | SI-7476 Add documentation to GenericTraversableTemplate
| | * | SI-7476 Add documentation to GenericTraversableTemplateSimon Ochsenreither2013-05-131-4/+50
| | |/
| * | Merge pull request #2526 from dcsobral/doc/patMatAdriaan Moors2013-05-151-2/+6
| |\ \ | | | | | | | | Fix formatting for couple of scaladocs in the compiler
| | * | Fix formatting for couple of docs in the compilerDaniel C. Sobral2013-05-131-2/+6
| | |/ | | | | | | | | | | | | | | | | | | Source code on scaladoc for the virtual pattern matcher was not being correctly identified as such. Also, I had to use an html code tag instead of backticks when referring to the __match identifier, otherwise the double underscore would be treated as start-of-underline wiki markup.
| * | Merge pull request #2520 from soc/SI-7469-concurrentJason Zaugg2013-05-155-6/+6
| |\ \ | | | | | | | | SI-7469 Make @deprecated elems in scala.concurrent private[scala]
| | * | SI-7469 Make @deprecated elems in scala.concurrent private[scala]Simon Ochsenreither2013-05-125-6/+6
| | |/ | | | | | | | | | They can't be removed yet because scala.actors depends on it.
| * | Merge pull request #2521 from soc/SI-7469-combinatorJason Zaugg2013-05-153-79/+0
| |\ \ | | | | | | | | SI-7469 Remove deprecated elements in s.u.parsing.combinator
| | * | SI-7469 Remove deprecated elements in s.u.parsing.combinatorSimon Ochsenreither2013-05-123-79/+0
| | |/
| * | Merge pull request #2523 from soc/SI-7469-hashingJason Zaugg2013-05-152-206/+0
| |\ \ | | | | | | | | SI-7469 Remove @deprecated MurmurHash elements
| | * | SI-7469 Remove @deprecated MurmurHash elementsSimon Ochsenreither2013-05-122-206/+0
| | |/
| * | Merge pull request #2514 from scalamacros/topic/5923-masterJason Zaugg2013-05-1510-62/+111
| |\ \ | | | | | | | | makes sense of implicit macros! now in master
| | * | removes duplication in inferImplicitValueEugene Burmako2013-05-123-30/+18
| | | | | | | | | | | | | | | | This is a port of https://github.com/scala/scala/commit/4e64a2731d from 2.10.x.
| | * | SI-7047 fixes silent for c.inferImplicitXXXEugene Burmako2013-05-122-9/+10
| | | | | | | | | | | | | | | | This is a port of https://github.com/scala/scala/commit/b4da864247 from 2.10.x.
| | * | SI-7167 implicit macros decide what is divergenceEugene Burmako2013-05-127-23/+58
| | | | | | | | | | | | | | | | | | | | | | | | This is a port of https://github.com/scala/scala/commit/8168f118c9 from 2.10.x, with an additional change to the `enclosingImplicits` and `openImplicits` APIs, which encapsulates tuples of `pt` and `tree` into `ImplicitCandidate`.
| | * | SI-5923 instantiates targs in deferred macro applicationsEugene Burmako2013-05-122-10/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In January I submitted a pull request that, as I thought back then, fixes SI-5923: https://github.com/scala/scala/commit/fe60284769. The pull request was merged, and everyone was happy that the bug got fixed. Unfortunately, the fix was: a) incomplete, b) broke something else, as noticed by Miles in https://groups.google.com/d/topic/scala-internals/7pA9CiiD3u8/discussion. Now we got a real fix in 2.10.x (https://github.com/scala/scala/commit/90ac5c4e13), and it's my pleasure to port it to master.
| * | | Merge pull request #2503 from paulp/issue/6039Jason Zaugg2013-05-152-2/+8
| |\ \ \ | | | | | | | | | | SI-6039 Harden against irrelevant filesystem details
| | * | | SI-6039 Harden against irrelevant filesystem detailsPaul Phillips2013-05-082-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symbol loader need not create and populate package symbols merely because there is a directory somewhere. Every package created based on the existence of a directory should contain a classfile, either directly or indirectly.
| * | | | Merge pull request #2498 from rladstaetter/patch-1Jason Zaugg2013-05-151-1/+1
| |\ \ \ \ | | | | | | | | | | | | fix typo in comment
| | * | | | fix typo in commentRobert Ladstätter2013-05-061-1/+1
| | | | | |
| * | | | | Merge pull request #2399 from rjolly/scripting8Jason Zaugg2013-05-151-1/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | AbstractFile.getDirectory does not return null when outDir is "."
| | * | | | | AbstractFile.getDirectory does not return null when outDir is "."Raphael Jolly2013-04-221-1/+1
| | | | | | |
| * | | | | | SI-7469 Remove @deprecated scala.util.parsing.astSimon Ochsenreither2013-05-132-381/+0
| | |_|_|_|/ | |/| | | |
| * | | | | Merge pull request #2501 from paulp/pr/tailcalls-tostringPaul Phillips2013-05-121-6/+6
| |\ \ \ \ \ | | |_|_|_|/ | |/| | | | Limit unnecessary calls to Type#toString.
| | * | | | Limit unnecessary calls to Type#toString.Paul Phillips2013-05-081-6/+6
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logging revealed a few thousand calls to the often expensive Type#toString emerging from tailcalls. The error message was being generated for all methods even though it was only issued in rare cases (and for the particular tailrec failure which made the call, extremely rare.) The remaining boatload of unnecessary Type#toString calls are much harder to fix due to the design of "AbsTypeError" and the fact that the compiler approaches mutability like a cat approaches a loaded gun. See SI-6149.
| * | | | Merge pull request #2470 from ihji/masterPaul Phillips2013-05-111-2/+2
| |\ \ \ \ | | | | | | | | | | | | SI-7432 Range.min should throw NoSuchElementException on empty range
| | * | | | SI-7432 Range.min should throw NoSuchElementException on empty rangeHeejong Lee2013-04-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For consistency, range.max and range.min should throw NoSuchElementException on an empty range.
* | | | | | Incorporated reviewer feedback.Paul Phillips2013-05-113-34/+35
| | | | | | | | | | | | | | | | | | | | | | | | Made things a little more consistent and self-apparent.
* | | | | | Refactored stabilize.Paul Phillips2013-05-114-85/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mode elimination ramps up in difficulty now, so I pursued other forms of code hygiene.
* | | | | | Eliminated HKmode.Paul Phillips2013-05-114-44/+53
| | | | | | | | | | | | | | | | | | | | | | | | It becomes context mode "TypeConstructor".
* | | | | | Eliminated RETmode.Paul Phillips2013-05-114-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | It becomes context mode "ReturnExpr".
* | | | | | Eliminated SNDTRYmode.Paul Phillips2013-05-115-28/+38
| | | | | | | | | | | | | | | | | | | | | | | | It becomes context mode "SecondTry".
* | | | | | Started eliminating modes.Paul Phillips2013-05-115-111/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consolidating the scattered typer state in Context, where it's relatively easy to keep an eye on, rather than threaded throughout the typer in sneaky/sticky bitmasks. The general pattern will be what was once an explicitly passed around bit in Mode becomes an implicitly propagated-as-appropriate bit in Context. In this commit: ALTmode becomes context mode "PatternAlternative" STARmode becomes context mode "StarPatterns" SUPERCONSTRmode becomes context mode "SuperInit"
* | | | | | Corralling Modes into a smaller pen.Paul Phillips2013-05-1110-260/+299
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempting to reduce the frequency of low-level operations with modes. I mean stuff like this: if ((mode & (EXPRmode | LHSmode)) == EXPRmode) THey don't make those ten line boolean guards any easier to understand. Hopefully this will lead us toward eliminating some of the modes entirely, or at least better isolating their logic rather than having it interspersed at arbitrary points throughout the typer. Modes are in their entirety a leaked implementation detail. Typing a tree requires a tree and optionally an expected type. It shouldn't require a bucket of state bits. In subsequent commits I will start eliminating them. This commit also breaks adapt down into more digestible chunks.
* | | | | Merge pull request #2512 from som-snytt/issue/partest-exec-logPaul Phillips2013-05-111-4/+5
|\ \ \ \ \ | | | | | | | | | | | | Par-Test includes log in transcript of failed exec
| * | | | | Par-Test includes log in transcript of failed execSom Snytt2013-05-101-4/+5
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous behavior was that the Failure is generated before the log is appended to the transcript. That meant that the summary transcripts wouldn't include the log file. Luckily, the transcript would say something like "jvm > showFail-run.log".
* | | | | Boil out some duplicated parser logic.Paul Phillips2013-05-101-116/+108
| | | | | | | | | | | | | | | | | | | | Our focus today is on packages and package objects.
* | | | | Flesh out copyMemberDef methods with copyModuleDef.Paul Phillips2013-05-101-0/+15
| | | | |
* | | | | Merge pull request #2462 from magarciaEPFL/backendish9Paul Phillips2013-05-1020-48/+84
|\ \ \ \ \ | | | | | | | | | | | | SI-6863 root cause fixed using factory of scala.runtime.*Ref
| * | | | | indentation typoMiguel Garcia2013-04-301-6/+6
| | | | | |
| * | | | | SI-6863 root cause fixed using factory of scala.runtime.*RefMiguel Garcia2013-04-2720-47/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit does away with an error-prone division of labor between UnCurry and LambdaLift, a division of labor by which UnCurry had to anticipate under which circumstances LambdaLift creates a scala.runtime.*Ref whose initial value is given by a an expression including a Try in non-statement position. That sounds complicated, and it is. The solution so far (fixing SI-6863) is replaced by a simpler approach, at the cost of forward binary comptability with pre-2.11 releases, this time fixing the root cause of SI-6863. From now on, a s.r.*Ref is instantiated via invocation of a static factory method in the s.r.*Ref class in question. Unlike the code that was emitted so far (which involved NEW refclass, DUP, expr, INVOKESPECIAL refclass.<init>) the "expr" doesn't appear on the operand stack on top of the *Ref value being initialized. In other words, the *Ref initialization is in statement position provided "expr" is.
* | | | | | Merge pull request #2489 from som-snytt/issue/partest-show-diffPaul Phillips2013-05-102-1/+13
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Partest can --show-diff again after incremental report.
| * | | | | Partest can --show-diff again after incremental report.Som Snytt2013-05-032-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A flag is set in NestUI to look for "diff" in the transcript of failing tests.
* | | | | | Merge pull request #2493 from paulp/pr/null-hardeningPaul Phillips2013-05-077-8/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | Hardening against nulls for deserialization.
| * | | | | | Hardening against nulls for deserialization.Paul Phillips2013-05-037-8/+16
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | When one attempts to populate data structures via deserialization, nulls tend to show up in unlikely or "impossible" places. Now there are a few fewer.
* / | | | | Absolutized paths involving the scala package.Paul Phillips2013-05-03667-1018/+1469
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Confusing, now-it-happens now-it-doesn't mysteries lurk in the darkness. When scala packages are declared like this: package scala.collection.mutable Then paths relative to scala can easily be broken via the unlucky presence of an empty (or nonempty) directory. Example: // a.scala package scala.foo class Bar { new util.Random } % scalac ./a.scala % mkdir util % scalac ./a.scala ./a.scala:4: error: type Random is not a member of package util new util.Random ^ one error found There are two ways to play defense against this: - don't use relative paths; okay sometimes, less so others - don't "opt out" of the scala package This commit mostly pursues the latter, with occasional doses of the former. I created a scratch directory containing these empty directories: actors annotation ant api asm beans cmd collection compat concurrent control convert docutil dtd duration event factory forkjoin generic hashing immutable impl include internal io logging macros man1 matching math meta model mutable nsc parallel parsing partest persistent process pull ref reflect reify remote runtime scalap scheduler script swing sys text threadpool tools transform unchecked util xml I stopped when I could compile the main src directories even with all those empties on my classpath.