Adrian Prantl
e4dd71bd87
[IRGenDebugInfo] Cache DIFile pointers instead of file names (NFC)
...
This is an NFC refactoring that is slightly more efficient and needed for
subsequent commits.
2023-11-29 12:37:06 -08:00
Arnold Schwaighofer
d8fc85511e
Merge pull request #70067 from aschwaighofer/fix_zero_sized_typed_error
...
IRGen: Allocate an address for the result of zero sized typed error results
2023-11-29 09:44:42 -08:00
Pavel Yaskevich
229e580174
[SIL] Add a way to retrieve key path type from KeyPathInst
...
Since the type of the instruction could be existential it's
better to keep retrival logic in one place.
2023-11-28 13:02:17 -08:00
Arnold Schwaighofer
e3a27a13d9
IRGen: Allocate an address for the result of zero sized typed error results
...
rdar://118657904
2023-11-28 11:37:09 -08:00
Kuba Mracek
5e4ae5e0ec
[embedded] Avoid compiler crash when using an opaque result type
2023-11-27 22:00:18 -08:00
Richard Wei
51acf75cb5
Fix compiler crash when emitting objc header with C++ interop enabled
...
This was because `LoweredFunctionSignature::visitParameterList` has a special case for parameters with an empty LLVM representation (e.g. an empty struct) but forgot to increment the counter, which then tripped the assertion.
Resolves #70016 .
2023-11-24 02:25:08 -08:00
Augusto Noronha
1296aeeb65
Merge pull request #69789 from augusto2112/gen-enum-debug
...
Generate full debug info for enums
2023-11-16 11:09:56 -08:00
nate-chandler
b944ab877a
Merge pull request #69857 from nate-chandler/nfc/20231114/1/delete-dead-lowered-value-kind
...
[IRGen] NFC: Deleted dead LoweredValue kind.
2023-11-15 07:38:26 -08:00
Hamish Knight
6298d24781
Merge pull request #69782 from hamishknight/hash-it-out
2023-11-15 11:08:19 +00:00
Cyndy Ishida
831b098fcc
Merge pull request #69779 from cyndyishida/Swift-tbdv5
...
[TBDGen] Capture segment symbols are defined in & emit tbd-v5 format
2023-11-14 15:36:38 -08:00
Hamish Knight
d31f76853a
[SIL] Introduce skipped coverage ranges
...
Introduce a skipped region kind, printed using
a `skipped` keyword.
2023-11-14 20:41:35 +00:00
Nate Chandler
e673344060
[IRGen] NFC: Deleted dead LoweredValue kind.
...
Follow-up to https://github.com/apple/swift/pull/10077 .
2023-11-14 10:49:02 -08:00
Kuba (Brecka) Mracek
7d7cf1f102
Merge pull request #69822 from kubamracek/embedded-fallback-to-c-calling-conv
...
[embedded] Avoid using swiftcc on targets that don't support it
2023-11-14 09:07:48 -08:00
Cyndy Ishida
f869bd7e8a
[TBDGen] Write tbd-v5 files by default
...
* Fixup tests to handle new json based output.
* Use llvm-nm & readtapi to verify tbd file outputs.
resolves: rdar://117604275
2023-11-14 08:06:24 -08:00
Augusto Noronha
594f51a13e
Generate full debug info for enums
...
Replace the generation of debug info for enums from DW_TAG_union_type
to either DW_TAG_enumeration_type or DW_TAG_variant_part, as these
representation match Swift enums more closely.
2023-11-13 14:31:29 -08:00
Kuba Mracek
df09cf16b1
[embedded] Avoid using swiftcc on targets that don't support it
2023-11-13 12:59:41 -08:00
Doug Gregor
d2e0582a92
Move workaround for swifterror miscompile earlier
...
Thank you, Arnold for noting this miscompile on x86!
2023-11-13 11:44:25 -08:00
Cyndy Ishida
331b11f39c
[TBDGen] Determine whether symbols belong in TEXT/DATA to record in tbd
...
files
2023-11-10 08:48:28 -08:00
Doug Gregor
446dfbff3e
Merge pull request #69741 from DougGregor/typed-throws-minor-fixes
...
Typed throws minor fixes
2023-11-09 10:17:58 -08:00
Doug Gregor
1a2f521aef
[Debug info] Make sure we establish a generic scope for the thrown error type
2023-11-08 14:36:50 -08:00
Michael Gottesman
48b4ca0b24
Merge pull request #69686 from gottesmm/rdar117880194
...
[region-isolation] When assigning RValues into memory, use tuple_addr_constructor instead of doing it in pieces.
2023-11-07 20:15:58 -08:00
Kavon Farvardin
ab6734aa04
Merge pull request #69590 from kavon/check-if-copyable-inferred
...
[NoncopyableGenerics] Synthesize conditional conformances
2023-11-07 18:19:23 -08:00
Kuba (Brecka) Mracek
add012cb44
Merge pull request #69682 from kubamracek/embedded-debuginfo-irgen
...
[embedded] Avoid materializing generic functions for debuginfo purposes in embedded Swift
2023-11-07 13:29:12 -08:00
Mishal Shah
74840cc60a
Revert "Add mandatory SIL pass implementing '@_alwaysEmitConformanceMetadata' protocol attribute"
2023-11-06 22:41:12 -08:00
Kuba (Brecka) Mracek
3b5cd06b0a
Merge pull request #69674 from eeckstein/fix-generic-embedded-classes
...
Fix specialization of generic classes in embedded swift
2023-11-06 17:04:29 -08:00
Kavon Farvardin
a9c64baaa3
[Sema] refactor TypeDecl::isNoncopyable
...
In preparation for reporting whether the inverse marking on a TypeDecl
was inferred instead of explicit.
2023-11-06 15:40:12 -08:00
Kuba Mracek
84561f9e69
[embedded] Avoid materializing generic functions for debuginfo purposes in embedded Swift
2023-11-06 15:37:57 -08:00
Michael Gottesman
6a65c7829e
[sil] Add tuple_addr_constructor an instruction that can be used to initial a tuple in memory from individual address and object components.
...
This commit just introduces the instruction. In a subsequent commit, I am going
to add support to SILGen to emit this. This ensures that when we assign into a
tuple var we initialize it with one instruction instead of doing it in pieces.
The problem with doing it in pieces is that when one is emitting diagnostics it
looks semantically like SILGen actually is emitting code for initializing in
pieces which could be an error.
2023-11-06 15:32:05 -08:00
Artem Chikin
031f1127f8
Merge pull request #69609 from artemcm/AlwaysEmitConformanceMetadataPreservation
...
Add mandatory SIL pass implementing '@_alwaysEmitConformanceMetadata' protocol attribute
2023-11-06 13:32:07 -08:00
Erik Eckstein
b33bb3828d
IRGen: fix the superclass pointer for generic classes in embedded swift
...
fixes in IRGen crash
2023-11-06 21:08:22 +01:00
swift-ci
6532b23b3e
Merge pull request #69591 from kavon/noncopyable-generics-pt3
...
[NoncopyableGenerics] Basic end-to-end testing (without stdlib).
2023-11-03 13:06:43 -07:00
Artem Chikin
feb5d457f6
Add mandatory SIL pass implementing '@_alwaysEmitConformanceMetadata' protocol attribute
...
Ensuring that conformances to such protocols must have their type metadata always emitted into the binary, regardless of wheter they are used or `public`.
2023-11-02 09:26:08 -07:00
swift-ci
43634590b1
Merge pull request #69568 from ktoso/wip-prepare-task-executor-protocol
...
Task Executors: Prepare for new TaskExecutor protocol
2023-11-02 01:50:51 -07:00
Konrad `ktoso` Malawski
c29bffd2be
remove buildOrdinaryTaskExecutorRef until we need it
2023-11-02 15:50:43 +09:00
Kavon Farvardin
575f033fdd
[IRGen] update isNoncopyable query
...
resolves rdar://117594962
2023-11-01 16:49:35 -07:00
nate-chandler
789774b547
Merge pull request #69543 from nate-chandler/irgen/print-vwitness-names
...
[IRGen] NFC: Print value witness names in IR.
2023-11-01 07:20:17 -07:00
Konrad `ktoso` Malawski
5546f4da7b
Rename ExecutorRef to SerialExecutorRef
2023-11-01 18:39:44 +09:00
Konrad `ktoso` Malawski
9e75142911
Task Executors: Prepare for new TaskExecutor protocol & builtins
2023-11-01 16:02:39 +09:00
Nate Chandler
88579b233b
[IRGen] NFC: Print vwitness name in IR.
...
It eases reading the code. Updated a few tests that were overly strict
(requiring registers to be named with only numbers) to accept more
register names.
2023-10-31 15:21:00 -07:00
Slava Pestov
05ccd9734c
SIL: Introduce ThrowAddrInst
2023-10-31 16:58:54 -04:00
Alex Lorenz
bd372c2d68
Merge pull request #69473 from hyp/eng/consuming-params
...
[interop][SwiftToCxx] consuming parameters should be passed using an …
2023-10-30 15:19:28 -07:00
Nuri Amari
5b2e534e56
Merge pull request #69407 from apple/vfe-function-merger-fixes
...
[swift-vfe][swift-wme] Stop disabling function mergers for Swift VFE / WME
2023-10-30 10:14:31 -07:00
Nate Chandler
3de047479c
[Gardening] IRGen: Clarified comments.
2023-10-30 07:49:28 -07:00
Doug Gregor
40e07cf900
[Typed throws] IR generation and runtime support for function type metadata
...
Extend function type metadata with an entry for the thrown error type,
so that thrown error types are represented at runtime as well. Note
that this required the introduction of "extended" function type
flags into function type metadata, because we would have used the last
bit. Do so, and define one extended flag bit as representing typed
throws.
Add `swift_getExtendedFunctionTypeMetadata` to the runtime to build
function types that have the extended flags and a thrown error type.
Teach IR generation to call this function to form the metadata, when
appropriate.
Introduce all of the runtime mangling/demangling support needed for
thrown error types.
2023-10-29 09:12:32 -07:00
Kavon Farvardin
29acda5136
Merge pull request #69406 from kavon/noncopyable-generics-pt2
...
[NoncopyableGenerics] handle `~Copyable` in `where`, `some`, and compositions.
2023-10-28 22:36:22 -07:00
Slava Pestov
3b51407224
Merge pull request #69459 from slavapestov/fix-extended-existential-metadata-weak
...
IRGen: Weak-link references to swift_getExtendedExistentialTypeMetadata()
2023-10-28 11:55:32 -04:00
Alex Lorenz
4e519a8d8b
[interop][SwiftToCxx] consuming parameters should be passed using an additional copy
...
Fixes https://github.com/apple/swift/issues/69372
2023-10-27 17:29:52 -07:00
nate-chandler
137ba61db4
Merge pull request #69400 from nate-chandler/irgen/note-implicitly-completed-metadata
...
[IRGen] Propagate locally-cached metadata completion to transitive dependencies.
2023-10-27 17:13:25 -07:00
Slava Pestov
c9c0572be5
IRGen: Weak-link references to swift_getExtendedExistentialTypeMetadata()
...
Fixes rdar://117530421.
2023-10-27 17:36:28 -04:00
Meghana Gupta
3c244c30b0
Merge pull request #69436 from apple/revert-69416-revert-69254-dwarf-version
...
Revert "Revert "Make the DWARF version emitted by the Swift compiler configurable.""
2023-10-27 13:38:48 -07:00