Skip to content
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

Merge main 2021-04-15 #2986

Merged
merged 99 commits into from Apr 15, 2021
Merged

Merge main 2021-04-15 #2986

merged 99 commits into from Apr 15, 2021

Commits on Apr 9, 2021

  1. Sema: Don't score a solution higher if there's a sync-vs-async mismat…

    …ch with a 'reasync' function
    
    This fixes a performance regression with the reasync '&&', '||' and '??'
    operators.
    
    Also arguably it makes sense anyway since 'reasync' functions can in
    fact be called from synchronous functions, so the solution should not
    be considered worse.
    
    We don't actually want to be able to overload a synchronous function
    with a 'reasync' function anyway; the whole point of 'reasync' is to
    avoid the need for such overloading.
    
    Fixes rdar://problem/76254445.
    slavapestov committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    77e9025 View commit details
    Browse the repository at this point in the history
  2. Sema: Use getParameterType() instead of getOldType() in CSRanking.cpp

    One last usage of getOldType() remains here, but it's actually
    meaningful since we want to handle InOutType there, so it will
    take more work to eliminate.
    slavapestov committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    3994c46 View commit details
    Browse the repository at this point in the history
  3. SILGen: Don't crash when compiling if #available with `-disable-ava…

    …ilability-checking`.
    
    This isn't an officially supported configuration, but is useful for testing and runtime development,
    and we shouldn't crash.
    jckarter committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    18bd2f7 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2021

  1. [CodeComplete] Complete argument labels in generic initializer

    The actual fix is to perform qualified lookup on a TypeExpr in `collectPossibleCalleesForApply`.
    
    This changes the behaviour of some test cases in `complete_multiple_trailingclosure.swift`, which now provide argument labels. To make the choices suggested less verbose, I refined the parameter matching to only match trailing closures to parameters of function types.
    
    In `INIT_FALLBACK_1` we technically shouldn't be suggesting `arg3` based on the matched argument types (the closure returns `Int` and the constructor with `arg3` requires the closure to return `String`), but AFAICT we aren't doing type-checking at this stage, so there's no way to rule it out.
    ahoppen committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    f965488 View commit details
    Browse the repository at this point in the history
  2. [CodeComplete] Fix issue with completion in string literal as last to…

    …ken in case stmt
    
    The last token in a case stmt can be a string literal token, which can *contain* its interpolation segments. If one of these interpolation segments is the reference point, we'd return false from `isReferencePointInRange` because the string literal token's start location is before the interpolation token. To fix this, adjust the range we are checking to range until the end of the string interpolation token.
    
    Fixes rdar://76330416 [SR-14455]
    ahoppen committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    cfe92f8 View commit details
    Browse the repository at this point in the history
  3. [CodeComplete] Fix issue completing type in generic signature

    Due to apple#36552, parsing the code completion token as a type inside a generic parameter list no longer fails. Instead, it consumes the code completion token as a type identifier. However, since `parseExprIdentifer` does not return a `ParserStatus`, the information whether a code completion token was consumed gets lost, causing `setCodeCompletionDelayedDeclState` to not be called and thus no code completion results show up.
    
    To resolve this, make `parseExprIdentifier` return its `ParserStatus` through a `ParserResult`.
    
    Fixes rdar://76335452 [SR-14432]
    ahoppen committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    4603b67 View commit details
    Browse the repository at this point in the history
  4. IRGen: ObjC rodata can only go in __objc_const if layout is fixed.

    Otherwise, the runtime needs to be able to adjust the instance size when nonfragile ObjC bases
    and/or resilient Swift bases are accounted for. rdar://54089488
    jckarter committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    b929343 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    13e6566 View commit details
    Browse the repository at this point in the history
  6. [Concurrency] Introduce runtime detection of data races.

    Through various means, it is possible for a synchronous actor-isolated
    function to escape to another concurrency domain and be called from
    outside the actor. The problem existed previously, but has become far
    easier to trigger now that `@escaping` closures and local functions
    can be actor-isolated.
    
    Introduce runtime detection of such data races, where a synchronous
    actor-isolated function ends up being called from the wrong executor.
    Do this by emitting an executor check in actor-isolated synchronous
    functions, where we query the executor in thread-local storage and
    ensure that it is what we expect. If it isn't, the runtime complains.
    The runtime's complaints can be controlled with the environment
    variable `SWIFT_UNEXPECTED_EXECUTOR_LOG_LEVEL`:
    
      0 - disable checking
      1 - warn when a data race is detected
      2 - error and abort when a data race is detected
    
    At an implementation level, this introduces a new concurrency runtime
    entry point `_checkExpectedExecutor` that checks the given executor
    (on which the function should always have been called) against the
    executor on which is called (which is in thread-local storage). There
    is a special carve-out here for `@MainActor` code, where we check
    against the OS's notion of "main thread" as well, so that `@MainActor`
    code can be called via (e.g.) the Dispatch library's
    `DispatchQueue.main.async`.
    
    The new SIL instruction `extract_executor` performs the lowering of an
    actor down to its executor, which is implicit in the `hop_to_executor`
    instruction. Extend the LowerHopToExecutor pass to perform said
    lowering.
    DougGregor committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    e77a27e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ffff66d View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2021

  1. [ConstraintSystem] Allow fixing r-value -> l-value mismatch without a…

    … fix for placeholders
    
    If left-hand side of a conversion that requires l-value is a placeholder type,
    let's fix that by propagating placeholder to the order side (to allow it to
    infer a placeholder if needed) without recording a fix since placeholder can
    be converted to `inout` and/or l-value and already indicates existence of a
    problem at some other spot in the expression.
    
    Resolves: rdar://76250381
    xedin committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    b088aea View commit details
    Browse the repository at this point in the history
  2. [Concurrency] Don't check for data races in an actor's deinit.

    An actor's deinit can be invoked from any thread, and does not
    (cannot!) synchronize to the actor. However, because "self" is
    by definition unique and cannot escape, don't perform data race
    checking in it or any local functions/closures within the initializer.
    
    This is an imperfect approximation, because one could introduce a data
    race by invoking a concurrent algorithm on "self" that does not
    escape the closure but subverts @sendable checking and concurrently
    accesses actor state. However, for the moment we accept this false
    negative because the false positives from performing this checking are
    much more prevalent.
    DougGregor committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    2439954 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    28fa56d View commit details
    Browse the repository at this point in the history
  4. Portability fix

    DougGregor committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    95ee2f2 View commit details
    Browse the repository at this point in the history
  5. [Serialization] Serialize internal closure labels

    Since 865e80f we are keeping track of internal closure labels in the closure’s type. With this change, wer are also serializing them to the swiftmodules.
    
    Furthermore, this change adjusts the printing behaviour to print the parameter labels in the swiftinterfaces.
    
    Resolves rdar://63633158
    ahoppen committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    380db63 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ea666db View commit details
    Browse the repository at this point in the history
  7. More Windows workarounds

    DougGregor committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    a722748 View commit details
    Browse the repository at this point in the history
  8. Reinstate "SIL: add a StackList data structure with zero cost operati…

    …ons."
    
    ... with a fix for a non-assert build crash: I used the wrong ilist type for SlabList. This does not explain the crash, though. What I think happened here is that llvm miscompiled and put the llvm_unreachable from the Slab's deleteNode function unconditionally into the SILModule destructor.
    Now by using simple_ilist, there is no need for a deleteNode at all.
    eeckstein committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    b3a7792 View commit details
    Browse the repository at this point in the history
  9. Disable some tests that will fail on back deployment library configur…

    …ations
    
    rdar://76567524
    rdar://76567105
    aschwaighofer committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    0e2f63a View commit details
    Browse the repository at this point in the history
  10. Merge pull request apple#36876 from nate-chandler/wrangle/76564535

    [Test] Disable tests that require new libswiftCore features for back deploy.
    nate-chandler committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    76b2f0b View commit details
    Browse the repository at this point in the history
  11. Merge pull request apple#36872 from jckarter/faster-main-exe-check-in…

    …-compat-hook
    
    Compatibility50: Use __dso_handle for cheaper main executable check.
    jckarter committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    aecb8f3 View commit details
    Browse the repository at this point in the history
  12. Merge pull request apple#36870 from jckarter/rodata-const-only-if-cla…

    …ss-layout-fixed
    
    IRGen: ObjC rodata can only go in __objc_const if layout is fixed.
    jckarter committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    dcc0e46 View commit details
    Browse the repository at this point in the history
  13. This test currently fails on macos arm64

    rdar://76540446
    aschwaighofer committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    3e7da84 View commit details
    Browse the repository at this point in the history
  14. Merge pull request apple#36885 from aschwaighofer/disable_lto_autolin…

    …k_arm64_macos
    
    This test currently fails on macos arm64
    shahmishal committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    3decf42 View commit details
    Browse the repository at this point in the history
  15. Merge pull request apple#36852 from jckarter/disable-availability-che…

    …cking-assertion-failure
    
    SILGen: Don't crash when compiling `if #available` with `-disable-availability-checking`.
    jckarter committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    8ca00d3 View commit details
    Browse the repository at this point in the history
  16. Merge pull request apple#36882 from eeckstein/stacklist

    Reinstate "SIL: add a StackList data structure with zero cost operations."
    eeckstein committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    312ec16 View commit details
    Browse the repository at this point in the history
  17. Minor fixes

    DougGregor committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    f25369d View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    159ffcc View commit details
    Browse the repository at this point in the history
  19. Merge pull request apple#36867 from ahoppen/pr/string-interpolation-i…

    …n-switch-case
    
    [CodeComplete] Fix issue with completion in string literal as last token in case stmt
    ahoppen committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    0712b42 View commit details
    Browse the repository at this point in the history
  20. Merge pull request apple#36866 from ahoppen/pr/serialize-internal-clo…

    …sure-name
    
    [Serialization] Serialize internal closure labels
    ahoppen committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    62aabec View commit details
    Browse the repository at this point in the history
  21. Merge pull request apple#36868 from ahoppen/pr/complete-generic-param

    [CodeComplete] Fix issue completing type in generic signature
    ahoppen committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    eefe93e View commit details
    Browse the repository at this point in the history
  22. Merge pull request apple#36774 from ahoppen/pr/complete-generic-const…

    …ructor
    
    [CodeComplete] Complete argument labels in generic initializer
    ahoppen committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    f539d33 View commit details
    Browse the repository at this point in the history
  23. Merge pull request apple#36828 from slavapestov/reasync-ranking-fix

    Sema: Don't score a solution higher if there's a sync-vs-async mismatch with a 'reasync' function
    slavapestov committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    a4dd60c View commit details
    Browse the repository at this point in the history
  24. Merge pull request apple#36884 from aschwaighofer/disable_tests_on_ba…

    …ck_deployment_runtime
    swift-ci committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    90354d9 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    b5e818b View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    a4ced48 View commit details
    Browse the repository at this point in the history
  27. Add location to the sema_no_import_target diagnostic

    Thsi diagnostic currently emits, for example:
    ```
    could not find module Foo for target arm64; found: x86_64
    ```
    It is sometimes very useful to know where exactly the `found` module is located, so this PR changes this diagnostic to emit:
    ```
    could not find module Foo for target arm64; found: x86_64, at:
    <Path where Foo.swiftmodule/x86_64.swiftmodule is located>
    ```
    artemcm committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    0445336 View commit details
    Browse the repository at this point in the history
  28. [ASTPrinter] Don't transform type if current type can't have members

    Since 9ba892c we always transform `CurrentType` in `ASTPrinter` to be an interface type.
    
    This causes issues for variables that whose type is a protocol. Previously, when printing the type, we had `CurrentType` set to an `OpenedArchetypeType`. Now we replace the archetype by a `GenericTypeParamType`, which may not have members, so we are hitting an assertion in `ASTPrinter.cpp:270`.
    To resolve this, replace any `OpenedArchetypeType`s with their protocol type before calling `mapTypeOutOfContext`.
    
    Resolves rdar://76580851 [SR-14479]
    ahoppen committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    d93ae06 View commit details
    Browse the repository at this point in the history
  29. SIL: A tuple type can be lowered with an opaque result type as the or…

    …iginal type
    
    AbstractionPattern::matchesTuple() is used by various assertions, and
    the condition was too strict. Relax the condition to fix an assertion
    failure in the case where an opaque result type has a tuple as its
    underlying type.
    
    Fixes https://bugs.swift.org/browse/SR-14426 / rdar://problem/76057095.
    slavapestov committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    a0c215b View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    ade7e5d View commit details
    Browse the repository at this point in the history
  31. Merge pull request apple#36877 from xedin/rdar-76250381

    [ConstraintSystem] Allow fixing r-value -> l-value mismatch without a…
    xedin committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    9a72b77 View commit details
    Browse the repository at this point in the history
  32. Merge pull request apple#36888 from slavapestov/opaque-result-type-wi…

    …th-tuple
    
    SIL: A tuple type can be lowered with an opaque result type as the original type
    slavapestov committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    cf646da View commit details
    Browse the repository at this point in the history
  33. Merge pull request apple#36889 from slavapestov/remove-commented-out-…

    …brace-stmt-assert
    
    AST: Remove obsolete commented-out assertion in BraceStmt::create()
    slavapestov committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    4793126 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    3440c4d View commit details
    Browse the repository at this point in the history
  35. Merge pull request apple#36874 from DougGregor/dynamic-data-race-acto…

    …r-isolation
    
    [Concurrency] Introduce runtime detection of data races.
    DougGregor committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    f7fb5a1 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    b3997be View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    2decef1 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    ff7c981 View commit details
    Browse the repository at this point in the history
  39. [Test] Disabled Interpreter/bridged_casts_folding.swift for back_depl…

    …oyment_runtime.
    
    rdar://76566897
    nate-chandler committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    18246f5 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    59ca928 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    6efadb0 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    00f1c60 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    c9a289e View commit details
    Browse the repository at this point in the history
  44. [Test] Disabled Concurrency/Runtime/executor_deinit1.swift on iphones…

    …imulator-x86_64.
    
    rdar://76611676
    nate-chandler committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    03678af View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    b8b6d9c View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2021

  1. Configuration menu
    Copy the full SHA
    c54c9c7 View commit details
    Browse the repository at this point in the history
  2. [windows][test] Unsupport async_task_yield in OS=windows-msvc

    The test crashes in both the VS2017 and VS2019 CI machines.
    
    See https://bugs.swift.org/browse/SR-14333 for more of these problems.
    drodriguez committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    49be0b8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    014b1fe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fb55ced View commit details
    Browse the repository at this point in the history
  5. Fix iOS availability

    DougGregor committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    78cb4ff View commit details
    Browse the repository at this point in the history
  6. Merge pull request apple#36902 from DougGregor/data-race-fix-ios-avai…

    …lability
    
    Fix iOS availability
    DougGregor committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    a6fc1b7 View commit details
    Browse the repository at this point in the history
  7. Merge pull request apple#36887 from xedin/adjust-perf-test-for-linux-2

    [TypeChecker] NFC: Adjust "fast" test-case message to accommodate Ama…
    xedin committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    cb3608e View commit details
    Browse the repository at this point in the history
  8. Remove await from spawnUnlessCancelled

    spawnUnlessCancelled is not an asynchronous function, so awaiting on it
    in the standard library resulted in warnings.
    etcwilde committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    6c7b2af View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    24bed82 View commit details
    Browse the repository at this point in the history
  10. [Sema] Adding a space in closure parameter destructuring fix in cases…

    … closure body is empty to avoid invalid inlet code
    LucianoPAlmeida committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    3d78468 View commit details
    Browse the repository at this point in the history
  11. Merge pull request apple#36901 from etcwilde/ewilde/fix-doc-underline

    [NFC] [ Docs] Fix the missing title underbar
    etcwilde committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    abdccba View commit details
    Browse the repository at this point in the history
  12. Merge pull request apple#36903 from etcwilde/ewilde/remove-extra-awaits

    [NFC][Concurrency] Remove await from spawnUnlessCancelled
    etcwilde committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    8e95ae8 View commit details
    Browse the repository at this point in the history
  13. Add whitespace to markup

    heoblitz committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    20ffc03 View commit details
    Browse the repository at this point in the history
  14. SIL: introduce a PlaceholderValue and use it in the parser and deseri…

    …alizer.
    
    ... instead of a GlobalAddrInst.
    This is cleaner and makes the handling of forward-referenced values in the deserializer a bit simpler.
    eeckstein committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    df2a89f View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    e5e28ff View commit details
    Browse the repository at this point in the history
  16. SIL: remove the SILOpenedArchetypesTracker

    Instead, put the archetype->instrution map into SIlModule.
    
    SILOpenedArchetypesTracker tried to maintain and reconstruct the mapping locally, e.g. during a use of SILBuilder.
    Having a "global" map in SILModule makes the whole logic _much_ simpler.
    
    I'm wondering why we didn't do this in the first place.
    
    This requires that opened archetypes must be unique in a module - which makes sense. This was the case anyway, except for keypath accessors (which I fixed in the previous commit) and in some sil test files.
    eeckstein committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    6ec788f View commit details
    Browse the repository at this point in the history
  17. Merge pull request apple#36896 from bnbarham/extract-basic-info

    [Gardening] Extract basic source info structs from RawComment.h
    bnbarham committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    f1efd02 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    429eda3 View commit details
    Browse the repository at this point in the history
  19. Merge pull request apple#36858 from eeckstein/remove-oat-tracker

    SIL: remove the SILOpenedArchetypesTracker
    eeckstein committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    149446b View commit details
    Browse the repository at this point in the history
  20. Merge pull request apple#36904 from LucianoPAlmeida/destructure-fix-it

    [Sema] Adding a space in closure parameter destructuring fix in cases closure body is empty
    LucianoPAlmeida committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    5db5733 View commit details
    Browse the repository at this point in the history
  21. Merge pull request apple#36890 from davezarzycki/pr36890

    Add missing `REQUIRES: concurrency`
    davezarzycki committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    b26e38e View commit details
    Browse the repository at this point in the history
  22. Merge pull request apple#36900 from drodriguez/windows-unsupported-as…

    …ync_task_yield
    
    [windows][test] Unsupport async_task_yield in OS=windows-msvc
    hborla committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    57aa7e4 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    fef108f View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    d57c112 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    766bf78 View commit details
    Browse the repository at this point in the history
  26. Merge pull request apple#36912 from hborla/disable-failing-concurrenc…

    …y-tests-linux
    
    [Test] Disable failing concurrency tests on Linux.
    hborla committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    a5c0368 View commit details
    Browse the repository at this point in the history
  27. Merge pull request apple#36899 from nate-chandler/wrangle/76080265

    [Test] Disabled Interpreter/SDK/cf_without_foundation.swift on watchos.
    nate-chandler committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    3f6eb2f View commit details
    Browse the repository at this point in the history
  28. [sil-mem2reg] Add a simple scope data structure and use it to simplif…

    …y some code.
    
    We have for a long time talked about creating a scope like data structure for
    use in the SILOptimizer. The discussion was whether or not to reuse the
    infrastructure in SILGen that does this already. There were concerns about doing
    so since the code in the SILOptimizer and SILGen can work differently.
    
    With that in mind, I added a small AssertingScope class and built on top of that
    a composition SIL level class called SILOptScope that one can use to add various
    cleanups. One is able to both destructively pop at end of scope and pop along
    early exits.
    
    At an implementation level, I kept it simple and:
    
    1. Represented a scope as a stack of Optional<Cleanup> which are just a wrapper
       around a std::function. The Optional is so that we can invalidate a cleanup.
    2. Based all of these scopes around the idea that the user of the scope must
       invalidate the scope by hand. If not, the scope object will assert at the end
       of its RAII scope.
    3. Rather than creating a whole class hierarchy, I just used std::function
       closures to keep things simple.
    gottesmm committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    c0e31d8 View commit details
    Browse the repository at this point in the history
  29. [ownership] Refactor out the composition type LoadOperation from Cano…

    …nicalizeInstruction into OwnershipOptUtils.
    
    This API is useful when writing compiler code that needs to handle ossa/non-ossa
    as well as load_borrow/load while in OSSA. I am going to use this in
    SILMem2Reg.
    gottesmm committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    5019e15 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    6139a4f View commit details
    Browse the repository at this point in the history
  31. Merge pull request apple#36915 from xedin/disable-ufaing-data-race-test

    [Tests] NFC: Disable concurrency data race detection test on all plat…
    shahmishal committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    c754929 View commit details
    Browse the repository at this point in the history
  32. Merge pull request apple#36820 from artemcm/BetterModuleArchNotFoundMsg

    Add location to the `sema_no_import_target` diagnostic
    artemcm committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    b15f77d View commit details
    Browse the repository at this point in the history
  33. [Test] Disable a test on Linux at swift_test_mode_optimize_none.

    Per @xedin, it's fine to leave this test disabled here.
    nate-chandler committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    1e45d16 View commit details
    Browse the repository at this point in the history
  34. Sema: Handle Error self-conformance in TypeChecker::containsProtocol()

    While ModuleDecl::lookupConformance() did the right thing here, we have
    another entry point, TypeChecker::containsProtocol(), that also needs
    to special-case Error.
    
    Fixes https://bugs.swift.org/browse/SR-13734 / rdar://problem/70338670.
    slavapestov committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    508dc8c View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    5e0593f View commit details
    Browse the repository at this point in the history
  36. Merge pull request apple#36911 from xedin/refactor-common-operator-id…

    …entification-logic
    
    [ConstraintSystem] NFC: Factor operator overload identification and partitioning.
    xedin committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    9e159de View commit details
    Browse the repository at this point in the history
  37. Merge pull request apple#36916 from nate-chandler/wrangle/test/Sema/t…

    …ype_checker_perf/fast/rdar26564101.swift
    swift-ci committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    c917530 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2021

  1. Configuration menu
    Copy the full SHA
    367305b View commit details
    Browse the repository at this point in the history
  2. Merge pull request apple#36914 from gottesmm/pr-50f9fe327da8081f9050c…

    …5c892eb164aec334530
    
    [ownership] Refactor out the composition type LoadOperation from CanonicalizeInstruction into OwnershipOptUtils.
    gottesmm committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    07b568d View commit details
    Browse the repository at this point in the history
  3. Merge pull request apple#36918 from slavapestov/error-existential-met…

    …atype
    
    Sema: Handle Error self-conformance in TypeChecker::containsProtocol()
    slavapestov committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    8ed2a95 View commit details
    Browse the repository at this point in the history
  4. Merge pull request apple#36913 from gottesmm/pr-45e4affc7e9132e241abc…

    …77bc7eef73664feef8a
    
    [sil-mem2reg] Add a simple scope data structure and use it to simplify some code.
    gottesmm committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    8c9d402 View commit details
    Browse the repository at this point in the history
  5. Merge pull request apple#36880 from ahoppen/pr/cursor-info-protocol-var

    [ASTPrinter] Don't transform type if current type can't have members
    ahoppen committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    7123d26 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3a08e4f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5f8b3bd View commit details
    Browse the repository at this point in the history