summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Miscellaneous fixes to reificationEugene Burmako2012-02-0251-88/+439
| | | | | | | | More specifically: * Importers now preserve wasEmpty and original * ToolBoxes no longer auto-evaluate nullary functions returned by runExpr * All local symbols from previous typechecks are now correctly erased by ResetAttrs * Originals are now reified
*-. Merge remote-tracking branches 'scalamacros/pullrequest/5258' and ↵Paul Phillips2012-02-0128-72/+331
|\ \ | | | | | | | | | 'scalamacros/pullrequest/5256' into develop
| | * Hardens classToType logicEugene Burmako2012-02-0119-62/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reflection now correctly processes classes, objects and inner classes that are declared in classes and objects. However classToType still crashes on compound types and local classes. For more information on those, follow the links: * Compound types: https://issues.scala-lang.org/browse/SI-5430 * Local classes: https://issues.scala-lang.org/browse/SI-5431 Fixes https://issues.scala-lang.org/browse/SI-5256. Review by @paulp, @odersky.
| * | Hardens reification against rare kinds of ConstantsEugene Burmako2012-02-019-10/+84
| |/ | | | | | | | | | | | | | | | | Importers now correctly process constants that carry types and symbols. However, it is still impossible to reify classOf for a class/trait that is defined inside a quasiquote. Theoretically, this can be implemented, but will require attaching original trees to classOf constants, which needs much more effort.
* | Update RoundingMode.Paul Phillips2012-02-012-2/+4
| | | | | | | | Not to use the deprecated Enumeration constructor.
* | Fix for parser OOM.Paul Phillips2012-02-013-4/+12
|/ | | | | | | | | | | | The scanner performs some sketchy heuristics when it sees an ascii 1A since it may be EOF or it may be part of a literal. Due to this, it failed to detect an unterminated string literal if the opening quote was unicode-escaped, leading to memory exhaustion as it read SUs until the universe ended. We're parsing a fixed input with known length! There's no reason to be guessing about whether a char is EOF. If we're at the end of the file, it's the end of file. Otherwise, it is not the end of the file.
* Fixing build string.Paul Phillips2012-02-013-15/+4
| | | | | | | | Version number turning up more than once. Looking at the situation I could only see the former mechanism as trouble. I deleted build.number and in ant am generating the build string only from tools/get-scala-revision. We may need to revisit when the time comes to build a release.
*---. Merge remote-tracking branches 'gkossakowski/virtpatmat-switch', ↵Paul Phillips2012-02-0119-15/+177
|\ \ \ | | | | | | | | | | | | 'scalamacros/pullrequest/5427' and 'scalamacros/pullrequest/5423' into develop
| | | * Introduce getAnnotations that triggers symbol completionEugene Burmako2012-01-314-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default getter for annotations doesn't perform initialization, hence we've faced the following bug: https://issues.scala-lang.org/browse/SI-5423. One of the approaches to fixing it would be to auto-complete on getter, but according to Martin we'd better not do that because of cycles. That's why I'm just introducing a new, eager, variation of `annotations' and redirecting public API to it. Review by @odersky.
| | * | Tests for https://issues.scala-lang.org/browse/SI-5427Eugene Burmako2012-02-018-0/+49
| | |/
| * | Added a test-case for switches with Yvirtpatmat.Grzegorz Kossakowski2012-02-013-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a bunch of tests that cover changes related to switches that were applied to Yvirtpatmat implementation. Note: I didn't add those tests progressively because my changes fix trees after typer phase but do not affect resulting bytecode. How come? It's because -Yvirtpatmat will emit pattern for switches and then the old pattern matcher implementation would transform them in the old fashion in explicitouter. We cannot disable the old pattern matcher in explicitouter yet because it doesn't handle patterns used for catching exceptions. Thus, consider this as a sign of the fact that Yvirtpatmat is still work in progress.
| * | Convert values to Int in switchable patterns.Grzegorz Kossakowski2012-02-011-21/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Further improvements to how -Yvirtpatmat handles switch-like patterns that can be translated to switch tables. First of all, we added a check whether a type of an expression we pattern match on is in the set of allowed types for switch patterns. If yes, we translate a pattern to switch one by converting both an expression we pattern match on and literals in a pattern to an Int. I borrowed an idea of converting to Ints from both old pattern matcher implementation and from how javac handles it.
| * | Generate default case for switches.Grzegorz Kossakowski2012-02-011-1/+12
| | |
| * | Get rid of unused import.Grzegorz Kossakowski2012-02-011-1/+1
| | |
| * | Unfold pattern alternatives in genicode.Grzegorz Kossakowski2012-02-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented unfolding of pattern alternatives that can be translated into switch table in genicode. This way pattern matcher can keep simple patterns as-is and let backend handle translation of them instead of generating bunch of LabelDefs and jumps. Review by @dragos or @magarciaEPFL as both seem to know genicode very well.
| * | Fixed handling of empty keys in emitSWITCH.Grzegorz Kossakowski2012-02-012-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem of emitSWITCH not handling empty keys popped up when I tried to implement unfolding of pattern alternatives in genicode instead of in typers/explicitouter. This change makes perfect sense in isolation as bytecode allows LOOKUPSWITCHes that have only default case. I actually verified that this kind of bytecode is generated by javac when one has switch statement with only default case defined. Review by @paulp or @dragos.
* | | Updated get-scala-revision to use git describe.Paul Phillips2012-02-012-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hopefully this will satisfy all version-interesting parties. Version string now looks like this: v2.10.0-M1-0098-gbda61bb7e5-2012-02-01 Review by @dragos and anyone who uses windows (where it definitely won't produce that string, but hopefully it produces some usable string.)
* | | Fix for slice boundary condition.Paul Phillips2012-02-013-1/+7
| | | | | | | | | | | | | | | Negative "to" index should be normalized to 0 before using it in a difference operation.
* | | Added getPackage to the repl classloader.Paul Phillips2012-02-012-0/+30
| | |
* | | Tweak to repl debugging output.Paul Phillips2012-02-011-1/+1
|/ /
* | Test case closes SI-5352.Paul Phillips2012-01-313-0/+29
| |
* | Improved warning for insensible comparisons.Paul Phillips2012-01-315-5/+35
|/ | | | | Utilize knowledge of case class synthetic equals to rule out some comparisons statically. Closes SI-5426.
* Have ant notice starr out of date.Paul Phillips2012-01-301-2/+13
| | | | | If your compiler .desired.sha1 is newer than the jar, it will go download it.
* Print compound types legibly.Paul Phillips2012-01-302-19/+35
| | | | | | | | | This one's about a million years overdue. Try this on for size, from the command line: printf ":power\nList(1).?.baseClasses.sigs >\n" | scala Also, a little more power mode refinement.
* Merge branch 'develop'Paul Phillips2012-01-3011-137/+642
|\
| *-. Merge remote-tracking branches 'axel22/issue/4147', 'axel22/issue/5374' and ↵Paul Phillips2012-01-303-2/+21
| |\ \ | | | | | | | | | | | | 'hubertp/ticket/4336' into develop
| | | * Closes #4336.Hubert Plociniczak2012-01-302-1/+20
| | | | | | | | | | | | | | | | Some of the type params might already be instantiated if explicit type application is done. Review by @adriaanm
| | * | Merge branch 'master' into issue/5374aleksandar2012-01-30170-6097/+8456
| | |\|
| | * | Changed the serialVersionUID in List serialization start marker.aleksandar2012-01-301-1/+1
| | | |
| * | | Fixed the benchmarks a bit.aleksandar2012-01-303-18/+27
| | | |
| * | | Merge pull request #1 from lpereir4/avlAleksandar Prokopec2012-01-308-135/+612
| |\ \ \ | | |_|/ | |/| | AvlTree performance improvements
| | * | Scalacheck test in order to ensure AVL invariants are respected.Lucien Pereira2012-01-281-0/+114
| | | |
| | * | Added benchmarking files, in order to easily compare variousLucien Pereira2012-01-285-0/+328
| | | | | | | | | | | | | | | | implementations performances.
| | * | Use of polymorphic dispatch instead of pattern matching.Lucien Pereira2012-01-282-127/+168
| | | | | | | | | | | | | | | | Use a specialized iterator.
| | * | Getting rid of closure creation occuring for each rebalancing. Tail ↵Lucien Pereira2012-01-151-34/+28
| | | | | | | | | | | | | | | | recursion is not necessary here.
| | * | syntactic error correctionLucien Pereira2012-01-141-1/+1
| | | |
* | | | A couple power mod conveniences.Paul Phillips2012-01-302-56/+91
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And disambiguations. And renamed all kinds of methods to something less inscrutable. Moved all the instance-to-compiler-structure implicit behind a wrapper to avoid accidental conversions. The wrapper has a single method, ?, which you can experience like so: // Sorry tab completion doesn't yet figure out implicit conversions scala> val x = Map(1 -> 2).? x: $r.power.InternalInfo[scala.collection.immutable.Map[Int,Int]] = Map(1 -> 2) (Map) scala> x. asInstanceOf baseTypeSeq baseTypeSeqMap baseTypeWhichDefines companion decls declsOriginal declsOverride erasure fullManifest glb info isInstanceOf lub memberMethods memberTypes members membersDeclared membersInherited membersUnabridged moduleClass name owner owners pkg pkgClass pkgClassSymbols pkgClasses pkgMembers pkgName pkgSymbols shortClass signature symbol toString tpe // This uses an implicit to install sigs (and another for '>' which is // the generic printing function) but transparency, one step at a time. scala> Map(1 -> 2).?.membersDeclared.sigs > def $init$(): Unit override def empty: scala.collection.immutable.Map[A,B] override def toMap[T,U](implicit ev: <:<[(A, B),(T, U)]): scala.collection.immutable.Map[T,U] override def seq: scala.collection.immutable.Map[A,B] def withDefault[B1 >: B](d: A => B1): scala.collection.immutable.Map[A,B1] def withDefaultValue[B1 >: B](d: B1): scala.collection.immutable.Map[A,B1] override def updated[B1 >: B](key: A,value: B1): scala.collection.immutable.Map[A,B1] def +[B1 >: B](kv: (A, B1)): scala.collection.immutable.Map[A,B1]
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'scalamacros/topic/yshowsymkinds' and ↵Paul Phillips2012-01-299-39/+92
|\ \ \ \ | | | | | | | | | | | | | | | 'scalamacros/ticket/5418' into develop
| | * | | Test for https://issues.scala-lang.org/browse/SI-5418Eugene Burmako2012-01-292-0/+14
| | | | |
| * | | | -Yshow-symkinds: prints kinds next to symbol namesEugene Burmako2012-01-287-39/+78
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This very situational option proved to be very useful when debugging https://issues.scala-lang.org/browse/SI-5415 With the help of -Yshow-symkinds, it became possible to distinguish a free var from a module symbol, which gave precise indication of the root of the bug.
* | | | Test case closes SI-4515.Paul Phillips2012-01-292-0/+47
| | | |
* | | | Bonus test case for SI-3999.Paul Phillips2012-01-281-0/+20
| | | |
* | | | More method synthesis unification.Paul Phillips2012-01-286-171/+182
| | | |
* | | | Cleaned up polymorphic method creation.Paul Phillips2012-01-283-67/+54
| | | | | | | | | | | | | | | | | | | | I love the smell of polymorphic method synthesis in the early afternoon.
* | | | Test case closes SI-3854.Paul Phillips2012-01-272-0/+20
| | | |
* | | | Changed partest to use UTF-8.Paul Phillips2012-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Finally had a concrete motivation to change partest's inexplicable ISO-8859-1 encoding to UTF-8. My test case would cause it to barf "illegal character". Is this going to break on windows or something? If so, it's time to fix the broken place which can't handle UTF-8.
* | | | Make 'illegal' characters less annoying.Paul Phillips2012-01-271-1/+1
| | | | | | | | | | | | | | | | At least tell us what they are.
* | | | Revert "-Yshow-symkinds: prints kinds next to symbol names"Paul Phillips2012-01-277-77/+39
| | | | | | | | | | | | | | | | This reverts commit 6a5901461c1aaac7dd8786cb374b079520895527.
| | | |
| \ \ \
*-. \ \ \ Merge remote-tracking branches 'scalamacros/topic/yshowsymkinds' and ↵Paul Phillips2012-01-2711-68/+114
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 'axel22/feature/immutable-thread-safe' into develop
| | * | | | Set fields in immutable hash maps and hash sets to vals.aleksandar2012-01-264-29/+37
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of an effort to make the immutable collections (more) thread safe. The `::` still has non-final member fields for head and tail, but there is not much that can be done right now about that, since these fields are used by list buffers. Tried writing a test with unsafe initialization, but could not invent a scenario which actually fails, at least on the JDK6.