Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bootstrap 3 #1

Closed
wants to merge 1,734 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1734 commits
Select commit Hold shift + click to select a range
122b035
More documentation for some Scala.js-specific methods.
sjrd Mar 16, 2016
cdbc163
Merge pull request #1154 from dotty-staging/add-rewrite
odersky Mar 18, 2016
d875fef
Merge pull request #1148 from sjrd/scalajs-gen-exprs
odersky Mar 18, 2016
bd8a6dc
Merge pull request #1160 from dotty-staging/add/collection-strawman
odersky Mar 18, 2016
e73ef77
Merge pull request #1166 from dotty-staging/fix-#1136
odersky Mar 18, 2016
a675cbf
Merge pull request #1176 from liufengyun/master
DarkDimius Mar 18, 2016
a1a4b98
Initialize context in REPL
odersky Mar 17, 2016
f08c741
Fix handling of imports in REPL.
odersky Mar 17, 2016
c938f00
Get rid of indentCode
odersky Mar 17, 2016
57bde5b
Get rid of prompt in Driver
odersky Mar 17, 2016
e1fb194
Add REPL tests
odersky Mar 17, 2016
d8a7a59
Move all overridable bits into Config class
odersky Mar 17, 2016
a7a0543
Add docs to TestREPL
odersky Mar 18, 2016
ef8c196
Add test file
odersky Mar 18, 2016
b17951d
Upgrade to Scala.js 0.6.8.
sjrd Mar 18, 2016
f8ebf77
Merge pull request #1183 from sjrd/scalajs-0.6.8
DarkDimius Mar 18, 2016
72b44d9
support `xs @ _*` and `_*` in Scala2 mode
liufengyun Mar 15, 2016
5ff8649
String options with choices should be followed by colon and argument …
niktrop Mar 18, 2016
1b29119
Merge pull request #1179 from liufengyun/fix-issue-1059
odersky Mar 18, 2016
7e7058a
better positioning of `_*` not last argument error
liufengyun Mar 18, 2016
4df2e28
Fix problem involving classtag based pattern matches.
odersky Mar 21, 2016
fadcf44
Merge pull request #1187 from dotty-staging/fix-#1174
smarter Mar 22, 2016
552a56a
Merge pull request #1184 from liufengyun/error-pos
odersky Mar 22, 2016
3e43c7f
Merge pull request #1180 from niktrop/dotc-settings-format
DarkDimius Mar 22, 2016
709ab9d
TASTY tests for src/dotty
VladimirNik Mar 24, 2016
035aff4
Merge pull request #1104 from dotty-staging/spec-bugs
DarkDimius Mar 24, 2016
0855b07
Fixes to checkNonCyclic
odersky Mar 19, 2016
b490347
Simplify and fix avoid logic
odersky Mar 19, 2016
a44082f
Add test for #1181 to pending
odersky Mar 19, 2016
e7e81d0
Fix type-shifting problem in vcInlineMethods
odersky Mar 20, 2016
04be034
Fix error message output.
odersky Mar 21, 2016
bbbb662
Fix test case.
odersky Mar 22, 2016
0474de6
Fix bug in printing New nodes
odersky Mar 22, 2016
d0f9848
Add methods for expressing named type params
odersky Mar 25, 2016
c03c8ca
Take named type parameters into account when instantiating variables.
odersky Mar 25, 2016
506c106
Don't lambda expand and/or types over named type parameters
odersky Mar 25, 2016
6d2a3d3
Test cases
odersky Mar 25, 2016
de870e2
Adapt type assignment for AppliedTypeTrees to new named params
odersky Mar 25, 2016
78d2c9a
Simplify widenToParents
odersky Mar 25, 2016
2474c1b
Fix a case in deskolemize.
odersky Mar 25, 2016
f8aa4b3
Fix documentation of liftIfHK
odersky Mar 25, 2016
78545bb
Add ApproximatingTypeMap class
odersky Mar 26, 2016
d897678
Base deskolemize on ApproximatingTypeMap
odersky Mar 26, 2016
f675ad9
Domain checking for named type parameters
odersky Mar 30, 2016
901fc77
Add tests related to variance checking.
sstucki Mar 29, 2016
e4196bb
Merge pull request #1190 from sstucki/test/variance
DarkDimius Mar 30, 2016
8cafcb9
Merge pull request #1189 from dotty-staging/tasty-dotty-tests
DarkDimius Mar 30, 2016
5bd08d4
Merge pull request #1182 from dotty-staging/repl-fixes
odersky Mar 31, 2016
7871236
merge variances and Variances
odersky Mar 31, 2016
3a27571
Fix build.
DarkDimius Mar 31, 2016
db24466
Merge pull request #1193 from dotty-staging/fix-variances
DarkDimius Mar 31, 2016
80b1247
Remove Variances.scala files accidentally leftover from #1193
smarter Mar 31, 2016
07833e9
FullParametrization: allow to have $this of ThisType.
DarkDimius Feb 15, 2016
aab561c
Tailrec: drop support for polymorphic recursion.
DarkDimius Mar 31, 2016
bef9634
Fix #1089: Special-case local methods
DarkDimius Mar 31, 2016
2fe8ad5
FullParameterization: Fix indentation and a typo.
DarkDimius Mar 31, 2016
f38921f
Fix #854: Optimize matches on primitive constants as switches.
sjrd Feb 5, 2016
8d85cd7
Merge pull request #1091 from dotty-staging/fix1089
DarkDimius Mar 31, 2016
2cf40ab
Merge pull request #1061 from sjrd/switches
DarkDimius Mar 31, 2016
f7664c2
Temporarilly enable printing of original failure signature to debug f…
odersky Mar 31, 2016
6ae7051
Merge pull request #1197 from dotty-staging/debug-unpickle
DarkDimius Mar 31, 2016
669b959
First of a series of compiler design documents
odersky Mar 13, 2016
4687dd3
Add more material to periods.md
odersky Mar 13, 2016
f9632ae
Fix typo
odersky Mar 13, 2016
646ef5c
fix typo
odersky Mar 13, 2016
32dcb8b
add syntax highlighting
odersky Mar 13, 2016
b2d1e87
Move Mode to core
odersky Mar 14, 2016
a73a1d9
Document phases
odersky Mar 15, 2016
5ab9e4d
New article: dotc's overall structure
odersky Mar 15, 2016
1c48c1f
Add links
odersky Mar 15, 2016
4ab1667
Better documentation of main classes
odersky Mar 15, 2016
492791f
Polishing
odersky Mar 15, 2016
98a69ca
Drop Mode.scala from tasty_typer test
odersky Mar 18, 2016
d1ffa3e
Merge pull request #1172 from dotty-staging/compiler-docs
odersky Apr 1, 2016
079943e
Make erased value type take a TypeRef instead of a ClassSymbol
odersky Apr 3, 2016
a8b0540
Docs and polishing for denotation insertions
odersky Apr 3, 2016
f5c2200
Fix copy-paste error
odersky Apr 3, 2016
27e5c21
Fix comment
odersky Apr 3, 2016
ba1027e
Fix doc comment
odersky Apr 3, 2016
30b3840
Check Java classes are not used as objects
liufengyun Apr 4, 2016
56d53a4
Fix double computation in TermRefWithSignature.newLikeThis
DarkDimius Apr 4, 2016
7c72b0c
Fix TermRefWithSignature.newLikeThis
DarkDimius Apr 4, 2016
438cdf6
simple integration with jline
liufengyun Apr 5, 2016
4ca4fa1
Merge pull request #1204 from liufengyun/jline
odersky Apr 6, 2016
8dff0c6
Merge pull request #1203 from lampepfl/DarkDimius-patch-5
odersky Apr 6, 2016
1a6eedd
Merge pull request #1199 from dotty-staging/fix-stale-sym
odersky Apr 6, 2016
474d997
Merge pull request #1186 from dotty-staging/fix-#1185
odersky Apr 6, 2016
0e6cce6
Add initial support for raw docstrings in ASTs
felixmulder Mar 7, 2016
3b4906d
Add tests for classes and traits
felixmulder Mar 8, 2016
7f20aef
Fix traits w/o bodies not getting the correct docstring
felixmulder Mar 8, 2016
ee54137
Add ability to parse nested classes/traits docstrings
felixmulder Mar 9, 2016
3aab803
Add package object support
felixmulder Mar 9, 2016
c66998b
Fix association of docstrings based on posisition
felixmulder Mar 10, 2016
6c8265c
Add docstring support for types, vals, vars and defs
felixmulder Mar 10, 2016
8513dd6
Change tests to be based on JUnit, rename comments variable
felixmulder Mar 10, 2016
844683e
Implement comments as attachments instead of tree members
felixmulder Mar 10, 2016
f43f520
Add binding between Symbol and Untyped tree in base context
felixmulder Apr 7, 2016
c7730ad
Add commandline argument `-Ykeep-comments` to remove hardcoding
felixmulder Apr 7, 2016
60379c2
Remove old datastructure for comments
felixmulder Apr 7, 2016
422b061
Search implicit arguments in the same context as typing explicit ones
odersky Apr 7, 2016
306d422
Take type parameters for this(...) constructor calls from prefix
odersky Apr 7, 2016
03e8c54
Treat type parameters of secondary constructors as aliases
odersky Apr 7, 2016
e2cdfa3
Augment test case
odersky Apr 7, 2016
90f9653
Make first phase of FromTasty not be a Typer
odersky Apr 7, 2016
3e0be57
Add dotty.annotation.internal.SourceFile annotation
odersky Apr 7, 2016
b3b3f3c
Fix reading of SourceFile attribute from Tasty
odersky Apr 7, 2016
cb1f386
Pickle sourcefile attribute with canonical path
odersky Apr 7, 2016
8ddfa83
Add unpickled source file path as annotation to root symbols
odersky Apr 7, 2016
cc7acea
Take SourceFile annotations into account when computing sourceFile
odersky Apr 7, 2016
29e5792
Test cases
odersky Apr 7, 2016
88eb98f
Fix flags when unpickling setters of parameter accessors
odersky Apr 7, 2016
56b948c
Update TastyFormat for SeqLiteral
odersky Apr 7, 2016
20175a0
Fix unpickling of Java SeqLiterals
odersky Apr 7, 2016
b37a2a8
Add source file for SourceFile annotation
odersky Apr 8, 2016
1c56d8c
Merge pull request #1201 from liufengyun/i972
DarkDimius Apr 8, 2016
5debb09
Explain isTyper field in Phase.
odersky Apr 8, 2016
f9d27c9
Store source files as normal paths, not canonical ones.
odersky Apr 8, 2016
fcf0efe
Merge pull request #1151 from felixmulder/topic/wip-docstrings
odersky Apr 8, 2016
5aa59ac
Simplify handling of sourcefiles in Tasty info
odersky Apr 9, 2016
0907f5b
Avoid creating a SourceFile annotation for SourceFile itself
odersky Apr 9, 2016
6942127
Rearrange pickle tests
odersky Apr 9, 2016
dfcb26e
Fix issues with `enterBlock` for comment parsing
felixmulder Apr 11, 2016
b56f5c9
Merge pull request #1213 from felixmulder/topic/comment-parsing-fix
DarkDimius Apr 11, 2016
7ea24c6
Update TASTY tests for dotty/src
VladimirNik Apr 13, 2016
c47eba5
Fix #1216 Desugar: vals that are desugared PatDef may need setters.
DarkDimius Apr 14, 2016
4d805dd
Check that #1216 is fixed.
DarkDimius Apr 14, 2016
3eb30ad
workaround for ScalaMeter incorrect report path
liufengyun Apr 14, 2016
8af61ab
Merge pull request #1217 from dotty-staging/fix-1216
smarter Apr 14, 2016
74634c2
New tests
odersky Apr 15, 2016
2cd72de
store all benchmark results instead of doing expoential backoff
liufengyun Apr 15, 2016
371e8a7
Ycheck that all methods have method type
liufengyun Apr 6, 2016
a77eb15
Small improvements in Types
odersky Apr 15, 2016
98d7183
Create LambdaTraits referred to from Unpickler
odersky Apr 15, 2016
6545934
Fix #765 for super accessors
odersky Apr 15, 2016
eb2979d
Fix toString and productPrefix of case objects
odersky Apr 15, 2016
9481fe9
Dealias applied type constructors
odersky Apr 15, 2016
c32a2ac
Tweak in NameOps
odersky Apr 15, 2016
1607c7b
Make Names immutable Seqs
odersky Apr 15, 2016
cae12d3
Add companions to value classes during desugarings
odersky Apr 15, 2016
b3f81fd
Add check file
odersky Apr 15, 2016
3ef4115
Merge pull request #1211 from dotty-staging/fix-#1202
odersky Apr 16, 2016
b98e6bf
Merge pull request #1200 from dotty-staging/docs-denotations
odersky Apr 16, 2016
997afcb
Strawman polishing
odersky Apr 16, 2016
8cb73c0
Drop type annotation in collection test
odersky Apr 16, 2016
b8472d8
Updates of strawman
odersky Apr 17, 2016
79a284f
Fix check files
odersky Apr 17, 2016
16b90f7
Merge pull request #1218 from dotty-staging/benchmarks
DarkDimius Apr 18, 2016
8c9a3f7
Merge pull request #1205 from dotty-staging/method-check
DarkDimius Apr 18, 2016
88baa04
Implement loading static fields in the Scala.js back-end.
sjrd Mar 23, 2016
27deb1e
Fix #1167: Remove the magic from Arrays.newRefArray.
sjrd Mar 23, 2016
0211e56
Get rid of all new***Array methods expect one.
DarkDimius Mar 23, 2016
7e2352a
Decouple handling array constructors from typer.
DarkDimius Mar 23, 2016
3f41bd6
Update to new version of DottyBackendInterface.
DarkDimius Mar 23, 2016
57fcea6
Erasure: Erase constant literals.
DarkDimius Mar 23, 2016
3fc2b6e
Add a test to check multidimenstionall arrays.
DarkDimius Mar 23, 2016
2c370bd
make tpd.JavaSeqLiteral return JavaSeqLiteral
DarkDimius Mar 30, 2016
9d7db0c
Bring back convertNewArray into typer.
DarkDimius Mar 30, 2016
c74bb42
Separate handling of genericArray creation from normal ones.
DarkDimius Mar 30, 2016
55e2ae6
ArrayConstructors: don't optimise creating of multi-dim generic arrays.
DarkDimius Mar 30, 2016
0b1ca2d
Address review comments.
DarkDimius Mar 31, 2016
5399fbe
Address review comments of #1188
DarkDimius Apr 18, 2016
247e913
Merge pull request #1188 from dotty-staging/remove-newarray-magic
DarkDimius Apr 18, 2016
d4589a4
Implement #1221. Allow to specify per-callsite @tailrec annotation.
DarkDimius Apr 18, 2016
ca47bea
Test #1221.
DarkDimius Apr 18, 2016
d8bad7a
Tailrec:report error if method containing @tailrec callsite isn't final
DarkDimius Apr 18, 2016
7cd8257
Add neg-test for method with @tailrec callsites that is not final.
DarkDimius Apr 18, 2016
0514d0e
Merge pull request #1219 from dotty-staging/fix-strawmans
DarkDimius Apr 20, 2016
d20314f
Fix test failures in tailcall due to name clashes.
DarkDimius Apr 19, 2016
2460f96
Always minimize type variables when interpolating an expected type of…
odersky Apr 21, 2016
3c38a6b
Fix constraint handling in eitherIsSubtype
odersky Apr 21, 2016
f320ac8
Straw man for multiversal equality.
odersky Apr 21, 2016
320ca51
Avoid propagating unresolved implicits
odersky Apr 21, 2016
89f9091
Support implicitNotFound annotation
odersky Apr 22, 2016
05bfe78
Comment out debug println
odersky Apr 22, 2016
d5dfd16
Add test that demonstrate that #878 is fixed
smarter Apr 22, 2016
769f8a0
arrayConstructors: do not rewrite ofDim for arrays of value classes
VladimirNik Apr 25, 2016
02f1ec9
Merge pull request #1227 from dotty-staging/implement-1221
DarkDimius Apr 26, 2016
6b0ae0b
Merge branch 'master' into fix-equality
odersky Apr 26, 2016
ef2c479
Merge pull request #1231 from dotty-staging/fix-equality
odersky Apr 26, 2016
4d7aaf6
Merge pull request #1237 from dotty-staging/vc-ofDim
DarkDimius Apr 26, 2016
5e599cc
Rename Reporting#println -> Reporting#echo
odersky Apr 27, 2016
c653a95
Avoid forming ???.T type.
odersky Apr 27, 2016
06e76c8
Fix misprediction of dependent method type status.
odersky Apr 27, 2016
6c0184b
Test case
odersky Apr 27, 2016
42b20d7
Better error diagnostics for "not an extractor" errors.
odersky Apr 27, 2016
89b6860
Add FurtureDefsOK for isBottomType
odersky Apr 27, 2016
ed8e2ba
Dealias more types in resultType
odersky Apr 27, 2016
3129c1c
Revert: Better error diagnostics for "not an extractor" errors.
odersky Apr 27, 2016
d7c1c27
Allow dependent method type for unapply.
odersky Apr 27, 2016
96fcdd9
Merge pull request #1238 from dotty-staging/fix-#1235
odersky Apr 28, 2016
53bd25f
Initial implementation featuring two different highlighters
felixmulder Apr 22, 2016
96cedcd
Highlight comments, remove scanner wrapping syntax highlighter
felixmulder Apr 26, 2016
d049845
Add multiline support using ammonite multilineFilter
felixmulder Apr 27, 2016
57670a3
Stop interpreter from interpreting twice on enter
felixmulder Apr 27, 2016
0f91408
Fix interpret dummy line before prompt displayed
felixmulder Apr 27, 2016
d1ec140
Fix highlighting tokens after newline predated by '='
felixmulder Apr 27, 2016
4d53d33
Fix error messages not being doubled and being on a new line
felixmulder Apr 27, 2016
b5d6df2
Fix `:...` commands printing erroneous messages on next newline
felixmulder Apr 27, 2016
f010c62
Revert Scanners and Tokens to their original form
felixmulder Apr 27, 2016
43f3916
Fix stdin/out for repl launched by SBT
felixmulder Apr 28, 2016
e64c561
Transform annotations only if defined in current run
odersky Apr 29, 2016
fb959f7
Refine todo comment
odersky Apr 29, 2016
1c7c738
Ensure more things are completed
odersky Apr 29, 2016
4fadce4
Rename old DottyRepl (used for power mode) using ILoop to TypeStealer
felixmulder Apr 28, 2016
29fc55a
Add Ammonite's MIT license
felixmulder Apr 28, 2016
1582959
Fix keywords sometimes not highlighted in multiln
felixmulder Apr 29, 2016
f9858a4
Merge pull request #1241 from dotty-staging/fix-#1222
DarkDimius Apr 29, 2016
0900f11
eliminate self symbol in Template and ClassInfo
liufengyun May 2, 2016
04993c7
Merge pull request #1245 from dotty-staging/elimself
DarkDimius May 4, 2016
8baa279
Update Readme.md for ScalaDays
DarkDimius May 9, 2016
4e9fecf
Update README.md
DarkDimius May 9, 2016
b321c3c
Update README.md
DarkDimius May 9, 2016
7124da9
Update README.md
DarkDimius May 9, 2016
b3232de
Update README.md
DarkDimius May 9, 2016
c9be68e
Update README.md
DarkDimius May 9, 2016
f18e27b
Update README.md
DarkDimius May 10, 2016
181d7e4
Merge pull request #1248 from lampepfl/DarkDimius-patch-6
DarkDimius May 10, 2016
134ad7a
Merge pull request #1233 from felixmulder/topic/repl-syntax-highlighting
DarkDimius May 10, 2016
f36c21e
Avoid merging denotations of different symbols in same class
odersky May 1, 2016
cc0f629
Don't copy Any constructor to Object in Erasure
odersky May 1, 2016
d0f05ad
ResolveOverloaded should handle alternatives that are the same TermRef
odersky May 1, 2016
2dd6a7a
Test case
odersky May 1, 2016
968f1ab
Fix test case
odersky May 2, 2016
48b7160
Issue MergeError exception for double def situations
odersky May 2, 2016
f722de7
A test case for overloading/overriding interactions
odersky May 2, 2016
fe5f4f3
Revert: ResolveOverloaded should handle alternatives that are the sam…
odersky May 2, 2016
9aa800f
Refined handling of atSignature
odersky May 2, 2016
3a97b3f
Another test case involving super accessors
odersky May 3, 2016
b26b725
Handle MergeErrors in RefChecks
odersky May 3, 2016
c9ac3d7
Remove stray test
odersky May 16, 2016
c29e975
Fix dotc bootstrap failure
odersky May 19, 2016
f1d95c2
Fix test
odersky May 19, 2016
c87c030
Better doc comment
odersky May 19, 2016
77642b9
Two more tests
odersky May 19, 2016
f4e7f84
Use source module ref as assumed self type when reading Tasty
odersky May 19, 2016
ad73126
Disable stub checking
odersky May 19, 2016
87489f5
Further improve doc comment
odersky May 20, 2016
1e3b0e1
Decouple annotation transformers from info transformers
odersky May 20, 2016
40696ba
Instrument Denotations#current to find CyclicReference
odersky May 20, 2016
2443760
Don't force a symbol's denotation for isTerm/isType
odersky May 20, 2016
09eddd0
Make sure local data is unpickled at right phase
odersky May 20, 2016
daf736c
Replace aliases to Unit by Unit
odersky May 20, 2016
4755570
Fix withPhaseNoLater
odersky May 20, 2016
e0c2e4d
Remove fingerprinting
odersky May 20, 2016
ddf16fd
Drop Frozen
odersky May 20, 2016
65513e0
Make sure delayed Tasty unpicklings are done at the latest at Pickler…
odersky May 21, 2016
fc2389f
Let createSymbol return a symbol
odersky May 21, 2016
85b488d
Maintain ownerTree data structure when unpickling Tasty
odersky May 21, 2016
630efff
Adopt new scheme for handling forward references in Tasty
odersky May 22, 2016
1094e63
Refine owner trees for templates
odersky May 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.class
*.log
*~
*.swp

# sbt specific
dist/*
Expand Down Expand Up @@ -30,3 +31,10 @@ classes/
tests/partest-generated/
tests/locks/
/test-classes/

# Used in tests
scala-scala

# Ignore output files but keep the directory
out/
!out/.keep
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

82 changes: 72 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,85 @@
dotty
=====

[![Build Status](https://travis-ci.org/lampepfl/dotty.png?branch=master)](https://travis-ci.org/lampepfl/dotty)
[![Join the chat at https://gitter.im/lampepfl/dotty](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/lampepfl/dotty?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Dotty is a platform to try out new language concepts and compiler technologies for Scala. The focus is mainly on simplification. We remove extraneous syntax (e.g. no XML literals), and try to boil down Scala's types into a smaller set of more fundamental constructors. The theory behind these constructors is researched in [DOT](http://www.cs.uwm.edu/~boyland/fool2012/papers/fool2012_submission_3.pdf), a calculus for dependent object types.
Dotty is a platform to try out new language concepts and compiler
technologies for Scala. The focus is mainly on simplification. We
remove extraneous syntax (e.g. no XML literals), and try to boil down
Scala's types into a smaller set of more fundamental constructors. The
theory behind these constructors is researched in
[DOT](http://www.cs.uwm.edu/~boyland/fool2012/papers/fool2012_submission_3.pdf),
a calculus for dependent object types.

The dotty compiler is largely a new design. It takes a more functional approach than current scalac, paired with aggressive caching to achieve good performance. At present, only the frontend (parser and type-checker) exists; the transformation and code generation phases remain to be written. Some parts, in particular those that have to do with configuration and input/output are derived from the Scala compiler.
####Current status:
_Technology preview_: currently unsupported, may be functionally incomplete or unsuitable for production use.

We expect that, over time, some of the new technologies explored in this project will find their way into future versions of Scala. At present it is too early to say which ones and when.
####Is it going to be the future Scala?
Yes, eventually.

If you want to try it out, to get started have a look at https://github.com/lampepfl/dotty/wiki/Getting-Started.
####Who's working on it?
See [github contributors page](https://github.com/lampepfl/dotty/graphs/contributors).

####What are the features that could make me consider trying it?
| Feature | Status |
|---------------------------------------------------------------------------------------------------------|---------------------|
| Union, Intersection and [Literal singleton types](http://docs.scala-lang.org/sips/pending/42.type.html) | Implemented |
| Fast compilation(phase fusion) | Implemented |
| [Trait parameters](http://docs.scala-lang.org/sips/pending/trait-parameters.html) | Implemented |
| [@Static methods and fields](https://github.com/scala/scala.github.com/pull/491) | Implemented |
| Colored Repl | Implemented |
| Sbt incremental build | Implemented |
| Non-blocking lazy vals | Implemented |
| Option-less pattern matching(based on [name-based patmat](https://github.com/scala/scala/pull/2848)) | Implemented |
| Function arity adaptation | Implemented |
| | |
| Non-boxed arrays of value classes | In progress |
| Working contravariant implicits | In progress |
| [Auto-Specialization](https://github.com/dotty-linker/dotty) | In progress |
| [Whole program optimizer](https://github.com/dotty-linker/dotty) | In progress |
| [Library defined optimizations](https://github.com/dotty-linker/dotty) | In progress |
| | |
| HList & HMaps\Record types | Under consideration |
| Implicit functions | Under consideration |
| Effects | Under consideration |
| Auto-completion in repl | Under consideration |
| Spec Option-less pattern matching | Under consideration |
| Multiverse equality | Under consideration |
| Exhaustivity checks in pattern matching | Under consideration |
There are also plethora of small details such as [per-callsite @tailrec annotations](https://github.com/lampepfl/dotty/issues/1221)

Developers mailing list is https://groups.google.com/forum/#!forum/dotty-internals.
####What are the complications that I can have If I start using Dotty?
Dotty can use libraries compiled by scalac 2.11, but Scala scalac can't use libraries compiled by Dotty.<br>
No existential types.<br>
No macro support yet. We have big plans here.<br>
No early initializers. No scala.DelayedInit. Use trait parameters instead.<br>
Whole program optimizer will only work if all dependencies are compiled by Dotty.<br>


####Can I write my code in a way that is going to be compatible with Scalac & Dotty?
Yes, Dotty itself is a project that can be compiled by both Dotty and Scalac.<br>
It's not very hard, and the biggest thing that you will likely miss is using macros.

####How can I try it out?
https://github.com/lampepfl/dotty/wiki/Getting-Started.
Here’s an example sbt project and instructions on how to set it up: https://github.com/smarter/dotty-example-project/ <br>
We have colored REPL :-). You can invoke it by running `dotc -repl`.

&nbsp;
####We also have:
Basic support for Scala.js,<br>
[Prototype](https://github.com/scala-native/scala-native/tree/topic/dotty-support) of compilation to x86 native code(Shabalin)<br>

&nbsp;
####What about scalac:
Scalac is the basis for stability in scala. We expect scalac & dotty to coexist for long time.

####Contributions are welcome!
We invite you to help us build the future of Scala.<br>
This is the best moment to participate, as everyone can make an impact.<br>

![YourKit](https://www.yourkit.com/images/yklogo.png) supports open source projects with its full-featured Java Profiler.
####SI-2712?
If scalac will put it into 2.12, we’ll mimic their behaviour. But we have bigger plans for
HK-types.

YourKit, LLC is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/index.jsp).


Developers mailing list is https://groups.google.com/forum/#!forum/dotty-internals.
65 changes: 57 additions & 8 deletions bench/src/test/scala/TestsAsBenchmarks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,54 @@ import java.lang.reflect.Method

import org.junit.runner.Request
import org.junit.runner.notification.RunNotifier
import org.scalameter.Key.reports._
import org.scalameter.PerformanceTest.OnlineRegressionReport
import org.scalameter.api._
import org.scalameter.{Context, History, persistence, currentContext}
import org.scalameter.reporting.RegressionReporter.Tester

import scala.collection.mutable.ListBuffer

// decorator of persitor to expose info for debugging
class DecoratorPersistor(p: Persistor) extends SerializationPersistor {

override def load(context: Context): History = {
val resultdir = currentContext(resultDir)
val scope = context.scope
val curve = context.curve
val fileName = s"$resultdir$sep$scope.$curve.dat"

println(s"load file $fileName")

p.load(context)
}

override def save(context: Context, h: History) = {
val resultdir = currentContext(resultDir)
val scope = context.scope
val curve = context.curve
val fileName = s"$resultdir$sep$scope.$curve.dat"

println(s"save file $fileName")

p.save(context, h)
}
}

abstract class TestsToBenchmarkConverter
(targetClass: Class[_],
filterAnnot: Class[_ <: java.lang.annotation.Annotation] = classOf[org.junit.Test].asInstanceOf[Class[_ <: java.lang.annotation.Annotation]])
extends OnlineRegressionReport {

// NOTE: use `val persistor = ...` would cause persistor ignore command line options for `resultDir`
override def persistor = new DecoratorPersistor(super.persistor)

// accept all the results, do not fail
override def tester: Tester = new Tester.Accepter

// store all results
override def historian: RegressionReporter.Historian = RegressionReporter.Historian.Complete()

override def executor: Executor = LocalExecutor(warmer, aggregator, measurer)
val testNames = getMethodsAnnotatedWith(targetClass, filterAnnot).map(_.getName).sorted

Expand All @@ -29,15 +62,31 @@ abstract class TestsToBenchmarkConverter
(name, Gen.single("test")(name).map(Request.method(targetClass, _).getRunner))}.toMap
//Gen.enumeration("test")(testNames:_*)

performance of targetClass.getSimpleName config (Context(reports.resultDir -> "./tmp")) in {
for (test <- testNames)
measure.method(test) in {
using(tests(test)) curve test in {
r =>
val dummy = new RunNotifier()
r.run(dummy)
def setup =
performance of targetClass.getSimpleName in {
for (test <- testNames)
measure.method(test) in {
using(tests(test)) curve test in {
r =>
val dummy = new RunNotifier()
r.run(dummy)
}
}
}
}

/** workaround to fix problem in ScalaMeter
*
* NOTE: Otherwise, command line options would be ignored by HTMLReporter, as
* the HTMLReporter uses the context of tree node, which is created via
* ScalaMeter DSL before command line option `-CresultDir` takes effect
* in `PerformanceTest.main`.
*
* Following code ensures that the test tree is set up after the `-CresultDir`
* option takes effect.
**/
override def executeTests(): Boolean = {
setup
super.executeTests()
}

def getMethodsAnnotatedWith(clazz: Class[_], annotation: Class[_ <: java.lang.annotation.Annotation]): List[Method] = {
Expand Down
72 changes: 58 additions & 14 deletions bin/dotc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ SCALA_COMPILER_VERSION=$(getLastStringOnLineWith "scala-compiler")
DOTTY_VERSION=$(getLastStringOnLineWith "version in")
JLINE_VERSION=$(getLastStringOnLineWith "jline")
bootcp=true
bootstrapped=false
default_java_opts="-Xmx768m -Xms768m"
programName=$(basename "$0")
# uncomment next line to enable debug output
Expand All @@ -36,19 +37,23 @@ unset verbose quiet cygwin toolcp colors saved_stty CDPATH


CompilerMain=dotty.tools.dotc.Main
ReplMain=test.DottyRepl
FromTasty=dotty.tools.dotc.FromTasty
ReplMain=dotty.tools.dotc.repl.Main



# autodetecting the compiler jar. this is location where sbt 'packages' it
# autodetecting the compiler jars. this is the location where sbt 'packages' them
INTERFACES_JAR=$DOTTY_ROOT/interfaces/target/dotty-interfaces-$DOTTY_VERSION.jar
MAIN_JAR=$DOTTY_ROOT/target/scala-$SCALA_BINARY_VERSION/dotty_$SCALA_BINARY_VERSION-$DOTTY_VERSION.jar
TEST_JAR=$DOTTY_ROOT/target/scala-$SCALA_BINARY_VERSION/dotty_$SCALA_BINARY_VERSION-$DOTTY_VERSION-tests.jar
DOTTY_JAR=$DOTTY_ROOT/dotty.jar

function checkjar {
if [ ! -f "$1" ]
then
echo "The script is going to build the required jar file $1 by running \"sbt $2\""
cd $DOTTY_ROOT
sbt $2
sbt "$2"
cd -
if [ ! -f "$1" ]
then
Expand All @@ -57,11 +62,22 @@ function checkjar {
else
echo "The required jar file was built successfully."
fi
else
NEW_FILES="$(find "$DOTTY_ROOT/$3" \( -iname "*.scala" -o -iname "*.java" \) -newer "$1")"
if [ ! -z "$NEW_FILES" ];
then
echo "new files detected. rebuilding"
cd $DOTTY_ROOT
sbt "$2"
touch "$1"
cd -
fi
fi
}

checkjar $MAIN_JAR package
checkjar $TEST_JAR test:package
checkjar $INTERFACES_JAR dotty-interfaces/package interfaces
checkjar $MAIN_JAR package src
checkjar $TEST_JAR test:package test

# Autodetecting the scala-library location, in case it wasn't provided by an environment variable
if [ "$SCALA_LIBRARY_JAR" == "" ]
Expand All @@ -81,7 +97,7 @@ fi

if [ "$JLINE_JAR" == "" ]
then
JLINE_JAR=$HOME/.ivy2//cache/jline/jline/jars/jline-$JLINE_VERSION.jar
JLINE_JAR=$HOME/.ivy2/cache/jline/jline/jars/jline-$JLINE_VERSION.jar
fi

if [ ! -f "$SCALA_LIBRARY_JAR" -o ! -f "$SCALA_REFLECT_JAR" -o ! -f "$SCALA_COMPILER_JAR" -o ! -f "$JLINE_JAR" ]
Expand Down Expand Up @@ -137,7 +153,7 @@ onExit () {

# Get debug set early
for arg in "$@"; do
[[ $arg == "-d" ]] && debug=true
[[ $arg == "-debug" ]] && debug=true
done

# to reenable echo if we are interrupted before completing.
Expand Down Expand Up @@ -178,11 +194,38 @@ trap onExit INT
# If using the boot classpath, also pass an empty classpath
# to java to suppress "." from materializing.
classpathArgs () {
if [[ -n $bootcp ]]; then
echo "-Xbootclasspath/a:$SCALA_LIBRARY_JAR:$SCALA_REFLECT_JAR:$SCALA_COMPILER_JAR:$JLINE_JAR:$MAIN_JAR -classpath $MAIN_JAR:$TEST_JAR"
if [[ "true" == $bootstrapped ]]; then
checkjar $DOTTY_JAR "test:runMain dotc.build" src
toolchain="$DOTTY_JAR:$SCALA_LIBRARY_JAR:$SCALA_REFLECT_JAR:$SCALA_COMPILER_JAR:$JLINE_JAR"
else
echo "-classpath $SCALA_LIBRARY_JAR:$SCALA_REFLECT_JAR:$SCALA_COMPILER_JAR:$JLINE_JAR:$MAIN_JAR:$TEST_JAR"
toolchain="$SCALA_LIBRARY_JAR:$SCALA_REFLECT_JAR:$SCALA_COMPILER_JAR:$JLINE_JAR"
fi
bcpJars="$INTERFACES_JAR:$MAIN_JAR"
cpJars="$INTERFACES_JAR:$MAIN_JAR:$TEST_JAR"

if [[ -n "$cygwin" ]]; then
if [[ "$OS" = "Windows_NT" ]] && cygpath -m .>/dev/null 2>/dev/null ; then
format=mixed
else
format=windows
fi

if [[ -n $bootcp ]]; then
boot_classpath="$(cygpath --path --$format "$toolchain:$bcpJars")"
classpath="$(cygpath --path --$format "$cpJars")"
cpArgs="-Xbootclasspath/a:$boot_classpath -classpath $classpath"
else
classpath="$(cygpath --path --$format "$toolchain:$cpJars")"
cpArgs="-classpath $classpath"
fi
else
if [[ -n $bootcp ]]; then
cpArgs="-Xbootclasspath/a:$toolchain:$bcpJars -classpath $cpJars"
else
cpArgs="-classpath $toolchain:$cpJars"
fi
fi
echo ${cpArgs}
}

# e.g. path -java-home /path/to/java_home
Expand All @@ -202,20 +245,21 @@ main_class=$CompilerMain
while [[ $# -gt 0 ]]; do
case "$1" in
--) shift; for arg; do addResidual "$arg"; done; set -- ;;
-h|-help) usage; exit 1 ;;
-h|-help) help=true && shift ;;
-bootstrapped) bootstrapped=true && shift ;;
-v|-verbose) verbose=true && shift ;;
-d|-debug) debug=true && shift ;;
-debug) debug=true && shift ;;
-q|-quiet) quiet=true && shift ;;

# Optimize for short-running applications, see https://github.com/lampepfl/dotty/issues/222
-Oshort) addJava "-XX:+TieredCompilation -XX:TieredStopAtLevel=1" && shift ;;

-repl) main_class=$ReplMain && shift ;;
-tasty) main_class=$FromTasty && shift ;;
-compile) main_class=$CompilerMain && shift ;;
-run) main_class=$ReplMain && shift ;;
-fsc) main_class=$FscMain && shift ;;
-bootcp) bootcp=true && shift ;;
-no-bootcp) unset bootcp && shift ;;
-nobootcp) unset bootcp && shift ;;
-colors) colors=true && shift ;;
-no-colors) unset colors && shift ;;
-jrebel) jrebel=true && shift ;;
Expand Down
Loading