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

fix(storage): do not inhibit the dead code elimination. #8543

Merged
merged 2 commits into from
Nov 14, 2023
Merged

fix(storage): do not inhibit the dead code elimination. #8543

merged 2 commits into from
Nov 14, 2023

Commits on Oct 31, 2023

  1. fix(storage): do not inhibit the dead code elimination.

    When the go compiler encounters a call to MethodByName(), it
    assumes that every method of every reachable type can be accessed,
    and nothing may be eliminated.
    
    Go 1.22 has gained support for calls like MethodByName("Foobar").
    If the argument to MethodByName() is a compile-time constant, then
    the compiler no longer disables the DCE, and only keeps methods
    named Foobar.
    
    Rewrite setConditionField() so that MethodByName() is only called with
    compile-time constants. This way importing cloud.google.com/go/storage
    will not inhibit the DCE.
    dominiquelefevre committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    4020cc8 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2023

  1. Configuration menu
    Copy the full SHA
    ae357ab View commit details
    Browse the repository at this point in the history