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

Remove GCX_PTR. #74969

Merged
merged 2 commits into from
Aug 3, 2020
Merged

Remove GCX_PTR. #74969

merged 2 commits into from
Aug 3, 2020

Commits on Aug 2, 2020

  1. Remove GCX_PTR.

    We store an `ImplicitCtxt` pointer in a thread-local value (TLV). This allows
    implicit access to a `GlobalCtxt` and some other things.
    
    We also store a `GlobalCtxt` pointer in `GCX_PTR`. This is always the same
    `GlobalCtxt` as the one within the `ImplicitCtxt` pointer in TLV. `GCX_PTR`
    is only used in the parallel compiler's `handle_deadlock()` function.
    
    This commit does the following.
    - It removes `GCX_PTR`.
    - It also adds `ImplicitCtxt::new()`, which constructs an `ImplicitCtxt` from a
      `GlobalCtxt`. `ImplicitCtxt::new()` + `tls::enter_context()` is now
      equivalent to the old `tls::enter_global()`.
    - Makes `tls::get_tlv()` public for the parallel compiler, because it's
      now used in `handle_deadlock()`.
    nnethercote committed Aug 2, 2020
    Configuration menu
    Copy the full SHA
    d93277b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8c78fd2 View commit details
    Browse the repository at this point in the history