Commit Graph

8 Commits

Author SHA1 Message Date
Erik Eckstein
7cceaff5f3 SIL: don't print operand types in textual SIL
Type annotations for instruction operands are omitted, e.g.

```
  %3 = struct $S(%1, %2)
```

Operand types are redundant anyway and were only used for sanity checking in the SIL parser.

But: operand types _are_ printed if the definition of the operand value was not printed yet.
This happens:

* if the block with the definition appears after the block where the operand's instruction is located

* if a block or instruction is printed in isolation, e.g. in a debugger

The old behavior can be restored with `-Xllvm -sil-print-types`.
This option is added to many existing test files which check for operand types in their check-lines.
2024-11-21 18:49:52 +01:00
Holly Borla
8713d78704 [PrintOptions] Print explicit 'any' in SIL. 2022-08-18 01:15:12 -04:00
Robert Widmann
dde0d8f609 Generalize the Mangling of Constrained Existential Types
Upgrade the old mangling from a list of argument types to a
list of requiremnets. For now, only same-type requirements
may actually be mangled since those are all that are available
to the surface language.

Reconstruction of existential types now consists of demangling (a list of)
base protocol(s), decoding the constraints, and converting the same-type
constraints back into a list of arguments.

rdar://96088707
2022-06-30 15:32:37 -07:00
Robert Widmann
663722d892 Parameterized Existential Types Are Enabled By Default
See https://forums.swift.org/t/accepted-se-0353-constrained-existential-types/57560
2022-05-25 09:50:36 -07:00
Robert Widmann
5bcea4146a Disable Availability Checking in Tests That Use Parameterized Existentials 2022-05-03 23:36:13 -07:00
Slava Pestov
1bf248e374 Enable parameterized protocols by default, and add new staging flag for parameterized existentials 2022-04-06 17:30:10 -04:00
Slava Pestov
8c47cd75fd Sema: The primary associated type list references existing associated types instead of declaring new ones 2022-04-03 22:03:49 -04:00
Robert Widmann
6438c7e931 Conservative Dynamic Casts to/from Parameterized Protocols
Update cast feasibility analysis to take parameterized protocols into account. The cast classifier was used to being able to essentially just run `conformsToProtocol` on the existential type, but for parameterized protocol types this will ignore the extra requirements imposed by the argument clause. For now, route everything through the runtime.
2022-03-21 10:53:59 -07:00