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

First steps towards rewriting from Scala2 in dotty #1154

Merged
merged 25 commits into from
Mar 18, 2016

Commits on Mar 12, 2016

  1. Add patching functionality for migration

    Firs version of patching that can be invoked by dotty compiler
    itself.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    c43ae4a View commit details
    Browse the repository at this point in the history
  2. Avoid setupMethod in Driver

    Driver should not know that patch functionality exists. Instead, introduce settings
    that can introduce their own stateful values.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    c1e263b View commit details
    Browse the repository at this point in the history
  3. Better encapsulation

    No more leaking ofMove PatchedFiles in a settings option. Move all
    patch classes into a `Rewrites` object.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    12d8955 View commit details
    Browse the repository at this point in the history
  4. Add functionality to navigate ASTs

    Map typed to corresponding untyped trees.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    ad483d8 View commit details
    Browse the repository at this point in the history
  5. Test language features always in phase typer.

    Imports are missing afterwards.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    2ff667a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ec90a19 View commit details
    Browse the repository at this point in the history
  7. Fix desugaring of lazy patterns.

    Selectors should be defs, not lazy vals.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    54f6399 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    420878d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    294d21f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d822b1e View commit details
    Browse the repository at this point in the history
  11. Test case for scala#1149

    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    e61cd1b View commit details
    Browse the repository at this point in the history
  12. More neg tests

    Some random neg tests from previous experiments.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    8881a98 View commit details
    Browse the repository at this point in the history
  13. Remove println

    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    dbc06d9 View commit details
    Browse the repository at this point in the history
  14. Disable volatile interpretation of lazy vals under -language:Scala2

    Revert this commit once scala#1149 is fixed.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    a378a46 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c1814a0 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    4db804b View commit details
    Browse the repository at this point in the history
  17. Patch redundant `_' suffixes.

    Scala2 allows `x _` even if `x` is not a method.
    Dotty disallows them. The patch removes the ` _`
    in these cases.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    919f268 View commit details
    Browse the repository at this point in the history
  18. Rewrite test

    Test rewritings that were implemented so far.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    87b30c9 View commit details
    Browse the repository at this point in the history
  19. Polish rewrite test

    Remove println; add docs
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    d24e10c View commit details
    Browse the repository at this point in the history
  20. Fix setChildPositions

    Gave overlapping positions in the case of longer lists of children.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    c0927cf View commit details
    Browse the repository at this point in the history
  21. Fix assert in Rewrites

    `Iterator.sliding(2, 1)` returns a one-element result if the original iterator
    contains only one element, which makes it unpleasant to use for our task. Replaced
    by a fold.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    6ddc911 View commit details
    Browse the repository at this point in the history
  22. Add patch for variance errors

    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    bde5e4d View commit details
    Browse the repository at this point in the history
  23. Fix patch for constructors with procedure syntax

    A constructor
    
         def this() { ... }
    
    needs to be rewritten to
    
         def this() = { ... }
    
    not to
    
         def this(): Unit = { ... }
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    13a376c View commit details
    Browse the repository at this point in the history
  24. Fix two rewrite patches.

    1. trailing `_`:
    
        `x _` is rewritten to `(() => x)` not to `x`
    
    2. lazy vals:
    
    Rewrites are done in Typer, not LazyVals. Later on we are too much at risk to
    hit synthetically generated lazy vals.
    odersky committed Mar 12, 2016
    Configuration menu
    Copy the full SHA
    13e3d59 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2016

  1. Address reviewer comments.

    odersky committed Mar 14, 2016
    Configuration menu
    Copy the full SHA
    6c18e37 View commit details
    Browse the repository at this point in the history