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

Refactor reflect package #2640

Merged
merged 2 commits into from Feb 17, 2023
Merged

Refactor reflect package #2640

merged 2 commits into from Feb 17, 2023

Commits on Feb 15, 2023

  1. Copy the full SHA
    d6c2e49 View commit details
    Browse the repository at this point in the history
  2. all: refactor reflect package

    This is a big commit that changes the way runtime type information is stored in
    the binary. Instead of compressing it and storing it in a number of sidetables,
    it is stored similar to how the Go compiler toolchain stores it (but still more
    compactly).
    
    This has a number of advantages:
    
      * It is much easier to add new features to reflect support. They can simply
        be added to these structs without requiring massive changes (especially in
        the reflect lowering pass).
      * It removes the reflect lowering pass, which was a large amount of hard to
        understand and debug code.
      * The reflect lowering pass also required merging all LLVM IR into one
        module, which is terrible for performance especially when compiling large
        amounts of code. See issue 2870 for details.
      * It is (probably!) easier to reason about for the compiler.
    
    The downside is that it increases code size a bit, especially when reflect is
    involved. I hope to fix some of that in later patches.
    aykevl committed Feb 15, 2023
    Copy the full SHA
    d145ef0 View commit details
    Browse the repository at this point in the history