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

The war of symbol and symbol (the PR dedicated to duplicate symbols breaking rustc in unexpected ways) #23011

Merged
merged 14 commits into from
Apr 12, 2015

Commits on Apr 3, 2015

  1. Fix a broken test

    It emits the same symbol – `transmute` – from the same crate twice.
    nagisa committed Apr 3, 2015
    Configuration menu
    Copy the full SHA
    b9a11f0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    723ca4b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2198969 View commit details
    Browse the repository at this point in the history
  4. Abort creating wrapper fn for multiple inner fns

    This discovers another class of mis-trans where we wrap multiple native functions into a single
    wrapper, which is wrong.
    nagisa committed Apr 3, 2015
    Configuration menu
    Copy the full SHA
    baa52ca View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d36c4db View commit details
    Browse the repository at this point in the history
  6. Extract attribute handling code into a module

    This commit causes no change in trans semantics, it just moves some functions around and
    deduplicates them.
    nagisa committed Apr 3, 2015
    Configuration menu
    Copy the full SHA
    c71970e View commit details
    Browse the repository at this point in the history
  7. Move get_extern_fn and get_res_dtor out of base

    These functions have only a single use and functionally belong to foreign and glue respectively
    anyway
    nagisa committed Apr 3, 2015
    Configuration menu
    Copy the full SHA
    cb45703 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    deb097a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    caea044 View commit details
    Browse the repository at this point in the history
  10. Introduce trans::declare

    We provide tools to tell what exact symbols to emit for any fn or static, but
    don’t quite check if that won’t cause any issues later on. Some of the issues
    include LLVM mangling our names again and our names pointing to wrong locations,
    us generating dumb foreign call wrappers, linker errors, extern functions
    resolving to different symbols altogether (extern {fn fail();} fail(); in some
    cases calling fail1()), etc.
    
    Before the commit we had a function called note_unique_llvm_symbol, so it is
    clear somebody was aware of the issue at some point, but the function was barely
    used, mostly in irrelevant locations.
    
    Along with working on it I took liberty to start refactoring trans/base into
    a few smaller modules. The refactoring is incomplete and I hope I will find some
    motivation to carry on with it.
    
    This is possibly a [breaking-change] because it makes dumbly written code
    properly invalid.
    nagisa committed Apr 3, 2015
    Configuration menu
    Copy the full SHA
    f1dabed View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8943709 View commit details
    Browse the repository at this point in the history
  12. Address Alex’s comments

    nagisa committed Apr 3, 2015
    Configuration menu
    Copy the full SHA
    d8d59a9 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    ea04cdf View commit details
    Browse the repository at this point in the history
  14. Rebase fallout

    nagisa committed Apr 3, 2015
    Configuration menu
    Copy the full SHA
    000db38 View commit details
    Browse the repository at this point in the history