Skip to content
Snippets Groups Projects

Improve Aggregation

Merged Pierre-Emmanuel Wulfman requested to merge clean_up_morphs into dev

type:none

This MR improves a few this in the Aggregation pass :

  • Use of add_prefix and internal_get_name_and_counter which should be avoided.
  • Scope data are stored in a map for faster lock up
  • Deduplication of all binder inside a module is changed by the deduplication of module binder before aggregating
  • The current pass works in two step: Ast_typed -> list of locally defined decl -> Ast_aggregated. The new pass work in one step : Ast_typed to Ast_aggregated (and a preprocessing before). Therefore all functions are direct mappers.
  • Expose function that doesn't take the local module as parameters.
  • Separate the deduplication in an independent self-pass for redability.
  • Homogenisation with the other pass

Side-effect : this change triggered a bug in the monomorphisation self-pass that is solved in the MR.

Edited by Pierre-Emmanuel Wulfman

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • I can really explain why, but I got the impression that the current aggregation pass is too complex.

    Possibly, but I will believe it when I see it.. Right now all the matchings tests (where a lot of shadowing is happening) are breaking. Hint:

    • All the generated variable here should be fresh, but when I make them fresh everything breaks big time
    • I feel the module/record accesses case is the source of this

    Also, it removes module aliases, which i don't think the pass should do.

    I believe you meant that aggregation was not replacing module aliases by a let aliase ? if yes, we can agree on that. But then I will argue against the remove_alias self pass?

    However, the monomorphisation pass doesn't work when there is too much indirection between the variable and the definition of the polymorphic function (or maybe I just don't propagate the types correctly)

    That sounds extremely fishy. Whatever a pass does, it should preserve the soundness of the program it runs on. Your aggregation pass introduce type inconsistency that you are then partially " "fixing" " in remove_alias

  • added 1744 commits

    Compare with previous version

  • added 98 commits

    Compare with previous version

  • added 277 commits

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 109 commits

    Compare with previous version

  • added 1 commit

    • db2b7e1b - fix bug due to incorrect library

    Compare with previous version

  • added 1 commit

    • 3c4fd3c8 - fix bug due to incorrect library

    Compare with previous version

  • Pierre-Emmanuel Wulfman changed the description

    changed the description

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 120 commits

    Compare with previous version

  • added 69 commits

    Compare with previous version

  • added 1 commit

    • d04adfd2 - solve several bug. Still curious bug

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading