| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2023-12-16 | Extract fn layout_of_struct | Jubilee Young | -102/+130 | |
| 2023-12-16 | Extract fn layout_of_enum | Jubilee Young | -476/+496 | |
| 2023-12-16 | Manually inline scalar_unit | Jubilee Young | -7/+3 | |
| 2023-12-16 | Hoist fn absent | Jubilee Young | -12/+18 | |
| 2023-12-15 | Annotate panic! reasons during enum layout | Jubilee Young | -6/+14 | |
| Add some reasons to the panics, and use more exhaustive matches. | ||||
| 2023-12-02 | Rename `LayoutCalculator::delay_bug` as `LayoutCalculator::delayed_bug`. | Nicholas Nethercote | -3/+3 | |
| To match with the previous commits. | ||||
| 2023-11-21 | Fix `clippy::needless_borrow` in the compiler | Nilstrieb | -3/+3 | |
| `x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now. | ||||
| 2023-11-05 | Make the randomize feature of rustc_abi additive | hkalbasi | -3/+2 | |
| 2023-10-27 | fix failure to detect a too-big-type after adding padding | Ralf Jung | -0/+5 | |
| 2023-10-04 | Remove unnecessary features from rustc_abi | Lukas Wirth | -0/+1 | |
| 2023-10-02 | Fix incorrect inlining of RangeInclusive::size_hint | Lukas Wirth | -1/+1 | |
| 2023-10-02 | Add VariantIdx back | Lukas Wirth | -27/+55 | |
| 2023-10-02 | Bring back generic FieldIdx | Lukas Wirth | -84/+89 | |
| 2023-10-02 | Unglob rustc_abi imports | Lukas Wirth | -8/+10 | |
| 2023-10-02 | Name some local variables more consistently. | Nicholas Nethercote | -6/+6 | |
| By making every `alt_foo` exactly match a `foo`. | ||||
| 2023-10-01 | Minor comment and whitespace tweaks. | Nicholas Nethercote | -32/+32 | |
| 2023-08-29 | there seems to be no reason to treat ZST specially in these cases | Ralf Jung | -12/+2 | |
| 2023-08-29 | rustc_abi: audit uses of is_zst; fix a case of giving an enum insufficient ↵ | Ralf Jung | -7/+18 | |
| alignment | ||||
| 2023-07-30 | inline format!() args up to and including rustc_middle | Matthias Krüger | -5/+3 | |
| 2023-07-25 | abi: unsized field in union - assert to delay bug | David Wood | -1/+3 | |
| Unions cannot have unsized fields, and as such, layout computation for unions asserts that each union field is sized (as this would normally have halted compilation earlier). However, if a generator ends up with an unsized local - a circumstance in which an error will always have been emitted earlier, for example, if attempting to dereference a `&str` - then the generator transform will produce a union with an unsized field. Since #110107, later passes will be run, such as constant propagation, and can attempt layout computation on the generator, which will result in layout computation of `str` in the context of it being a field of a union - and so the aforementioned assertion would cause an ICE. It didn't seem appropriate to try and detect this case in the MIR body and skip this specific pass; tainting the MIR body or delaying a bug from the generator transform (or elsewhere) wouldn't prevent this either (as neither would prevent the later pass from running); and tainting when the deref of `&str` is reported, if that's possible, would unnecessarily prevent potential other errors from being reported later in compilation, and is very tailored to this specific case of getting a unsized type in a generator. Given that this circumstance can only happen when an error should have already been reported, the correct fix appears to be just changing the assert to a delayed bug. This will still assert if there is some circumstance where this occurs and no error has been reported, but it won't crash the compiler in this instance. Signed-off-by: David Wood <david@davidtw.co> | ||||
| 2023-07-14 | i686-windows: make requested alignment > 4 special case apply transitively | Erik Desjardins | -22/+18 | |
| 2023-07-10 | aarch64-linux: properly handle 128bit aligned aggregates | Erik Desjardins | -7/+50 | |
| 2023-07-10 | repr(align) <= 4 should still be byval | Erik Desjardins | -9/+9 | |
| 2023-07-10 | move has_repr to layout, handle repr(transparent) properly | Erik Desjardins | -0/+14 | |
| 2023-07-06 | clean up struct layout code | Lukas Markeffsky | -4/+4 | |
| 2023-05-29 | disable some layout optimizations for unsizable structs | The 8472 | -42/+48 | |
| 2023-05-29 | Make struct layout not depend on unsizeable tail | Lukas Markeffsky | -2/+6 | |
| 2023-05-16 | Avoid `&format("...")` calls in error message code. | Nicholas Nethercote | -2/+2 | |
| Error message all end up passing into a function as an `impl Into<{D,Subd}iagnosticMessage>`. If an error message is creatd as `&format("...")` that means we allocate a string (in the `format!` call), then take a reference, and then clone (allocating again) the reference to produce the `{D,Subd}iagnosticMessage`, which is silly. This commit removes the leading `&` from a lot of these cases. This means the original `String` is moved into the `{D,Subd}iagnosticMessage`, avoiding the double allocations. This requires changing some function argument types from `&str` to `String` (when all arguments are `String`) or `impl Into<{D,Subd}iagnosticMessage>` (when some arguments are `String` and some are `&str`). | ||||
| 2023-05-05 | Reorder to keep duplicate checks in sync. | Luqman Aden | -7/+12 | |
| 2023-05-05 | Review feedback | Luqman Aden | -13/+22 | |
| 2023-05-05 | Incorporate review feedback from 103926. | Luqman Aden | -38/+33 | |
| 2023-05-05 | Do not use scalar layout if there are ZSTs with alignment > 1 | Oli Scherer | -20/+42 | |
| 2023-04-28 | layout-alignment-promotion logic should depend on the niche-bias | The 8472 | -7/+22 | |
| For start-biased layout we want to avoid overpromoting so that the niche doesn't get pushed back. For end-biased layout we want to avoid promoting fields that may contain one of the niches of interest. | ||||
| 2023-04-28 | [review] add comments, turn flag into enum | The 8472 | -23/+44 | |
| 2023-04-27 | add tracing for layout optimizations | The 8472 | -0/+44 | |
| 2023-04-27 | don't promote large fields to higher alignments if that would affect niche ↵ | The 8472 | -13/+24 | |
| placement | ||||
| 2023-04-27 | try two different niche-placement strategies when layouting univariant structs | The 8472 | -6/+70 | |
| 2023-04-27 | refactor: extract function | The 8472 | -214/+220 | |
| 2023-04-18 | Store hashes in special types so they aren't accidentally encoded as numbers | Ben Kimock | -1/+2 | |
| 2023-04-16 | Various minor Idx-related tweaks | Scott McMurray | -4/+3 | |
| Nothing particularly exciting here, but a couple of things I noticed as I was looking for more index conversions to simplify. | ||||
| 2023-04-04 | Use `FieldIdx` in `FieldsShape` | Scott McMurray | -40/+35 | |
| Finally got to the main motivating example from the MCP :) | ||||
| 2023-04-02 | Use `&IndexSlice` instead of `&IndexVec` where possible | Scott McMurray | -2/+2 | |
| All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*. | ||||
| 2023-03-25 | Refactor: `VariantIdx::from_u32(0)` -> `FIRST_VARIANT` | Scott McMurray | -9/+9 | |
| Since structs are always `VariantIdx(0)`, there's a bunch of files where the only reason they had `VariantIdx` or `vec::Idx` imported at all was to get the first variant. So this uses a constant for that, and adds some doc-comments to `VariantIdx` while I'm there, since it doesn't have any today. | ||||
| 2023-01-21 | Remove some superfluous type parameters from layout.rs. | Michael Benfield | -75/+71 | |
| Specifically remove V, which can always be VariantIdx, and F, which can always be Layout. | ||||
| 2022-12-01 | Remove useless borrows and derefs | Maybe Waffle | -5/+5 | |
| 2022-11-25 | Simplify and document range layout computation | Oli Scherer | -13/+11 | |
| 2022-11-24 | move things from rustc_target::abi to rustc_abi | hkalbasi | -0/+947 | |
