summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4100 from gourlaysama/wip/lint-buildLukas Rytz2014-11-103-0/+53
|\ | | | | SI-8954 Make @deprecated{Overriding,Inheritance} aware of @deprecated.
| * SI-8954 Make @deprecated{Overriding,Inheritance} aware of @deprecated.Antoine Gourlay2014-11-063-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that: - there is no warning for a @deprecated class inheriting a @deprecatedInheritance class - there is no warning for a @deprecated method overriding a @deprecatedOverriding method - there is no "deprecation won't work" warning when overriding a member of a @deprecatedInheritance class with a @deprecated member - the above works even if the classes/methods are indirectly deprecated (i.e. enclosed in something @deprecated) This should remove quite a few useless deprecation warnings from the library.
* | Merge pull request #4095 from retronym/ticket/8933Lukas Rytz2014-11-106-0/+44
|\ \ | | | | | | Fix problems in Symbol Literal static caching
| * | SI-7974 Fix over-eager optimization of Symbol literalsJason Zaugg2014-11-071-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | A classic mistake of discarding a non-trivial qualifier. We actually should have fixed this before merging #3149, as it was raised in review, but I suppose we got too caught up in the difficulty of resolving the right overload of `Symbol_apply` that we forgot.
| * | SI-8933 Disable static Symbol literal cache in traitsJason Zaugg2014-11-075-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Scala 2.8.2, an optimization was added to create a static cache for Symbol literals (ie, the results of `Symbol.apply("foo"))`. This saves the map lookup on the second pass through code. This actually was broken somewhere during the Scala 2.10 series, after the addition of an overloaded `apply` method to `Symbol`. The cache synthesis code was made aware of the overload and brought back to working condition recently, in #3149. However, this has uncovered a latent bug when the Symbol literals are defined with traits. One of the enclosed tests failed with: jvm > t8933b-run.log java.lang.IllegalAccessError: tried to access field MotherClass.symbol$1 from class MixinWithSymbol$class at MixinWithSymbol$class.symbolFromTrait(A.scala:3) at MotherClass.symbolFromTrait(Test.scala:1) This commit simply disables the optimization if we are in a trait. Alternative fixes might be: a) make the static Symbol cache field public / b) "mixin" the static symbol cache. Neither of these seem worth the effort and risk for an already fairly situational optimization. Here's how the optimization looks in a class: % cat sandbox/test.scala; qscalac sandbox/test.scala && echo ":javap C" | qscala; class C { 'a; 'b } Welcome to Scala version 2.11.5-20141106-145558-aa558dce6d (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_20). Type in expressions to have them evaluated. Type :help for more information. scala> :javap C Size 722 bytes MD5 checksum 6bb00189166917254e8d40499ee7c887 Compiled from "test.scala" public class C { public static {}; descriptor: ()V flags: ACC_PUBLIC, ACC_STATIC Code: stack=2, locals=0, args_size=0 0: getstatic #16 // Field scala/Symbol$.MODULE$:Lscala/Symbol$; 3: ldc #18 // String a 5: invokevirtual #22 // Method scala/Symbol$.apply:(Ljava/lang/String;)Lscala/Symbol; 8: putstatic #26 // Field symbol$1:Lscala/Symbol; 11: getstatic #16 // Field scala/Symbol$.MODULE$:Lscala/Symbol$; 14: ldc #28 // String b 16: invokevirtual #22 // Method scala/Symbol$.apply:(Ljava/lang/String;)Lscala/Symbol; 19: putstatic #31 // Field symbol$2:Lscala/Symbol; 22: return public C(); descriptor: ()V flags: ACC_PUBLIC Code: stack=1, locals=1, args_size=1 0: aload_0 1: invokespecial #34 // Method java/lang/Object."<init>":()V 4: getstatic #26 // Field symbol$1:Lscala/Symbol; 7: pop 8: getstatic #31 // Field symbol$2:Lscala/Symbol; 11: pop 12: return } fixup
* | | Merge pull request #4088 from lrytz/opt/cleanupOptimizationsLukas Rytz2014-11-108-68/+554
|\ \ \ | | | | | | | | GenBCode: cleanup optimizations
| * | | Address review commentsLukas Rytz2014-11-071-1/+1
| | | |
| * | | GenBCode: Compact local variable slotsLukas Rytz2014-11-041-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After eliminating unreachable code, there may be unused local varaible slots. Such gaps increase the method's frame size unnecessarily. The optimization does not attempt to re-use the same local variable slot for non-overlapping locals (proper register allocation): def f(b: Boolean) = if (b) { val x = e; x } else { val y = e; y } x and y will not use the same slot, even though they could. This was originally implemented by Miguel in https://github.com/lrytz/scala/commit/09c40359338f8770e4f99d045999af062112973e
| * | | GenBCode: Tests for combined method-level optimizationsLukas Rytz2014-11-042-0/+88
| | | |
| * | | GenBCode: Command-line flags for enabling cleanup optimizationsLukas Rytz2014-11-046-85/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add command-line flags `Yopt:...` for simplifying jumps, eliminating stale line number and label nodes. `LocalOpt.methodOptimizations` applies all enabled intra-method optimizations in the right order. Some cleanups for unreachable code elimination and its tests.
| * | | GenBCode: Eliminate redundant labels and line number nodesLukas Rytz2014-11-041-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup optimizations - remove line number nodes that describe no executable instructions - squash sequences of label nodes, remove unreferenced labels Command-line flags that allow enabling these transformations are added in a later comimt.
| * | | GenBCode: Simplify branching instructionsLukas Rytz2014-11-041-0/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements simplifications to branching instructions, for example `CondJump l; GOTO l` is replaced by `POP; GOTO l`. The individual optimizations are explained in doc comments. A later commit will add compiler flags to allow enabling the new optimizations.
* | | | SI-5730 hide constructors of sealed abstract classes in scaladocAntoine Gourlay2014-11-072-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sealed abstract classes (like `List`) have a primary constructor, public by default. It can never be called by external code but it shows up in the scaladoc as a nice `new List()` construtor... If a class is only abstract, the constructor is still useful because people can subclass and call it. If it is only sealed (i.e. effectively final), then it is the normal constructor of a final class. But sealed *and* abstract makes documenting the constructor useless. This should remove the misleading constructors of `List`, `Double`, `Option` and others from the scaladoc.
* | | | Merge pull request #4047 from lrytz/delambda-method-testsLukas Rytz2014-11-077-8/+19
|\ \ \ \ | | | | | | | | | | Fix tests under -Ydelambdafy:method
| * | | | Fix lambda names under delambdafy:method in innerClassAttribute testLukas Rytz2014-10-101-3/+3
| | | | | | | | | | | | | | | | | | | | This should have been done in 63207e1
| * | | | Ensure delambafy:inline for anonymous function class javap testLukas Rytz2014-10-102-1/+5
| | | | | | | | | | | | | | | | | | | | https://issues.scala-lang.org/browse/SI-8898
| * | | | Ensure closure elimination test runs under -Ydelambdafy:inlineLukas Rytz2014-10-101-1/+1
| | | | |
| * | | | Fix t8549 under -Ydelambdafy:methodLukas Rytz2014-10-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the structure of Option.class generated by delambdafy:method is slightly different. For example, lambdas declared within Option are not emitted as nested classes, so under delambdafy:method there's no inner class entry for anonfun classes. The test failed because serializing a ClassTag involves serializing an Option. Option did not have a `@SerialVersionUID`, and the classfile generated by delambdafy:method has a different value. The annotation is required on the parent class (Option) as well as the subclasses (Some / None). De-serializing a Some will fail if Option has a different SerialVersionUID. Relates to SI-8576. We should probably have more SVUID annotations in the library.
| * | | | Update check files for -Ydelambdafy:methodLukas Rytz2014-10-102-2/+6
| | | | | | | | | | | | | | | | | | | | Should have been done in 63207e1.
* | | | | Merge pull request #4080 from gourlaysama/wip/t8931-redundant-interfaces-2Jason Zaugg2014-11-072-0/+16
|\ \ \ \ \ | | | | | | | | | | | | SI-8931 make generic signature consistent with interface list in classfiles
| * | | | | SI-8931 make generic signature consistent with interface list in classfilesAntoine Gourlay2014-11-052-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An optimization was introduced in 7a99c03 (SI-5278) to remove redundant interfaces from the list of implemented interfaces in the bytecode. However the same change was not propagated to the generic signature of a class, which also contains a list of direct parent classes and interfaces. The JVM does not check the well-formedness of signatures at class loading or linking (see §4.3.4 of jdk7 jvms), but other tools might assume the number of implemented interfaces is the same whether one asked for generic or erased interfaces. It doesn't break reflection so nobody complained, but it does show: scala> val c = classOf[Tuple1[String]] c: Class[(String,)] = class scala.Tuple1 scala> c.getInterfaces // Product is gone res0: Array[Class[_]] = Array(interface scala.Product1, interface scala.Serializable) scala> c.getGenericInterfaces // Product is back! res1: Array[java.lang.reflect.Type] = Array(scala.Product1<T1>, interface scala.Product, interface scala.Serializable) This moves the optimization to erasure, for use in emitting the generic signature, and the backend calls into it later for the list of interfaces.
* | | | | | Merge pull request #4097 from retronym/ticket/7602Jason Zaugg2014-11-072-0/+31
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7602 Avoid crash in LUBs with erroneous code
| * | | | | | SI-7602 Avoid crash in LUBs with erroneous codeJason Zaugg2014-11-072-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a class contains a double defintion of a method that overrides an interface method, LUBs could run into a spot where filtering overloaded alternatives to those that match the interface method fails to resolve to a single overload, which crashes the compiler. This commit uses `filter` rather than `suchThat` to avoid the crash.
* | | | | | | Merge pull request #4096 from retronym/ticket/7019Jason Zaugg2014-11-071-0/+10
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-7019 Fix crasher with private[this] extension methods
| * | | | | | | SI-7019 Fix crasher with private[this] extension methodsJason Zaugg2014-11-061-0/+10
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we move the body of value class methods to the corresponding extension method, we typecheck a forward method that remains in the class. In order to allow access, this commit weakens the access of `private[local]` extension methods to `private`.
* | | | | | | Merge pull request #4083 from retronym/ticket/8947Jason Zaugg2014-11-073-0/+54
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8947 Avoid cross talk between tag materializers and reify
| * | | | | | | SI-8947 Avoid cross talk between tag materializers and reifyJason Zaugg2014-10-303-0/+54
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a macro has been expanded, the expandee are expansion are bidirectionally linked with tree attachments. Reify uses the back reference to replace the expansion with the expandee in the reified tree. It also has some special cases to replace calls to macros defined in scala-compiler.jar with `Predef.implicitly[XxxTag[T]]`. This logic lives in `Reshape`. However, the expansion of a macro may be `EmptyTree`. This is the case when a tag materializer macro fails. User defined macros could do the also expand to `EmptyTree`. In the enclosed test case, the error message that the tag materializer issued ("cannot materialize class tag for unsplicable type") is not displayed as the typechecker finds another means of making the surrounding expression typecheck. However, the macro engine attaches a backreference to the materializer macro on `EmpytyTree`! Later, when `reify` reshapes a tree, every occurance of `EmptyTree` will be replaced by a call to `implicitly`. This commit expands the domain of `CannotHaveAttrs`, which is mixed in to `EmptyTree`. It silently ignores all attempts to mutate attachments. Unlike similar code that discards mutations of its type and position, I have refrained from issuing a developer warning in this case, as to silence this I would need to go and add a special case at any places adding attachments.
* | | | | | | Merge pull request #4094 from retronym/ticket/8962Jason Zaugg2014-11-061-0/+31
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | SI-8962 Fix regression with skolems in pattern translation
| * | | | | | SI-8962 Fix regression with skolems in pattern translationJason Zaugg2014-11-061-0/+31
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the refactoring of error reporting in 258d95c7b15, the result of `Context#reportError` was changed once we had switched to using a `ThrowingReporter`, which is still the case in post typer phase typechecking This was enough to provoke a type error in the enclosed test. Here's a diff of the typer log: % scalac-hash 258d95~1 -Ytyper-debug sandbox/test.scala 2>&1 | tee sandbox/good.log % scalac-hash 258d95 -Ytyper-debug sandbox/test.scala 2>&1 | tee sandbox/bad.log % diff -U100 sandbox/{good,bad}.log | gist --filename=SI-8962-typer-log.diff https://gist.github.com/retronym/3ccbe7e0791447d272a6 The test `Context#reportError` happens to be used when deciding whether the type checker should be lenient when it hits a type error. In lenient mode (see `adaptMismatchedSkolems`), it `adapt` retries with after slackening the expected type by replacing GADT and existential skolems with wildcard types. This is to accomodate known type-incorrect trees generated by the pattern matcher. This commit restores the old semantics of `reportError`, which means it is `false` when a `ThrowingReporter` is being used. For those still reading, here's some more details. The trees of the `run2` example from the enclosed test. Notice that after typechecking, `expr` has a type containing GADT skolems. The pattern matcher assumes that calling the case field accessor `expr` on the temporary val `x2 : Let[A with A]` containing the scrutinee will result in a compatible expression, however this it does not. Perhaps the pattern matcher should generate casts, rather than relying on the typer to turn a blind eye. ``` [[syntax trees at end of typer]] // t8962b.scala ... def run2[A](nc: Outer2[A,A]): Outer2[Inner2[A],A] = nc match { case (expr: Outer2[Inner2[?A2 with ?A1],?A2 with ?A1])Let2[A with A]((expr @ _{Outer2[Inner2[?A2 with ?A1],?A2 with ?A1]}){Outer2[Inner2[?A2 with ?A1],?A2 with ?A1]}){Let2[A with A]} => (expr{Outer2[Inner2[?A2 with ?A1],?A2 with ?A1]}: Outer2[Inner2[A],A]){Outer2[Inner2[A],A]} }{Outer2[Inner2[A],A]} [[syntax trees at end of patmat]] // t8962b.scala def run2[A](nc: Outer2[A,A]): Outer2[Inner2[A],A] = { case <synthetic> val x1: Outer2[A,A] = nc{Outer2[A,A]}; case5(){ if (x1.isInstanceOf[Let2[A with A]]) { <synthetic> val x2: Let2[A with A] = (x1.asInstanceOf[Let2[A with A]]: Let2[A with A]){Let2[A with A]}; { val expr: Outer2[Inner2[?A2 with ?A1],?A2 with ?A1] = x2.expr{<null>}; matchEnd4{<null>}((expr{Outer2[Inner2[?A2 with ?A1],?A2 with ?A1]}: Outer2[Inner2[A],A]){Outer2[Inner2[A],A]}){<null>} ... ```
* | | | | | Merge pull request #4093 from lrytz/t8960Lukas Rytz2014-11-065-5/+71
|\ \ \ \ \ \ | |/ / / / / |/| | | | | SI-8960 Bring back the SerialVersionUID to anonymous function classes
| * | | | | SI-8960 Bring back the SerialVersionUID to anonymous function classesLukas Rytz2014-11-055-5/+71
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In PR #1673 / 4267444, the annotation `SerialVersionId` was changed from a `StaticAnnotation` to `ClassFileAnnotation` in order to enforce annotation arguments to be constants. That was 2.11.0. The ID value in the AnnotationInfo moved from `args` to `assocs`, but the backend was not adjusted. This was fixed in PR #3711 / ecbc9d0 for 2.11.1. Unfortunately, the synthetic AnnotationInfo that is added to anonymous function classes still used the old constructor (`args` instead of `assocs`), so extracting the value failed, and no field was added to the classfile.
* | | | | Merge pull request #4089 from gourlaysama/wip/t6626-scaladoc-throws-linksVlad Ureche2014-11-052-0/+49
|\ \ \ \ \ | | | | | | | | | | | | SI-6626 make @throws tags create links to exceptions
| * | | | | SI-6626 make @throws tags create links to exceptionsAntoine Gourlay2014-11-052-0/+49
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | In scaladoc, this turns exceptions in @throws tags into links (when it can find the target exception), instead of just showing the name.
* | | | | Merge pull request #4092 from som-snytt/issue/5217Lukas Rytz2014-11-051-0/+17
|\ \ \ \ \ | | | | | | | | | | | | SI-5217 Companion privates in scope of class parms
| * | | | | SI-5217 Companion privates in scope of class parmsSom Snytt2014-11-041-0/+17
| | |/ / / | |/| | | | | | | | | | | | | Test of the same. It progressed in 2.10.1.
* | | | | Merge pull request #4069 from som-snytt/issue/8898Lukas Rytz2014-11-052-0/+27
|\ \ \ \ \ | | | | | | | | | | | | SI-8898 javap -fun under new style lambdas
| * | | | | SI-8898 javap -fun under new style lambdasSom Snytt2014-11-042-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support both -Ydelambdafy strategies, look for both inline (anonfun) and method (lambda) closure classes. For method (lambda) style, use the anonfun method that is invoked by the accessor. Also, the output of javap must be captured eagerly for filtering for the current target method. If the user asks for a module, e.g., `Foo$`, don't yield results for companion class, but for `Foo`, do yield companion module results. Just because.
* | | | | | Merge pull request #4044 from retronym/ticket/5091Lukas Rytz2014-11-053-0/+28
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-5091 Move named-args cycle test from pending to neg
| * \ \ \ \ \ Merge pull request #7 from lrytz/t6051Jason Zaugg2014-11-041-0/+19
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-6051 Test case, the issue seems to be fixed.
| | * | | | | | SI-6051 Test case, the issue seems to be fixed.Lukas Rytz2014-11-041-0/+19
| | |/ / / / /
| * / / / / / SI-5091 Move named-args cycle test from pending to negJason Zaugg2014-10-102-0/+9
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a typechecking cycle, and since 4669ac180e5 we now report this in a clearer manner. Once we change the language to unconditionally interpret an assignent in argument position as a named argument would be the only way to get this over to `pos`.
* | | | | | Merge pull request #4017 from lrytz/t6541Lukas Rytz2014-11-056-0/+129
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6541 valid wildcard existentials for case-module-unapply
| * | | | | | SI-6541 valid wildcard existentials for case-module-unapplyLukas Rytz2014-11-053-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of letting the compiler infer the return type of case module unapply methods, provide them explicitly. This is enabled only under -Xsource:2.12, because the change is not source compatible.
| * | | | | | Fix default value for ScalaVersionSettingLukas Rytz2014-11-043-0/+84
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default value was NoScalaVersion before, because tryToSet (where the default was supposed to be set) is not called at all if the option is not specified. The initial value of Xmigration is set to NoScalaVersion (which it was before, the AnyScalaVersion argument was ignored). AnyScalaVersion would be wrong, it would give a warning in `Map(1 -> "eis").values` if the option was not specified. See tests.
* | | | | | Merge pull request #4066 from soc/SI-8927Lukas Rytz2014-11-045-39/+27
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-8927 Update OSGi stuff to get rid of bndlib warning
| * | | | | | SI-8927 Update OSGi stuff to get rid of bndlib warningRafał Krzewski2014-10-235-39/+27
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way the desired OSGi frameworks are chosen has changed between Pax Exam versions: On earlier versions, specifying it in code was fine, but PAX Exam 4.x runs the tests on the first OSGi framework it finds on classpath. An exclusion for the transitive dependency org.osgi.core was added, because it seems that artifact has broken dependecies (which would have brought us back to square one). Good thing is that it isn't needed here, because the OSGi framework JARs contain all necessary classes.
* | | | | | Merge pull request #4046 from gourlaysama/wip/t8711-version-unparseLukas Rytz2014-11-041-0/+18
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | SI-8711 ScalaVersion.unparse doesn't produce valid versions
| * | | | | SI-8711 ScalaVersion.unparse doesn't produce valid versionsAntoine Gourlay2014-10-131-0/+18
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no dot between `major.minor.rev` and `-build` in a scala version, yet that's what unparse returns for ``` // was "2.11.3.-SNAPSHOT" ScalaVersion("2.11.3-SNAPSHOT").unparse ```
* | | | | Merge pull request #4036 from retronym/topic/opt-tail-callsJason Zaugg2014-11-043-0/+184
|\ \ \ \ \ | | | | | | | | | | | | SI-8893 Restore linear perf in TailCalls with nested matches
| * | | | | SI-8893 Test tailcall transform for mix of tail/non-tail recursionJason Zaugg2014-11-031-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another excellent test suggestion by Dear Reviewer. After tail calls, the transform results in: ``` def tick(i: Int): Unit = { <synthetic> val _$this: Test.type = Test.this; _tick(_$this: Test.type, i: Int){ if (i.==(0)) () else if (i.==(42)) { Test.this.tick(0); _tick(Test.this, i.-(1).asInstanceOf[Int]()) } else _tick(Test.this, i.-(1).asInstanceOf[Int]()).asInstanceOf[Unit]() } }; ``` We test this by mostly exercising the tail-recursive code path with a level of recursion that would overflow the stack if we weren't using jumps.