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 several issues with CreateSpan support #65919

Merged
merged 3 commits into from
Dec 12, 2022

Commits on Dec 10, 2022

  1. Fix several issues with CreateSpan support

    1. It turns out we can't use the system types (short, int, long) for data fields when there's an alignment requirement, as those types have .pack 1 and thus a rewriter (e.g. illink) might not align fields using those types appropriately.
    
    2. We weren't incorporating the alignment into the name of the ExplicitSizeStruct created, so we could end up with two types both for the same size but for different alignments and with the same name.
    
    3. In looking at the code again, I realized we could simplify it so that EmitArrayBlockInitializer doesn't take an alignment at all, since for array purposes, we always want to use alignment 1.  Because it took an alignment, we were unnecessarily specifying one even for the no-CreateSpan fallback.  This was functionally correct but unnecessary and resulting in a bit more complicated IL, especially once (1) above was fixed.
    stephentoub committed Dec 10, 2022
    Configuration menu
    Copy the full SHA
    604bead View commit details
    Browse the repository at this point in the history
  2. Address PR feedback

    stephentoub committed Dec 10, 2022
    Configuration menu
    Copy the full SHA
    0804eab View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f90cce2 View commit details
    Browse the repository at this point in the history