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

[compiler-v2] Ast generator from stackless bytecode, Source Gen from Ast #14494

Merged
merged 3 commits into from
Oct 9, 2024

Commits on Oct 9, 2024

  1. [compiler-v2] Ast generator from stackless bytecode, Source gen from Ast

    Converter from stackless bytecode into Model AST ('astifier'). (We already have one from binary format to stackless.) Also adds a converter from AST to source ('sourcifier').
    
    This adds the major pieces for a working decompiler. However, the pieces are not fully connected to a tool yet, as more sidework needs to be done first. Specifically, this PR adds breaks/continues to labeled outer loops, which are not yet supported by the compiler.
    
    There are some tests in a new test crate `ast-generator-tests`. These call the v2 compiler to compile up to file format, then decompile from there into stackless bytecode, into AST, and via sourcifier back to source. However, desired execution roundtrip comparison tests can only be implemented once the full toolchain is ready.
    
    Another set of tests for the 'sourcifier' is via compiler-v2 baseline files. Where AST dump is requested in those tests, we dump now also the sourcified AST. This can live side-by-side for a while until we may decide to remove one of the outputs.
    wrwg committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    0aee7f9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7edbc85 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    11cc61f View commit details
    Browse the repository at this point in the history