Skip to content

Using substitution maps for provenance tracking loses info #221

@frabert

Description

@frabert

Master branch uses a substitutions map in each pass to keep track of how AST nodes are substituted, but this not fine-grained enough.

As an example, let's say we have a pass which turns if(!cond) { a(); } else { b(); } into if(cond) { b(); } else { a(); }: by substituting the whole IfStmt without tracking the condition, we lose information about it. Adding substitution info about the condition is not always possible due to interaction between substituting a node and one of its children at the same time.

In the decomp-api branch this is addressed by making it so that each pass keeps track of provenance on its own, but it would be nice to find a way to make the substitution map work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions