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

Compute positions early #174

Open
aalexandrov opened this issue Mar 21, 2016 · 1 comment
Open

Compute positions early #174

aalexandrov opened this issue Mar 21, 2016 · 1 comment
Labels

Comments

@aalexandrov
Copy link
Contributor

At the moment, comprehended term positions are computed late in the compiler pipeline.
This causes erroneous rendering in the web GUI if the comprehended tree is the result of some logical transformation (e.g. fold-group fusion).

To alleviate this problem, I suggest to have a pre-pass on the tree that computes the positions for each comprehended term before any transformations take place.

To implement this feature, the following changes are required:

  1. Either in or after Step 1 of the createComprehensionView method, compute the rectangles
    associated with each subtree occurring under term in terms.
  2. Based on the inlining relation specified in inlineComprehensions, compute sets of
  3. Keep track of the original positions in the ExpressionRoot nodes.
  4. Amortize the result for subsequent calls of createComprehensionView.
  5. Use the positions set associated with the ExpressionRoot in the expandComprehension method.
@aalexandrov aalexandrov added this to the Apr 2016 milestone Mar 21, 2016
@aalexandrov aalexandrov modified the milestone: Apr 2016 Apr 5, 2016
@aalexandrov
Copy link
Contributor Author

This needs to be resolved in the new IR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants