Michael Gottesman
49eee05647
[region-isolation] Treat as Sendable values that are meant to be ignored since they are marked with preconcurrency
...
rdar://133531625
2024-08-24 13:14:39 -04:00
Slava Pestov
cf784f980e
AST: Remove SubstFlags::AllowLoweredTypes
2024-08-23 13:14:05 -04:00
Slava Pestov
da4d076f02
AST: Introduce SubstFlags::SubstitutePrimaryArchetypes
2024-08-22 18:41:14 -04:00
Slava Pestov
b4265020f6
SIL: Use MapLocalArchetypesOutOfContext directly from buildSILFunctionThunkType()
2024-08-21 14:23:38 -04:00
Slava Pestov
39b4bda1dc
AST: Introduce SubstFlags::SubstituteLocalArchetypes
2024-08-21 14:23:37 -04:00
Slava Pestov
5577f27661
AST: Opened existential environments store outer substitutions
2024-08-20 16:54:51 -04:00
Slava Pestov
66cd708a16
SIL: Compute canonical type earlier
2024-08-17 22:04:15 -04:00
Slava Pestov
0e853a358e
Merge pull request #75935 from slavapestov/remove-transform
...
AST: Replace remaining uses of Type::transform() with transformRec()
2024-08-17 09:11:52 -04:00
Mykola Pokhylets
50b1313175
Merge branch 'main' into mpokhylets/isolated-deinit
...
# Conflicts:
# lib/SILGen/SILGenDistributed.cpp
# lib/Sema/TypeCheckConcurrency.cpp
2024-08-15 16:58:43 +02:00
Augusto Noronha
ae98212c1a
Eagerly emit getters at Onone.
...
Force SILGen to also eagerly emit getters when compiling at Onone.
The reason for this is that getters (even not user-written ones,
generated by result builders) can, and are often called by users
debugging swift programs, and should be available for that reason.
rdar://133329303
2024-08-13 14:53:41 -07:00
Slava Pestov
b601c294ac
AST: Replace remaining uses of Type::transform() with transformRec()
2024-08-12 16:05:43 -04:00
Michael Gottesman
f275c27413
Merge pull request #75810 from gottesmm/pr-48fc81afd13a4e0fdcaaa5badf561845da837f6f
...
Clean up some NDEBUG code errors
2024-08-09 14:20:45 -07:00
Kavon Farvardin
9d69f2bceb
Merge pull request #75382 from kavon/static-branch-prediction
...
Throws Prediction + HotColdSplitting
2024-08-09 15:24:22 -04:00
Michael Gottesman
2e08d6110d
Fix SILBasicBlock::{dump,print}ID so that they are available in no-asserts but just print out NOASSERTS instead of a debug id.
2024-08-09 11:10:37 -07:00
Slava Pestov
375363a473
AST: Move global conformance lookup entry points to ConformanceLookup.h
2024-08-08 23:35:58 -04:00
Kavon Farvardin
0cce602bce
SIL: branch weights for try_apply's
2024-08-08 21:21:52 -04:00
Akira Hatanaka
e21c117831
[cxx-interop] Use unowned return convention for ObjC methods returning foreign reference types ( #75640 )
...
This fixes a runtime crash that occurs when a pointer to a foreign
reference type is passed to objc_retainAutoreleasedReturnValue.
This reverts 335cec0e8d .
rdar://117353222
2024-08-07 21:16:47 -07:00
Erik Eckstein
bf3b69bba8
SILBuilder: use the new ASSERT macro in the SILBuilder
...
It's important to catch assert failures in the SILBuilder also in a release build of the compiler
2024-07-31 15:31:03 +02:00
Erik Eckstein
031f23547a
SILType: remove the now obsolete aggregateContainsRecord function
2024-07-29 17:33:46 +02: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
Andrew Trick
3316a58ba7
Allow move_value of trivial values.
...
Required for SIL level local variable scopes.
2024-07-26 08:27:31 -07:00
Andrew Trick
075d3a42c1
Add SILValue::isFromVarDecl utility.
2024-07-26 08:27:31 -07:00
Konrad `ktoso` Malawski
eb675c222e
[Distributed] Correct tbd handling for distributed thunks ( #74935 )
2024-07-26 16:52:18 +09:00
Nate Chandler
cfdbd992cd
[Test] Underscored instruction_move_before.
...
Use underscores rather than hyphens so that text editors understand the
name as a single word.
2024-07-25 13:50:25 -07:00
Nate Chandler
47a874a322
[Test] Underscored is_lexical.
...
Use underscores rather than hyphens so that text editors understand the
name as a single word.
2024-07-25 13:50:25 -07:00
Nate Chandler
bf65f21cc8
[Test] Underscored is_sil_trivial.
...
Use underscores rather than hyphens so that text editors understand the
name as a single word.
2024-07-25 13:50:17 -07:00
Nate Chandler
d6071c636b
[Test] Underscored get_ownership_kind.
...
Use underscores rather than hyphens so that text editors understand the
name as a single word.
2024-07-25 13:50:17 -07:00
Becca Royal-Gordon
7dd8914d88
Merge pull request #75431 from beccadax/objcimpl-private-property
2024-07-24 10:46:26 -07:00
Allan Shortlidge
e4331af916
IRGen: Introduce macCatalyst target variant version check builtins.
2024-07-23 17:00:10 -07:00
Becca Royal-Gordon
9cffd4528d
Fix objcImpl SILGen crash with initial value
...
The initial value expressions of stored properties in objcImpl classes were being incorrectly marked as serializable. As a result, the compiler would crash with a SIL verification failure if one of them called a non-public function or initializer.
Fix this problem by not marking these initial value expression functions as serializable. Code in other modules should not call them anyway, since they think of the class as a pure ObjC class.
Fixes rdar://114874429.
2024-07-23 16:17:30 -07:00
Mykola Pokhylets
816d62c972
Merge remote-tracking branch 'upstream/main' into mpokhylets/isolated-deinit
...
# Conflicts:
# include/swift/Basic/Features.def
# lib/SILGen/SILGenDestructor.cpp
# test/Concurrency/flow_isolation.swift
# test/abi/macOS/arm64/concurrency.swift
# test/abi/macOS/x86_64/concurrency.swift
2024-07-11 13:11:59 +02:00
Mykola Pokhylets
485965a759
Reviewed code comments. Fixed typos and addressed some TODOs
2024-07-11 13:09:06 +02:00
Mykola Pokhylets
28a06feaad
Added isolated deallocator to TBDGen
2024-07-11 13:09:06 +02:00
Mykola Pokhylets
d7248e3acf
Fixed linkage logic for isolated deallocating deinit
2024-07-11 13:09:06 +02:00
Mykola Pokhylets
d4e449b62d
SILGen for isolated deinit
2024-07-11 13:09:05 +02:00
Mykola Pokhylets
b189495518
Introduced isolated deinit as a SIL entity
2024-07-11 13:09:05 +02:00
Andrew Trick
12acde2215
Merge pull request #75096 from meg-gupta/lifetimedeparg
...
Add support for lifetime dependence in parameter position
2024-07-10 22:56:23 -07:00
Meghana Gupta
154989463b
Add support for lifetime dependence in parameter position
2024-07-10 14:20:03 -07:00
Slava Pestov
977b444eb3
AST: Add a new overload of getContextSubstitutionMap()
2024-07-10 13:28:26 -04:00
Slava Pestov
3fcda140bb
AST: ModuleDecl::checkConformance() is a static method
2024-07-06 12:05:46 -04:00
Slava Pestov
fae01d9776
AST: Remove ModuleDecl parameter from more places
2024-07-06 12:05:46 -04:00
nate-chandler
04debd3536
Merge pull request #74922 from nate-chandler/lifetime-completion/20240701/1
...
[LifetimeCompletion] Flag ends synthesized in dead-ends.
2024-07-04 00:23:57 -07:00
Nate Chandler
b150a484f2
[SIL] Add dead_end flag to dealloc_box.
2024-07-03 15:26:59 -07:00
Nate Chandler
a8cc3bfdda
[SIL] Add dead_end flag to destroy_value.
2024-07-03 15:26:59 -07:00
Nate Chandler
91fe12aab4
[NFC] SIL: Typed debug_value.poisonRefs.
2024-07-03 14:53:30 -07:00
Meghana Gupta
12484ff919
Merge pull request #74842 from meg-gupta/addopenpackedgecase
...
Fix isTriviallyDuplicatable to handle open_pack_element
2024-07-01 10:53:53 -07:00
Meghana Gupta
5282194682
Fix isTriviallyDuplicatable to handle open_pack_element
...
SILInstruction::clone doesn't know how to clone instructions that produce
the archetype uuid. SILCloner is equipped to handle such instructions.
Optimizations like LoopRotate use SILInstruction::clone and will be
incorrect for such instructions.
rdar://130047619
2024-06-29 13:42:05 -07:00
Ben Barham
d8f381e660
Merge pull request #74804 from bnbarham/rename-equals
...
Update `StringRef::equals` references to `operator==`
2024-06-28 11:22:20 -07:00
Ben Barham
d72f5b12c4
Update StringRef::equals references to operator==
...
`equals` has been deprecated upstream, use `operator==` instead.
2024-06-27 19:14:06 -07:00
Akira Hatanaka
42bc49d3fe
Add a new parameter convention @in_cxx for non-trivial C++ classes that are passed indirectly and destructed by the caller ( #73019 )
...
This corresponds to the parameter-passing convention of the Itanium C++
ABI, in which the argument is passed indirectly and possibly modified,
but not destroyed, by the callee.
@in_cxx is handled the same way as @in in callers and @in_guaranteed in
callees. OwnershipModelEliminator emits the call to destroy_addr that is
needed to destroy the argument in the caller.
rdar://122707697
2024-06-27 09:44:04 -07:00