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

cranelift: Remove next_fixed_nonallocatable and with_allocs methods #8566

Merged

Commits on May 7, 2024

  1. cranelift: Remove next_fixed_nonallocatable and with_allocs methods

    The `next_fixed_nonallocatable` method doesn't do anything any more and
    doesn't return anything so calls to it can just be deleted.
    
    The `with_allocs`, `allocate`, and `to_string_with_alloc` methods are
    all trivial at this point, so inline them. The bulk of this change was
    performed this way:
    
    git grep -lF '.with_allocs(' | xargs sed -i 's/\.with_allocs([^)]*)/.clone()/g'
    
    In a couple cases, this makes the `AllocationConsumer` unused at these
    methods' call sites. Rather than changing function signatures in this
    PR, just mark those arguments as deliberately unused.
    
    The number of structures being cloned here is unfortunate, and
    unnecessary now that we don't need to mutate any of them. But switching
    to borrowing them is a bigger change than I want to include here.
    jameysharp committed May 7, 2024
    Configuration menu
    Copy the full SHA
    51d7925 View commit details
    Browse the repository at this point in the history