aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/backend/sjs
Commit message (Collapse)AuthorAgeFilesLines
* Move sjs, make sure that partest compiles everything in dirsFelix Mulder2016-11-228-3325/+0
|
* Fix #1167: Remove the magic from Arrays.newRefArray.Sébastien Doeraene2016-04-182-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Implement loading static fields in the Scala.js back-end.Sébastien Doeraene2016-04-181-3/+21
|
* Upgrade to Scala.js 0.6.8.Sébastien Doeraene2016-03-181-17/+4
| | | | | | This allows to remove the ugly workaround for default methods. There is also a slight adaptation for the new way to encode a reference to the JS global scope in the IR.
* More documentation for some Scala.js-specific methods.Sébastien Doeraene2016-03-163-4/+33
|
* Cache the Phases we need in JSCodeGen like all other phases.Sébastien Doeraene2016-03-161-8/+3
|
* Implement most of use-site JavaScript interop.Sébastien Doeraene2016-03-102-16/+437
| | | | | | Notable things that are not yet implemented: * JS exports * Scala.js-defined JS classes.
* Implement most of the Scala.js IR code generator.Sébastien Doeraene2016-03-105-74/+1020
| | | | | | | | Notable things that are missing at this point: * Pattern matching * Try * Most of the JavaScript interop
* Store the JSDefinitions in a custom platform SJSPlatform.Sébastien Doeraene2016-03-011-15/+5
| | | | | | This required the ability to instantiate a different `Platform` depending on settings, which, in turn, required to defer the initialization of `ContextBase.platform`.
* Initial infrastructure and hello world for the Scala.js back-end.Sébastien Doeraene2016-03-017-0/+1971
The Scala.js back-end can be enabled with the `-scalajs` command-line option. Currently, it adds one phase to the pipeline, which emits .sjsir files from trees. A sandbox project `sjsSandbox`, in `sandbox/scalajs/`, can be used to easily test Scala.js compilation. One can run the `main()` method of the `hello.world` object with > sjsSandbox/run The back-end only contains the bare mimimum to compile the hello world application in the sandbox. Anything else will blow up (for example, primitive method calls). It is a work-in-progress.