Skip to content

Conversation

@eeckstein
Copy link
Contributor

No description provided.

mhjacobson and others added 30 commits November 8, 2022 03:15
Remove identical logic for OpenBSD, which doesn't include suffixes in
`$CMAKE_SYSTEM_VERSION`.
Trying to run `update-checkout` with Git 1.8.3.1 fails during rebasing.
Previously, logging of the actually problematic instruction was guarded
by LLVM_DEBUG.  Meanwhile the verifier's require method prints an
instruction (usually one different from that at which the non-contiguous
scope was encountered).

Here, instead, the problematic instruction and the instruction which
defined the previous scope are printed to llvm::errs always (i.e.
whenever verification is actually run).

Additionally, debug-info logging is forcibly set on upon failure so that
the logs clearly show both what the previous scope was, what the current
scope is, and what instructions defined them.
Clarified preconditions, removed spurious explicit typing, and suprious
control flow.
…dging invocation

This fixes some CI failures
…ked more than once.

We cannot filter all libraries because duplicate -l flags have a semantic meaning based on their order, but filtering out just the common Swift libraries should yield a good size improvement already and is safe.
Per Swift Evolution feedback, back deployed functions should be allowed to be inlinable, even though this means that the version of the function in the library may not always be exectued when it is otherwise available.

Resolves rdar://102792806
* Introduce TypeLayout Strings

Layout strings encode the structure of a type into a byte string that can be
interpreted by a runtime function to achieve a destroy or copy. Rather than
generating ir for a destroy/assignWithCopy/etc, we instead generate a layout
string which encodes enough information for a called runtime function to
perform the operation for us. Value witness functions tend to be quite large,
so this allows us to replace them with a single call instead. This gives us the
option of making a codesize/runtime cost trade off.

* Added Attribute @_GenerateLayoutBytecode

This marks a type definition that should use generic bytecode based
value witnesses rather than generating the standard suite of
value witness functions. This should reduce the codesize of the binary
for a runtime interpretation of the bytecode cost.

* Statically link in implementation

Summary:
This creates a library to store the runtime functions in to deploy to
runtimes that do not implement bytecode layouts. Right now, that is
everything. Once these are added to the runtime itself, it can be used
to deploy to old runtimes.

* Implement Destroy at Runtime Using LayoutStrings

If GenerateLayoutBytecode is enabled, Create a layout string and use it
to call swift_generic_destroy

* Add Resilient type and Archetype Support for BytecodeLayouts

Add Resilient type and Archetype Support to Bytecode Layouts

* Implement Bytecode assign/init with copy/take

Implements swift_generic_initialize and swift_generic_assign to allow copying
types using bytecode based witnesses.

* Add EnumTag Support

* Add IRGen Bytecode Layouts Test

Added a test to ensure layouts are correct and getting generated

* Implement BytecodeLayouts ObjC retain/release

* Fix for Non static alignments in aligned groups

* Disable MultiEnums

MultiEnums currently have some correctness issues with non fixed multienum
types. Disabling them for now then going to attempt a correct implementation in
a follow up patch

* Fixes after merge

* More fixes

* Possible fix for native unowned

* Use TypeInfoeBasedTypeLayoutEntry for all scalars when ForceStructTypeLayouts is disabled

* Remove @_GenerateBytecodeLayout attribute

* Fix typelayout_based_value_witness.swift

Co-authored-by: Gwen Mittertreiner <[email protected]>
Co-authored-by: Gwen Mittertreiner <[email protected]>
[interop][SwiftToCxx] use the more appropriate String -> NSString bri…
…ead/unsafeAddress properties.

Addresses part of rdar://102525437.
These tests identified a gap in type checking the exportability of case statements. Unfortunately this gap is not simple to close, since exportability is usually checked during availability checking but availability checking isn't appropriate for case statements and there isn't existing infrastructure to check exportability independently.
This utility helps codify the practice of using the attributes of the first element of a case decl as the attributes for the entire case.
…deployed-functions

Sema: Allow `@inlinable` on back deployed functions
SIL: Add parser support for `has_symbol` instructions
…ion-suffix

build: add missing `REGEX` to properly strip {Free,Open}BSD version suffixes
swift-ci and others added 19 commits November 30, 2022 10:24
docs: convert `ErrorHandling` from `.rst` to `.md`
…er-debugging-indentation

Improve indentation in type checker debugging output
[Runtime] Add missing bridgeObjectRR_xN entrypoints.
…tolinkCommands

[Autolink Extract] Filter out StringProcessing library from being linked more than once.
…with-setter-reabstraction

SILGen: Match up abstraction level when materializing mixed set and read/unsafeAddress properties.
…platforms.

An early approach to codegen for `#_hasSymbol` relied on the Darwin platfom SDK, but now that the feature lowers directly to NULL checks in LLVM IR a platform restriction is no longer needed.

However, the tests for `#_hasSymbol` remain unsupported on Windows since that OS does not support weak linking.
Attr can be null here if it was a custom attribute from an
implementation-only dependency.

rdar://102525437
[stdlib] Do not allocate when creating a Set from a generic Sequence which happens to be another Set
…x-availability-exception

Sema: Allow `AnyColorBox` in SwiftUI to derive from a less available base class
ModuleInterface: Avoid printing `@_spi` enum elements in public swiftinterfaces
…ss-handle

Refactor `_swift_withWin32DbgHelpLibrary()` to avoid using `GetCurrentProcess()` per Microsoft documentation
…linux

Sema: Lift restriction preventing use of `#_hasSymbol` on non-Darwin-platforms
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit b68356b into swiftlang:rebranch Dec 1, 2022
@eeckstein eeckstein deleted the fix-merge-conflicts branch December 1, 2022 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.