Commit Graph

10 Commits

Author SHA1 Message Date
Andrew Trick
3bb3e4d077 [NFC] Add ApplySite.parameterDependence(target:source:) 2025-10-23 23:34:23 -07:00
Meghana Gupta
455990aa27 Bailout SwiftCompilerSource's function signature opts for functions with lifetime dependencies 2025-07-15 03:25:18 -07:00
Erik Eckstein
63cb683cb7 SIL: improve some Location APIs
* rename `var autoGenerated` -> `var asAutoGenerated`
* add `var asCleanup`
* add `func withScope`
2025-06-20 08:15:00 +02:00
Erik Eckstein
d52f7d1619 AST/SIL: Refactor and simplify AST.Type, AST.CanonicalType and SIL.Type
* let `SIL.Type` conform to `TypeProperties` to share the implementation of common type properties between the AST types and `SIL.Type`
* call references to an `AST.Type` `rawType` (instead of just `type`)
* remove unneeded stuff
* add comments
2025-03-14 09:40:22 +01:00
Erik Eckstein
810064b7dc Cleanup and additions to AST and SIL Type/CanonicalType
* factor out common methods of AST Type/CanonicalType into a `TypeProperties` protocol.
* add more APIs to AST Type/CanoncialType.
* move `MetatypeRepresentation` from SIL.Type to AST.Type and implement it with a swift enum.
* let `Builder.createMetatype` get a CanonicalType as instance type, because the instance type must not be a lowered type.
2025-03-07 15:59:33 +01:00
Andrew Trick
d065a3e576 Merge pull request #75562 from atrick/nfc-lifedep
[nfc] LifetimeDiagnostics cleanup
2024-07-30 09:03:24 -07:00
Andrew Trick
103c59b273 [SwiftCompilerSources] Add assert to Builder.init(after:)
This API is incorrect for terminators. Assert that it isn't used
incorrectly. Later, we should rename it.
2024-07-29 23:44:02 -07:00
Erik Eckstein
04e0907ab0 SIL: rename Type.instanceTypeOfMetatype -> Type.loweredInstanceTypeOfMetatype
The same for SILType

It needs to be made clear that this is not the "original", but the lowered SIL type.

NFC
2024-07-29 17:33:36 +02:00
Erik Eckstein
7fb4fc0f36 MandatoryPerformanceOptimizations: fix the linkage of function-signature-specialized functions
We need to keep the original linkage because it would be illegal to call a shared not-serialized function from a serialized function.

Also, rename the API to create the specialized function.
2024-02-02 07:27:38 +01:00
Erik Eckstein
bd7db677ed MandatoryPerformanceOptimizations: perform function signature optimization to remove metatype arguments
Generic specialization already takes care of removing metatype arguments of generic functions.
But sometimes non-generic functions have metatype arguments which must be removed.
We need handle this case with a function signature optimization.

This enables, for example, to use `OptionSet` in embedded swift.

rdar://121206953
2024-01-31 17:16:18 +01:00