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

Implement SIP-61 @unroll annotation #21693

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Commits on Oct 7, 2024

  1. SIP 61 - copy phase and annotation from com-lihaoyi/unroll

    Co-authored-by: Jamie Thompson <[email protected]>
    Co-authored-by: Li Haoyi <[email protected]>
    bishabosha and lihaoyi committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    ee7e6e4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6614c0f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ec580f7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    34c593d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d44a0f3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    97d3c13 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fac4855 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ece5b71 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    07e998e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d300aa7 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    561967b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c0a74d2 View commit details
    Browse the repository at this point in the history
  13. delete debug line

    bishabosha committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    382560c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    0f32b8b View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b903893 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    2560134 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    c1b9123 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    850b256 View commit details
    Browse the repository at this point in the history
  19. error when unrolling trait constructors

    Traits are forbidden in source code from having secondary constructors,
    which is what the current transform would generate.
    
    Trait parameters are encoded in concrete implementing classes as getter methods,
    perhaps unroll could provide default implementations, but this is unexplored.
    bishabosha committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    b71f9b9 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    f297b94 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    f0b2d7d View commit details
    Browse the repository at this point in the history
  22. SIP 61 - remove tasty hack by not "telescoping" forwarders

    Now, all forwarders directly call the unrolled method.
    This means that there is no need to resolve an invisible method,
    so the "hack" using TERMREFdirect is no longer needed.
    
    This increases bytecode size but reduces stack depth.
    
    Also removed scala.annotation.internal.UnrolledForwarder,
    as it is only needed for the TASTy hack.
    bishabosha committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    1722b69 View commit details
    Browse the repository at this point in the history
  23. SIP 61 - add errors when unrolling apply, copy and fromProduct

    Also standardise error messages as Declaration Errors
    bishabosha committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    4fe49cc View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    ae4ceba View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    b7dee01 View commit details
    Browse the repository at this point in the history
  26. fix whitespace

    bishabosha committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    4006af0 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2024

  1. add failing test: demo transparent inline can not see forwarders at t…

    …yper
    
    At typer, when transparent inline methods are expanded, unroll forwarders
    are not yet generated.
    
    So if we define forwarders for the first time, in the same compilation
    unit that inlines a call to the forwarder, then it will fail.
    
    Perhaps we can detect this and suspend the unit, otherwise it would seem
    unreasonable complexity to generate forwarders in typer.
    bishabosha committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    8a1887c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    020617f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    932d797 View commit details
    Browse the repository at this point in the history