aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/runtime
Commit message (Collapse)AuthorAgeFilesLines
* LazyVals: do even more verbose debugging.Dmitry Petrashko2016-06-071-1/+5
|
* LazyVals: support debug mode.Dmitry Petrashko2016-06-071-2/+19
| | | | Helps to spot usage of unsafe that would lead to undefined behaviour.
* Get rid of all new***Array methods expect one.Dmitry Petrashko2016-04-181-38/+2
| | | | | This one is able to encode creation of array of any type and any dimension. Note, it does not handle value classes.
* Fix #1167: Remove the magic from Arrays.newRefArray.Sébastien Doeraene2016-04-181-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | Previously, the method `Arrays.newRefArray` was one of the only 3 methods that are kept generic after erasure. This commit removes this magic, by making it take an actual `j.l.Class[T]` as parameter. Moreover, the methods `newXArray` all receive an actual body, implemented on top of Java reflection, which means that a back-end does not *have to* special-case those methods for correctness. It might still be required for performance, though, depending on the back-end. The JVM back-end is made non-optimal in this commit, precisely because it does not specialize that method anymore. Doing so requires modifying the fork of scalac that we use, which should be done separately. The JS back-end is adapted simply by doing nothing at all on any of the newXArray methods. It will normally call the user-space implementations which use reflection. The Scala.js optimizer will inline and intrinsify the reflective calls, producing optimal code, at the end of the day.
* VCArrayPrototype: replace override "def clone" by "def clone()"Guillaume Martres2016-01-041-1/+1
| | | | | | This prevented Dotty from bootstrapping when the file arguments were given in a certain order because of #1017. Regardless of what we do regarding #1017, it makes sense to use "def clone()" here.
* LazyVals: fix long shifts.Dmitry Petrashko2015-10-221-2/+2
|
* Arrays.newRefArray has multiple symbols that coexist during bootstrap.Dmitry Petrashko2015-07-051-0/+2
| | | | More magic is needed, as enumerating array symbols does not work in backend.
* Merge pull request #558 from dotty-staging/run-testsDmitry Petrashko2015-05-151-0/+9
|\ | | | | Add run tests to pending.
| * Introduce LegacyApp to simplify porting run tests. #559Dmitry Petrashko2015-05-131-0/+9
| |
* | Merge pull request #515 from dotty-staging/classTagsDmitry Petrashko2015-05-131-0/+486
|\ \ | |/ |/| Forked ScalaRuntime and minimal classtags for arrays of value classes.
| * Merge all VC prototypes into single fileDmitry Petrashko2015-05-0510-540/+474
| |
| * Implement implicit defs that return class tags for value classes.Dmitry Petrashko2015-05-059-0/+18
| |
| * Introduce VCArray.clone in scala.Dmitry Petrashko2015-05-052-10/+2
| | | | | | | | It can be done with non-abstract rhs of method.
| * It seems one cannot define clone member in scala trait. Do it in Java.Dmitry Petrashko2015-05-052-1/+11
| | | | | | | | | | | | | | | | [error] /Users/dark/workspace/dotty/src/dotty/runtime/vc/VCPrototype.scala:10: overriding method clone in class VCArrayPrototype of type ()Object; [error] method clone in class Object of type ()Object has weaker access privileges; it should be public; [error] (Note that method clone in class VCArrayPrototype of type ()Object is abstract, [error] and is therefore overridden by concrete method clone in class Object of type ()Object) [error] abstract class VCArrayPrototype[T <: VCPrototype] extends Object with Cloneable {
| * Implement clone on VCArrays without mutable field.Dmitry Petrashko2015-05-059-47/+62
| |
| * Implement clone for VCArrays.Dmitry Petrashko2015-05-0510-9/+65
| | | | | | | | Unfortunately needed to sacrifice the immutability of inner field.
| * Change VCArray naming scheme.Dmitry Petrashko2015-05-059-19/+19
| |
| * Remove VCCompanionPrototype: it is not used.Dmitry Petrashko2015-05-051-4/+0
| |
| * Add array creations to class tags of value classes.Dmitry Petrashko2015-05-059-0/+19
| | | | | | | | Works as Array[T] is erased to Object.
| * implement templates for value class companions.Dmitry Petrashko2015-05-059-2/+47
| | | | | | | | Decreases the size of companion of case value class to 1/8 of it's original size.
| * Add Value classes and array prototypes.Dmitry Petrashko2015-05-0510-0/+401
| | | | | | | | | | | | | | Making actual value classes extend this prototypes serves two goals: - This is a basis for implementing arrays of value classes. - Having underlying final in those glasses makes all unbox methods monomorphic and final. - this decreases size of an empty case-class to 1/3 of previous size.
* | Workaround #548.Dmitry Petrashko2015-05-081-1/+4
|/
* LazyVals: expected value of flag takes only tree values, no need to use long.Dmitry Petrashko2015-04-301-1/+1
|
* We do not plan to have more than Int.MaxValue of lazy vals.Dmitry Petrashko2015-04-301-1/+1
|
* Make LazyVals.getOffset work on j.l.Class instead of taking the instance.Dmitry Petrashko2015-04-301-1/+1
|
* Remove trailing spaces in Dotty source.Dmitry Petrashko2015-04-091-2/+2
|
* Make all Dotty source files end in newline.Dmitry Petrashko2015-04-091-1/+1
|
* Bring back lazyVals. Changed encoding of local lazy vals.Dmitry Petrashko2015-02-031-20/+24
| | | | Now the scheme doesn't introduce circular dependencies between container vals.
* Fix passing : _* arguments to Java methodsMartin Odersky2014-12-211-2/+9
| | | | | Arguments of the form (xs: _*) which are passed to Java methods need to be converted to arrays, not sequences.
* Previous scheme was buggy; leaked Array types to backend.Martin Odersky2014-11-281-0/+47
| | | | | | Now: All new Array[T] methods are translated to calls of the form dotty.Arrays.newXYZArray ...
* LazyVals phase.Dmitry Petrashko2014-03-192-0/+119
Creates accessors for lazy vals: 1) lazy local vals are rewritten to dotty.runtime.Lazy*** holders 2) for a non-volatile field lazy val create a non-thread-safe accessor and flag: 2.a) if lazy val type indicates that val is not nullable, uses null value as a flag 2.b) else uses boolean flag for sake of performance, method size, and allowing more jvm optimizations 3) for a volatile field lazy val use double locking scheme, that guaranties no spurious deadlocks, using long bits as bitmaps and creating companion objects to store offsets needed for unsafe methods. Conflicts: test/dotc/tests.scala