Skip to content

[rebranch] Merge branch 'main' into rebranch #39322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

nate-chandler
Copy link
Contributor

Conflicts:
include/swift/SIL/SILBuilder.h

  • [Benchmarks][stdlib] Adding an extra benchmark for set isDisjoint for disjoint sets of different size
  • Added -enable-experimental-defined-lifetimes.
  • [SILGen] Emitted [defined] borrow scopes for lets.
  • Shouldn't this be labeled as a C++ file?
  • Disabling arm64e testing in two tests
  • Fix TOC entry for Linux in GettingStarted
  • [Serialization] Restrict loading swiftmodule files to the builder's SDK
  • [Test] Use -parse-stdlib to avoid loading an incompatible stdlib
  • [APIDigester] Don't check whether the stdlib was built for a different SDK
  • [SIL] Added lexical flag to alloc_stack.
  • Refactor IsBindableVisitor's handling of generic nominals.
  • Have IsBindableVisitor consider conditional conformances.
  • Run type_lowering_subst_function_type_conditional_conformance.swift test with requirement machine enabled
  • SIL: Fix for when conditional requirements reference nested type parameters
  • Remove metadata section functions from the stdlib (Remove metadata section functions from the stdlib #39236)
  • Add flag -swift-async-framepointer=auto,never,always to control swift extended frame information emission
  • Change the logic to exclude extended frame info on all platforms but darwin
  • Default to SwiftAsyncFramePointerKind::Always for now
  • [stdlib] Improve set isDisjoint by iterating on smaller set
  • SIL: Use correct SILFunctionConventions when computing method self type in verifier
  • [Swift CI] Re-enable sanitizer symbolication tests ([Swift CI] Re-enable sanitizer symbolication tests #38489)
  • Avoid using strcasecmp and unroll the comparison to 'snan' instead (Avoid using strcasecmp and unroll the comparison to 'snan' instead #39182)
  • CMake: disable libdispatch when targeting Wasm/WASI (CMake: disable libdispatch when targeting Wasm/WASI #39274)
  • Revert "[Swift CI] Re-enable sanitizer symbolication tests ([Swift CI] Re-enable sanitizer symbolication tests #38489)" (Revert "[Swift CI] Re-enable sanitizer symbolication tests" #39320)

LucianoPAlmeida and others added 30 commits September 12, 2021 21:56
The new flag will guard work on the experimental implementation of
tracking lexical lifetimes in SIL.
When -enable-experimental-defined-lifetimes is passed, SILGen emits
lexical scopes for lets.
I wasn't aware that arm64e was a thing in open-source, but these two
tests are failing on Apple Silicon both on the main branch and on the
rebranch branch, so I'm disabling it for now.

The failing tests are:
 - ModuleInterface/arm64e-fallback.swift
 - stdlib/Reflection_objc.swift
The TOC was referencing a no longer existing "Ubuntu Linux" section.
Serialize the canonical name of the SDK used when building a swiftmodule
file and use it to ensure that the swiftmodule file is loaded only with
the same SDK. The SDK name must be passed down from the frontend.

This will report unsupported configurations like:

- Installing roots between incompatible SDKs without deleting the
swiftmodule files.
- Having multiple targets in the same project using different SDKs.
- Loading a swiftmodule created with a newer SDK (and stdlib) with an
older SDK.

All of these lead to hard to investigate deserialization failures and
this change should detect them early, before reaching a deserialization
failure.

rdar://78048939
Tests using a mock SDK can't load the stdlib of the normal SDK (or the
just-built one) with the recent changes. Use `-parse-stdlib` in those
tests to prevent loading the stdlib implicitly.
…t SDK

The API digester forces loading the stdlib which may pick up an stdlib
from a different SDK than the one being tested. Disable the check
enforcing loading only swiftmodules built for the same SDK.
The new flag will be used to track whether a borrow scope corresponds to
a source-level lexical scope.  Here, the flag is just documented, added
to the instruction, represented in textual and serialized SIL, and
cloned.
In order to correctly handle upper bound requirements arising from conditional conformances,
we need to be able to ingest requirements introduced by conditional conformance extensions,
which means recursively visiting the parent is no longer possible to do cleanly. It is
simpler to substitute the generic type's entire generic context as a whole.
The upper bound on a nominal type's generic argument can have more requirements imposed on it than those written in the original nominal type's generic signature, depending on the requirements imposed on the nominal type itself, thanks to conditional conformances. IsBindableVisitor failed to take this into account when visiting the bindings of generic type arguments. This could cause Type::isBindableTo to provide a false positive for a substituted type that doesn't satisfy conditional conformances, but more importantly, SIL type lowering uses the same visitor to extract an upper bound generic signature for substituted SIL function types, and if it doesn't preserve requirements from conditional conformances on nominal types in that signature, it can end up building an incorrect substitution map. Fix this by passing down the upper bound from generic arguments even when visiting nominal types, and using those upper bounds to check for conditional conformances that add requirements to generic arguments while visiting them.
…es/let/initial

[SILGen] Added [defined] lifetimes for lets behind flag.
…es/alloc_stack/lexical_flag

[SIL] Added lexical flag to alloc_stack.
[Serialization] Restrict loading swiftmodule files to the SDK that built them
…-lowering-fix

Have IsBindableVisitor consider conditional conformances
Fix TOC entry for Linux in GettingStarted
…benchmarks

[Benchmarks][stdlib] Adding an extra benchmark for set isDisjoint for disjoint sets of different size
 control swift extended frame information emission

On linux we default to disable the extended frame info (since the system
libraries don't support it).

On darwin the default is to automatically choose based on the deployment target.

The Concurrency library explicitly forces extended frame information and the
back deployment library explicitly disables it.
…ng-arm64e-tests

Disabling arm64e testing in two tests
…od-self-type-fix

SIL: Use correct SILFunctionConventions when computing method self type in verifier
[stdlib] Improve set isDisjoint by iterating on smaller set
yln and others added 6 commits September 15, 2021 14:50
We updated the Swift CI nodes to a version of Xcode that includes the
fix for a regression in atos that broke sanitizer report symbolication.

Regression: rdar://79151503 (If atos is handed a dSYM, it should find the binary rather than erring)
Fix:        rdar://80345994 (Regression: atos -p <pid> exits immediately)

Radar-Id: rdar://80274830

Co-authored-by: Julian Lettner <julian.lettner@apple.com>
…ction_pointer_flags

Add flag -swift-async-framepointer=auto,never,always to control swift extended frame information emission
Wasm/WASI doesn't currently support multi-threading, and libdispatch should be disabled when building for this target.

Related to SR-12097.
Conflicts:
        include/swift/SIL/SILBuilder.h
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - b429191

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - b429191

@nate-chandler nate-chandler merged commit 0cc70b1 into swiftlang:rebranch Sep 15, 2021
@nate-chandler nate-chandler deleted the 20210915/merge-main-to-rebranch/1 branch September 15, 2021 23:32
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.