summaryrefslogtreecommitdiff
path: root/test/files/run
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4622 from retronym/merge/2.11.x-to-2.12.x-20150713Adriaan Moors2015-07-1392-220/+140
|\ | | | | Merge 2.11.x to 2.12.x [ci: last-only]
| * Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-07-1392-220/+140
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20150713 Conflicts: src/eclipse/partest/.classpath src/eclipse/repl/.classpath test/files/run/nothingTypeNoFramesNoDce.scala test/files/run/repl-javap-app.check Also fixup two .classpath files with updated partest, xml and parser combinators JARs.
| | * Fix 25 typos (s)Janek Bogucki2015-07-064-5/+5
| | |
| | * Merge pull request #4596 from janekdb/2.11.x-typos-p-rSeth Tisue2015-07-012-2/+2
| | |\ | | | | | | | | Fix 27 typos (p-r)
| | | * Fix 27 typos (p-r)Janek Bogucki2015-06-302-2/+2
| | | |
| | * | Merge pull request #4576 from som-snytt/issue/9206-moreSeth Tisue2015-07-0181-212/+82
| | |\ \ | | | |/ | | |/| SI-9206 REPL custom bits
| | | * SI-9206 De-perk the welcome messageSom Snytt2015-06-254-32/+59
| | | | | | | | | | | | | | | | | | | | The welcome message defaults to a sober header followed by one line of instructions.
| | | * SI-9206 Update REPL welcome messageSom Snytt2015-06-2480-193/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Everyone knows that a `help` command will result in `more information`. This commit moves the version string to the second line and adds some verve to the welcome. If anyone can't live without the old banner, they are now able to configure it explicitly, so there is still no blood on our hands. ``` $ scala Welcome to Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40). Type in expressions to have them evaluated. Type :help for more information. scala> :quit $ skala Welcome to Scala! version 2.11.7-20150623-155244-eab44dd092 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40). Type in expressions for evaluation. Or try :help. scala> :quit ``` REPL tests now lop off the actual length of the welcome header; or, if necessary, remove the version number from a header embedded in output.
| | | * SI-9206: No REPL message on :silent, unless -Dscala.repl.infoIgor Racic2015-06-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Anyone who doesn't understand why result printing was turned off after they entered `:silent` mode will start the REPL with `-Dscala.repl.debug` and be enlightened. For infotainment purposes, the verbose message is also emitted under info mode.
| | * | Merge pull request #4588 from retronym/topic/icodishAdriaan Moors2015-06-291-0/+42
| | |\ \ | | | | | | | | | | GenBCode: fix incrementatal compilation by mimicing GenASM
| | | * | GenBCode: fix incrementatal compilation by mimicing GenASMJason Zaugg2015-06-281-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The incremental compiler in SBT uses an implementation detail of the compiler backend to enumerate the classes that are actually written to disk. This commit mimics this in GenBCode by populating `Run#icode` with an `IClass` for each `ClassDef` processed. We should revisit this by creating a dedicated API for this purpose and migrating SBT to use that. We should also revisit this code as we implement closure elimination in the GenBCode; this commit assumes that all `ClassDef`s that enter the backend will generate classfile products. The enclosed test is extracted from the incrementatl compiler. I've also manually integration tested this with SBT: https://gist.github.com/retronym/fabf6f92787ea9c1ce67
| | * | | Merge pull request #4589 from janekdb/2.11.x-method-names-m-oJason Zaugg2015-06-292-3/+3
| | |\ \ \ | | | | | | | | | | | | Improve method names (m-o)
| | | * | | Improve method names (m-o)Janek Bogucki2015-06-282-3/+3
| | | |/ /
| | * / / Fix 23 typos (m-o)Janek Bogucki2015-06-282-3/+3
| | |/ /
* | | | temporarily disable failing indylambda testSeth Tisue2015-07-091-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adriaan and Jason agree that the test is failing because the test itself needs reworking, not because it's showing a real problem. so, disabling it for now in the interest of getting 2.12.0-M2 out the door.
* | | | Merge pull request #4617 from retronym/ticket/9387Jason Zaugg2015-07-093-0/+37
|\ \ \ \ | | | | | | | | | | SI-9387 Fix VerifyError introduced by indylambda
| * | | | SI-9387 Fix VerifyError introduced by indylambdaJason Zaugg2015-07-093-0/+37
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As with regular `Apply`-s, we should compute the generated type based on the function's type, rather than the expected type. In the test case, the expected type was void. Now, we correctly use the generated type of `scala/Function1`, which is enough to generate a subsequent POP instruction. The tree shape involved was: ``` arg0 = { { $anonfun() }; scala.runtime.BoxedUnit.UNIT } ```
* | | | Merge pull request #4609 from retronym/topic/indylambda-testLukas Rytz2015-07-091-0/+15
|\ \ \ \ | | | | | | | | | | [indylambda] Improve test coverage
| * | | | [indylambda] Improve test coverageJason Zaugg2015-07-081-0/+15
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding tests for the selective use of boxing bridge methods and to show that specialization is not subverted by indylambda. Other aspects of indylambda are tested by tests like: - run/lambda-serialization.scala - run/indylambda-boxing When those tests were written, they only tested the old backend. However, now that we have Java 8 and the new backend avaialble by default to partest, they provide the intended coverage.
* | | | Merge pull request #4607 from lrytz/inlineIndyAdriaan Moors2015-07-084-3/+50
|\ \ \ \ | | | | | | | | | | Accessibility checks for methods with an InvokeDynamic instruction
| * | | | Test warnings when an indy cannot be inlinedLukas Rytz2015-07-083-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two cases tested here - An indyLMF where the lambda body method is private - An indy where the bootstrap method is not LMF
| * | | | Accessibility checks for methods with an InvokeDynamic instructionLukas Rytz2015-07-071-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements the necessary tests to check if a method with an InvokeDynamic instruction can be inlined into a destination class. Only InvokeDynamic instructions with LambdaMetaFactory as bootstrap methods can be inlined. The accessibility checks cannot be implemented generically, because it depends on what the bootstrap method is doing. In particular, the bootstrap method receives a Lookup object as argument which can be used to access private methods of the class where the InvokeDynamic method is located. A comment in the inliner explains the details.
* | | | | Merge pull request #4602 from lrytz/yoptInScalaAdriaan Moors2015-07-0835-84/+47
|\| | | | | |/ / / |/| | | Fix optimizer bugs and enable -Yopt:l:classpath when building scala
| * | | Warn when combining settings for the old optimizer with -YGenBCodeLukas Rytz2015-07-0332-73/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove some unnecessary flags files - neg/t4425.flags - run/blame_eye_triple_eee-double.flags - run/blame_eye_triple_eee-float.flags Force tests that use -optimize to GenASM - neg/sealed-final-neg.flags - pos/inline-access-levels.flags - pos/inliner2.flags - pos/sealed-final.flags - pos/t3420.flags - pos/t8410.flags - run/constant-optimization.flags - run/dead-code-elimination.flags - run/elidable-opt.flags - run/finalvar.flags - run/icode-reader-dead-code.scala - run/optimizer-array-load.flags - run/synchronized.flags - run/t3509.flags - run/t3569.flags - run/t4285.flags - run/t4935.flags - run/t5789.scala - run/t6188.flags - run/t7459b-optimize.flags - run/t7582.flags - run/t7582b.flags - run/t8601.flags - run/t8601b.flags - run/t8601c.flags - run/t8601d.flags - run/t8601e.flags - run/t9003.flags Move some tests to the new optimizer - run/classfile-format-51.scala - run/classfile-format-52.scala - run/run-bug4840.flags - run/t2106.flags - run/t6102.flags
| * | | Set -Xsource to 2.12 by defaultLukas Rytz2015-07-032-11/+15
| | | |
| * | | Enable the new optimizer when building scalaLukas Rytz2015-07-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | No change in build.sbt, there's no optimizer settings there yet. Ignore the inliner warning in presentation/t7678 and run/t8029.scala, noted in https://issues.scala-lang.org/browse/SI-9378
* | | | Merge pull request #4603 from lrytz/lambdaSpectestAdriaan Moors2015-07-061-0/+78
|\ \ \ \ | | | | | | | | | | SI-9373 Restore the test for t8960 with IndyLamba enabled
| * | | | SI-9373 Restore the test for t8960 with IndyLamba enabledLukas Rytz2015-07-031-0/+78
| |/ / /
* / / / Support methodHandle / invokeDynamic constant pool entries in scalapLukas Rytz2015-07-062-0/+16
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Add support in scalap to parse new constant pool entries - MethodHandle - MethodType - InvokeDynamic Spec: https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html
* | | Fix superclass for Java interface symbols created in JavaMirrorsLukas Rytz2015-07-0215-0/+392
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the spec [1] the superclass of an interface is always Object. Restores the tests that were moved to pending in bf951ec1, fixex part of SI-9374. [1] https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.1
* | | Fix some tests, move others to pending/Lukas Rytz2015-07-0135-551/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move run/t8960 to pending It tests the serialVersionUID field on closure classes. The field doesn't exist for indyLambda closures. See https://issues.scala-lang.org/browse/SI-9373 Move some reify tests to pending They fail at runtime in GenBCode since scala is built with indyLambda enabled: java.lang.AssertionError: assertion failed: Bad superClass for trait JFunction1: class Any at scala.tools.nsc.Global.assert(Global.scala:261) at scala.tools.nsc.backend.jvm.BTypesFromSymbols.setClassInfo(BTypesFromSymbols.scala:228) Noted in https://issues.scala-lang.org/browse/SI-9374 force t6546 to GenASM - no closure elimination in GenBCode yet Noted in https://issues.scala-lang.org/browse/SI-9364. Fix or disable some tests that fail because of the old optimizer The old inliner fails more often when the library is built with indylambda. Noted in https://issues.scala-lang.org/browse/SI-9374. Example: List.foreach ➜ sandbox git:(jfun) ✗ qs -Ybackend:GenASM -optimize -Yinline-warnings Welcome to Scala version 2.12.0-20150630-220939-1cb032d806 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45). Type in expressions to have them evaluated. Type :help for more information. scala> List(1,2,3).foreach(x => x + 1) <console>:11: warning: Could not inline required method foreach because bytecode unavailable. List(1,2,3).foreach(x => x + 1) ^ <console>:11: warning: At the end of the day, could not inline @inline-marked method foreach List(1,2,3).foreach(x => x + 1) ^ Upate a number of tests for having indyLambda enabled The delambdafyLambdaClassNames tests was removed, there's nothing to tests with indyLambda.
* | | Default to delambdafy:method and backend:GenBCodeLukas Rytz2015-06-2616-189/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the defaults of `-Ydelambdafy` and `-Ybackend`. Rewrite t6288b-jump-position test - no more icode Don't crash GenBCode beyond JVM code size limits A similar patch is in GenASM, see 3fa2c97 Fix check files for GenBCode / delambdafy:method defaults Force copy propagation test to ASM, see SI-9364 Force inline-ex-handlers test to GenASM, see SI-9364 Move t6613 test to pending - still broken in GenBCode Adding a `flags` file with `-Ybackend:GenASM` doesn't seem to have the desired effect. SI-6613 is re-opened. Force a few tests to GenASM, see SI-9364
* | | Merge pull request #4460 from som-snytt/topic/javap-decomJason Zaugg2015-06-269-107/+3
|\ \ \ | | | | | | | | SI-9277 Downgrade marginal javap features
| * | | SI-9277 Downgrade marginal javap featuresSom Snytt2015-06-259-107/+3
| | | | | | | | | | | | | | | | Drop Java 6 support, -fun, -app, and -raw options.
* | | | Merge pull request #4504 from ruippeixotog/mutable-treemapAdriaan Moors2015-06-251-1/+4
|\ \ \ \ | |/ / / |/| | | SI-4147 Add an implementation of `mutable.TreeMap`
| * | | SI-4147 Add an implementation of `mutable.TreeMap`Rui Gonçalves2015-05-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains an implementation of a mutable red-black tree with focus on performance. It also contains a new `mutable.TreeMap` Scala collection that is backed by the aforementioned tree. The common generic factories and traits related to mutable sorted maps didn't exist yet, so this commit also adds them. Regarding performance, `TreeMap` overrides (from `MapLike` and `SortedMapLike`) all of the most common methods for maps and also those whose default implementations are asymptotically worse than direct red-black tree algorithms (e.g. `last`, `clear`). The `rangeImpl` method of `TreeMap` returns an instance of `TreeMapView`, an inner class of `TreeMap`. This view is backed by the same `RedBlackTree.Tree` instance, and therefore changes to the original map are reflected in the view and vice-versa. The semantics of mutating a view by adding and removing keys outside the view's range are the same of the current `mutable.TreeSet`. A bit less focus was given on the performance of views - in particular, getting the `size` of a `TreeMapView` is O(n) on the number of elements inside the view bounds. That can be improved in the future. In a future commit, `mutable.TreeSet` can be changed to be backed by this red-black tree implementation.
* | | | Merge branch '2.11.x' into merge/2.11.x-to-2.12.x-20150624Jason Zaugg2015-06-2465-213/+604
|\ \ \ \ | |/ / / |/| / / | |/ /
| * | Merge pull request #4574 from janekdb/2.11.x-typos-g-iJason Zaugg2015-06-238-8/+8
| |\ \ | | |/ | |/| Fix 25 typos (g-i)
| | * Fix 25 typos (g-i)Janek Bogucki2015-06-228-8/+8
| | |
| * | Merge pull request #4564 from som-snytt/issue/promptv2.11.7Adriaan Moors2015-06-2221-158/+197
| |\ \ | | | | | | | | SI-9206 Fix REPL code indentation
| | * | SI-9206 Accept paste with custom promptSom Snytt2015-06-211-0/+13
| | | | | | | | | | | | | | | | But sans test.
| | * | SI-9206 Fix REPL code indentationSom Snytt2015-06-1921-158/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make code in error messages line up with the original line of code, templated code is indented by the width of the prompt. Use the raw prompt (without ANSI escapes or newlines) to determine the indentation. Also, indent only once per line.
| * | | Merge pull request #4566 from lrytz/t9359Adriaan Moors2015-06-228-10/+90
| |\ \ \ | | |_|/ | |/| | SI-9359 Fix InnerClass entry flags for nested Java enums
| | * | Fix spurious test failure under -Ybackend:GenBCodeLukas Rytz2015-06-204-10/+6
| | | |
| | * | SI-9359 Fix InnerClass entry flags for nested Java enumsLukas Rytz2015-06-194-0/+84
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The access flags in InnerClass entries for nested Java enums were basically completely off. A first step is to use the recently introduced backend method `javaClassfileFlags`, which is now moved to BCodeAsmCommon. See its doc for an explanation. Then the flags of the enum class symbol were off. An enum is - final if none of its values has a class body - abstract if it has an abstract method (https://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.9) When using the ClassfileParser: - ENUM was never added. I guess that's just an oversight. - ABSTRACT (together with SEALED) was always added. This is to enable exhaustiveness checking, see 3f7b8b5. This is a hack and we have to go through the class members in the backend to find out if the enum actually has the `ACC_ABSTRACT` flag or not. When using the JavaParser: - FINAL was never added. - ABSTRACT was never added. This commit fixes all of the above and tests cases (Java enum read from the classfile and from source).
| * / Fix 36 typos (d-f)Janek Bogucki2015-06-218-9/+9
| |/
| * Merge pull request #4559 from janekdb/2.11.x-scaladoc-2Seth Tisue2015-06-181-1/+1
| |\ | | | | | | Fix some typos (a-c)
| | * Fix some typos (a-c)Janek Bogucki2015-06-181-1/+1
| | |
| * | Merge pull request #4529 from lrytz/inlineAccessibilityJason Zaugg2015-06-193-1/+9
| |\ \ | | |/ | |/| Fix illegal inlining of instructions accessing protected members
| | * Fix illegal inlining of instructions accessing protected membersLukas Rytz2015-05-283-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two issues in the new inliner that would cause a VerifyError and an IllegalAccessError. First, an access to a public member of package protected class C can only be inlined if the destination class can access C. This is tested by t7582b. Second, an access to a protected member requires the receiver object to be a subtype of the class where the instruction is located. So when inlining such an access, we need to know the type of the receiver object - which we don't have. Therefore we don't inline in this case for now. This can be fixed once we have a type propagation analyis. https://github.com/scala-opt/scala/issues/13. This case is tested by t2106. Force kmpSliceSearch test to delambdafy:inline See discussion on https://github.com/scala/scala/pull/4505. The issue will go away when moving to indy-lambda.