summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | SI-6710 / PR 5072 follow-up: fix Unit.box / Unit.unboxLukas Rytz2016-04-204-10/+133
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The backend replaces .box / .unbox methods by corresponding invocations to BoxesRunTime, but not for Unit. This commit restores the body of `Unit.box` and `Unit.unbox`.
* | | | | Merge pull request #5098 from sjrd/simplify-scala-runtimeLukas Rytz2016-04-2016-343/+66
|\ \ \ \ \ | | | | | | | | | | | | Simplify scala.runtime
| * | | | | Remove the unused scala.runtime.Boxed trait.Sébastien Doeraene2016-04-131-12/+0
| | | | | |
| * | | | | Remove plain old dead code in ScalaRunTime.Sébastien Doeraene2016-04-132-66/+0
| | | | | |
| * | | | | Do not rely on ScalaRunTime.{inlineEquals,hash} in JavaMirrors.Sébastien Doeraene2016-04-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | We can use the normal Scala language constructs instead.
| * | | | | Move ScalaRunTime.box to typechecker.Macros.Sébastien Doeraene2016-04-132-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | Because it was its only call site.
| * | | | | Inline ScalaRunTime.arrayElementClass at call sites.Sébastien Doeraene2016-04-137-33/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method was awful. Not only it was using run-time type tests to essentially encode compile-time overloading. But it also did 2 slightly different things for the Class case and ClassTag case. All in all, it is much more readable to inline the appropriate implementation at every call site.
| * | | | | Move ScalaRunTime.isAnyVal to reify.phases.Reify.Sébastien Doeraene2016-04-133-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | Because that is the only call site of that method.
| * | | | | Hide ScalaRunTime.isTuple inside stringOf.Sébastien Doeraene2016-04-133-65/+10
| | | | | | | | | | | | | | | | | | | | | | | | Because it is otherwise unused.
| * | | | | Remove dead-code runtime hash() methods.Sébastien Doeraene2016-04-136-94/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ScalaRunTime had a bunch of overloads of the `hash()` method, but only the `Any` version is ever used by the codegen. Worse, their implementation was not in sync with the actual implementations in BoxesRunTime, called by the `Any` version. For example, hash(0x80000000L) != hash(0x80000000L: Any) This commit simply removes all of this dead code. Similarly, we remove BoxesRunTime.hashFromObject(), which was never called either.
| * | | | | Inline ArrayRuntime methods in ScalaRunTime.array_clone().Sébastien Doeraene2016-04-133-44/+18
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for Array[T].clone() was introduced in 36ef60e68c03bc1c7fd2e910ae7d70d4ec32d3bf. At the time, all calls to array.clone() were redirected to ScalaRunTime.array_clone(), which meant that array_clone() itself could not be implemented in terms of `x.clone()`. A Java binding was necessary. Now, the rewriting to `array_clone()` is only done for unbounded generic arrays. Since all the calls within `array_clone()` are monomorphic arrays, the rewriting is not applied, and the Java binding is unnecessary.
* / / / / SI-9749 REPL strip lead ws on dot continuation (#5097)som-snytt2016-04-153-7/+25
|/ / / / | | | | | | | | | | | | | | | | | | | | Permit leading whitespace before `.` for continued selection. This is just to handle pastes, which will typically include indented text, and not to make dot-continuation especially robust.
* | | | Merge pull request #5082 from lrytz/inlineImplClassCleanupLukas Rytz2016-04-0719-338/+164
|\ \ \ \ | | | | | | | | | | Cleanups related to the removal of trait impl classes
| * | | | Fix InlineInfo attribute for nested module accessorsLukas Rytz2016-04-072-34/+74
| | | | |
| * | | | Remove references to trait impl classes, mostly in doc commentsLukas Rytz2016-04-0711-85/+49
| | | | |
| * | | | Remove unused optimizer warnings related to trait impl classesLukas Rytz2016-04-042-30/+0
| | | | |
| * | | | Remove dead code in the optimizer related to trait impl classesLukas Rytz2016-04-048-209/+61
| | | | |
* | | | | Merge pull request #5087 from sh0hei/delete_unnecessary_blank_lineAdriaan Moors2016-04-071-2/+0
|\ \ \ \ \ | | | | | | | | | | | | Delete unnecessary blank line
| * | | | | Delete unnecessary blank linesh0hei2016-04-071-2/+0
|/ / / / /
* | | | | Generate AnyVal source stubs from sbtStefan Zeiger2016-04-0615-114/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sbt command `generateSources` now generates both the AnyVal sources and the tuple/function sources (previously done by `genprod`). Source generation is part of the sbt build, the `scala.tools.cmd.gen` package is removed from `scala-compiler`. This simplifies bootstrapping. Generated sources are still in the same location and checked into git. The shell scripts `tools/codegen` and `tools/codegen-anyvals` are also removed. The ant build and the build scripts do not call these. Regenerating sources is a manual step at the moment.
* | | | | Merge pull request #5081 from adriaanm/2.12.xAdriaan Moors2016-04-041-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Bump STARR to 2.12.0-M4.
| * | | | | Bump STARR to 2.12.0-M4.Adriaan Moors2016-04-041-2/+2
| | | | | |
* | | | | | General cleanups and less warnings during a Scala buildsoc2016-04-0448-128/+80
|/ / / / /
* | | | | SI-6710 Clarify stub methods in primitive value classesLukas Rytz2016-04-0410-39/+47
|\ \ \ \ \ | | | | | | | | | | | | SI-6710 Clarify stub methods in primitive value classes
| * | | | | SI-6710 Clarify stub methods in primitive value classesLukas Rytz2016-04-0110-39/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaces the implementations of box/unbox in AnyVal companions by `???`, the methods are only stubs, and the impls did not correspond to the actual behavior. The doc comment already points to the actual implementation in BoxesRunTime. - Replaces the body of `getClass` from `null` to `???` and clarifies in a comment why the overrides exist.
* | | | | | Merge pull request #5077 from felixmulder/topic/scaladoc-minor-fixes1Vlad Ureche2016-04-048-52/+101
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Minor fixes to Scaladoc
| * | | | | Fix incorrect svg on objects with companion traitsFelix Mulder2016-04-035-35/+71
| | | | | |
| * | | | | Fix expansion on click for "Full Signature" elementFelix Mulder2016-04-031-1/+6
| | | | | |
| * | | | | Fix sidebar not displaying objects with no companionFelix Mulder2016-04-032-15/+23
| | | | | |
| * | | | | Fix inconsistent icon elem insertionFelix Mulder2016-04-031-1/+1
| |/ / / /
* / / / / Fix minor typoNafer Sanabria2016-04-041-1/+1
|/ / / /
* | | | Merge pull request #5068 from retronym/topic/jdk8ism2v2.12.0-M4Lukas Rytz2016-04-0116-67/+82
|\ \ \ \ | | | | | | | | | | Accomodate and exploit new library, lang features JDK 8
| * | | | At the end of a run, close macro runtime's classloaderJason Zaugg2016-03-303-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can only do this on 2.12.x, because URLClassLoader#close is new in JDK 7. Tested manually with the REPL and resident compilers. ``` % qscalac sandbox/macro.scala && (for i in 1 2; do echo sandbox/client.scala; done; printf '\n') | qscalac -Xresident -Ylog:all -Ydebug 2>&1 | grep "Closing macro runtime classloader" [log terminal] Closing macro runtime classloader [log terminal] Closing macro runtime classloader % qscalac sandbox/macro.scala && (for i in 1 2; do echo Macro.m; done; printf '\n') | qscala -Ylog:all -Ydebug 2>&1 | grep "Closing macro runtime classloader"; stty echo [log terminal] Closing macro runtime classloader [log terminal] Closing macro runtime classloader ``` Note: this doesn't close handles to JAR files held by the compiler classpath implementation, that will require changes elsewhere.
| * | | | Java types and type parameters can be annotated since JSR 308Jason Zaugg2016-03-293-1/+14
| | | | |
| * | | | Use System.lineSeparator, rather than sys.propsJason Zaugg2016-03-293-4/+3
| | | | |
| * | | | Use Java's highestOneBit, rather than our own versions.Jason Zaugg2016-03-291-21/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original code came from 2008, (a4ace382), at which point we probably couldn't use JDK 1.5+ methods. I haven't changed `unsignedCompare` yet to use the standard library version, as it our version might have different performance characteristics. Background: http://www.drmaciver.com/2008/08/unsigned-comparison-in-javascala/
| * | | | Note the availability of writableStackTrace in JDK 1.7+Jason Zaugg2016-03-291-0/+2
| | | | |
| * | | | SI-7474 Record extra errors in Throwable#suppressedExceptionsJason Zaugg2016-03-293-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... in parallel collection operations. Followup to bcbe38d18, which did away with the the approach to use a composite exception when more than one error happened.
| * | | | Delegate more primitive comparison to the Java stdlibJason Zaugg2016-03-291-16/+6
| | | | | | | | | | | | | | | | | | | | The API for doing so efficiently was made regular in Java 1.8.
| * | | | Avoid intermediate boxing in BoxesRuntime.hashCodeFromJason Zaugg2016-03-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | By using newly introduced static methods in the Java standard library.
* | | | | Merge pull request #5070 from markus1189/stream-docsLukas Rytz2016-04-011-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Fix typo in the docs for the ++ method of Stream
| * | | | | Fix typo in the docs for the ++ method of StreamMarkus Hauck2016-03-311-1/+1
| | | | | |
* | | | | | Merge pull request #5071 from janekdb/topic/2.12.x-scaladoc-ExceptionsLukas Rytz2016-04-012-7/+55
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add initial unit test for Catch and augment documentation
| * | | | | | Add initial unit test for Catch and augment documentationJanek Bogucki2016-03-312-7/+55
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add unit test for andFinally - Reduce code duplication in andFinally - Extend documentation
* | | | | | Merge pull request #5059 from lrytz/t9702Adriaan Moors2016-03-317-55/+200
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-9702 Fix backend crash with classOf[T] annotation argument
| * | | | | | SI-9702 Fix backend crash with classOf[T] annotation argumentLukas Rytz2016-03-307-55/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes various issues with classOf literals and Java annotations. - Ensure that a Type within a ConstantType (i.e., a classOf literal) is erased, so `classOf[List[Int]]` becomes `classOf[List]`. - Ensure that no non-erased types are passed to `typeToBType` in the backend. This happens for Java annotations: the annotation type and `classOf` annotation arguments are not erased, the annotationInfos of a symbol are not touched in the compiler pipeline. - If T is an alias to a value class, ensure that `classOf[T]` erases to the value class by calling `dealiasWiden` in erasure.
* | | | | | | Merge pull request #4971 from adriaanm/genbcode-delambdafyAdriaan Moors2016-03-3195-1452/+1739
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | Unify treatment of built-in functions and SAMs
| * | | | | | Clarify how/when typedFunction unrolls eta-expansionAdriaan Moors2016-03-312-21/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jason points out the recursion will be okay if type checking the function inside the eta-expansion provides fully determined argument types, as the result type is not relevant for this phase of typedFunction.
| * | | | | | typedFunction undoes eta-expansion regardless of expected typeAdriaan Moors2016-03-303-45/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When recovering missing argument types for an eta-expanded method value, rework the expected type to a method type.
| * | | | | | Keep Function when CBN arg thunk targets a SAMAdriaan Moors2016-03-305-29/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The body of `def delay[T](v: => T) = (v _): F0[T]` becomes `() => v` during `typedEta`, and then uncurry considers whether to strip the function wrapper since `v` is known to be a `Function0` thunk. Stripping is sound when the expected type is `Function0` for this expression, but that's no longer a given, since we could be expecting any nullary SAM. Also sweep up a bit around `typedEta`. Encapsulate the, erm, creative encoding of `m _` as `Typed(m, Function(Nil, EmptyTree))`.