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

internal: use custom rendering for --expandArc #813

Merged
merged 2 commits into from
Jul 26, 2023

Commits on Jul 25, 2023

  1. internal: use custom rendering for --expandArc

    Summary
    =======
    
    Report the output for `--expandArc` via manual `msgWrite` calls instead
    of using `localErport` and use custom render-to-text logic for the
    `PNode` tree. The rendering logic is kept simple, and while the
    output of `--expandArc` stays largely the same, it doesn't represent
    valid NimSkull code anymore.
    
    This is a preparation for the introduction of a code-generator IR, as
    with it, `astgen` is not going to output `PNode` AST anymore, meaning
    that `renderTree` cannot be used there.
    
    Details
    =======
    
    The `rsemExpandArc` report is removed and everything associated with it.
    While it could be kept, the general direction it to move aways from
    reports for compiler tracing, and so `msgWrite` is instead used. This
    also helps with getting around cyclic imports once the new IR is
    introduced.
    
    The rendering logic is a simplified version of `renderTree`, with
    more complex text-layouting and conditional logic removed. The supported
    AST shapes are similar to that of the planned initial version of the
    code-generator IR, and the routines are added to the new `cgirutils`
    module.
    
    In order for changes to the `expandArc`-using tests to stay small, the
    rendered output is kept compatible with that of
    `renderTree(n, {renderIr, renderNoComment})`, where reasonable.
    zerbina committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    bc4fdd3 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2023

  1. Configuration menu
    Copy the full SHA
    aeb4452 View commit details
    Browse the repository at this point in the history