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

Differential emitter generic support #2

Open
wants to merge 1,137 commits into
base: differential-emitter
Choose a base branch
from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Aug 28, 2019

  1. [NFC] Sort the requests

    This should curtail merge conflicts in the future
    CodaFi committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    a2641e7 View commit details
    Browse the repository at this point in the history
  2. [Serialization] Replace fixed-width fields with smaller VBR fields (s…

    …wiftlang#26887)
    
    VBR fields can store up to 64 bits of info in N-bit units, where the
    top bit describes whether there are further units to come. See
    http://llvm.org/docs/BitCodeFormat.html for more information. In the
    cases of the fields changed here, these are all usually-small values
    that can /occasionally/ get a lot larger; a VBR field allows us to
    pick a reasonable default while still not setting a maximum.
    
    Swiftmodule size micro-optimization. No functionality change; due to
    LLVM bitstream being a self-describing container format, this does not
    actually break compatibility.
    jrose-apple authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    e9d22f2 View commit details
    Browse the repository at this point in the history
  3. [ownership] Enable ownership lowering on overlays. I still need to fl…

    …ip the switch to enable this on the tests/rest of the world.
    gottesmm committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    447f008 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0948695 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f34c92f View commit details
    Browse the repository at this point in the history
  6. [semantic-arc-opts] Teach the pass how to eliminate copies from begin…

    …_borrow, load_borrow where all users can accept a guaranteed parameter.
    
    I previously implemented this only for functions so I didn't need to use the
    linear lifetime checker to determine if all destroys where within the lifetime
    of the borrowed value. That was just to be incremental. In this commit, I
    unleash the whole optimization.
    gottesmm committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    e5f1aea View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    741af6f View commit details
    Browse the repository at this point in the history
  8. Frontend: add a front-end option to specify module names for which we…

    … prefer to loading via interfaces
    
    ABI checker imports Swift frameworks by using Swift interfaces for various
    reasons. The existing way of controlling preferred importing mechanism is by
    setting an environment variable (SWIFT_FORCE_MODULE_LOADING), which may lead
    to performance issues because the stdlib could also be loaded in this way.
    
    This patch adds a new front-end option to specify module names for
    which we prefer to importing via Swift interface. The option currently is only
    accessible via swift-api-digester.
    
    rdar://54559888
    nkcsgexi committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    1e65666 View commit details
    Browse the repository at this point in the history
  9. Merge pull request swiftlang#26892 from CodaFi/zoned-out

    [Request Evaluator] Begin Formalizing Zones
    CodaFi authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    cc9672e View commit details
    Browse the repository at this point in the history
  10. Merge pull request swiftlang#26898 from gottesmm/pr-ec34aef279bb7b977…

    …ac23243588bb03b3f435c62
    swift-ci authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    5d53c3f View commit details
    Browse the repository at this point in the history
  11. Merge pull request swiftlang#26894 from nkcsgexi/frontend-opts-load-i…

    …nterface-for-module
    
    Frontend: add a front-end option to specify module names for which we prefer loading via interfaces
    nkcsgexi authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    e29dc4e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    74f8d09 View commit details
    Browse the repository at this point in the history
  13. Merge pull request swiftlang#26895 from gottesmm/pr-1269f7cc47321dcf6…

    …d2fc16ee80001e7a767ab77
    
    [ownership] Enable ownership lowering on overlays. I still need to fl…
    gottesmm authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    77d77c0 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    e477fca View commit details
    Browse the repository at this point in the history
  15. Merge pull request swiftlang#26852 from xedin/refactor-treat-r-as-l-v…

    …alue
    
    [ConstraintSystem] Be more principled about recording r-value -> l-value fix
    xedin authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    7b8fb88 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    2f377d9 View commit details
    Browse the repository at this point in the history
  17. [ConstraintSystem] Introduce a fix to allow conversion between `inout…

    …` types
    
    If there is an argument-to-parameter conversion which is associated with
    `inout` parameter, subtyping is now permitted, types have to be identical.
    
    ```swift
    protocol P {}
    struct S : P  {}
    
    func foo(_: inout P) {}
    
    var s = S()
    foo(&s) // `s` has to be defined as `P` e.g. `var s: P = S()`
            // to be used as an argument to `inout P` parameter.
    ```
    xedin committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    844feda View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    f0f95f1 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    8b11e7c View commit details
    Browse the repository at this point in the history
  20. MemoryLifetime: Make the dataflow solving functions of MemoryDataflow…

    … more flexible.
    
    Add the possibility to solve with a custom join operator.
    eeckstein committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    9e67408 View commit details
    Browse the repository at this point in the history
  21. tests: fix array lifetime problem in the DispatchData test.

    It causes a use-after-free problem with more aggressive destroy hoisting in the compiler.
    Also replace tabs with spaces in this file.
    eeckstein committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    34e80b7 View commit details
    Browse the repository at this point in the history
  22. SILOptimizer: a new optimization to hoist destroys of memory locations

    DestroyHoisting moves destroys of memory locations up the control flow as far as possible.
    Beside destroy_addr, also "store [assign]" is considered a destroy, because is is equivalent to an destroy_addr + a "store [init]".
    The main purpose of this optimization is to minimize copy-on-write operations for arrays, etc. Especially if such COW containers  are used as enum payloads and modified in-place. E.g.
    
    switch e {
      case .A(var arr):
        arr.append(x)
        self = .A(arr)
    ...
    
    In such a case DestroyHoisting can move the destroy of the self-assignment up before the switch and thus let the array buffer only be single-referenced at the time of the append.
    
    When we have ownership SIL throughout the pass pipeline this optimization will replace the current destroy hoisting optimization in CopyForwarding.
    For now, this optimization only runs in the mandatory pipeline (but not for -Onone) where we already have ownership SIL.
    
    SR-10605
    rdar://problem/50463362
    eeckstein committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    0e08976 View commit details
    Browse the repository at this point in the history
  23. [Stdlib] Skip Mirror.swift's Subclass, Fields, and Cases tests on old…

    …er OSes.
    
    rdar://problem/54754304
    mikeash committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    0345186 View commit details
    Browse the repository at this point in the history
  24. Merge pull request swiftlang#26516 from mikeash/retain-release-avoid-…

    …function-pointer-indirection
    
    [Runtime] Avoid function pointer indirection in refcounting functions.
    mikeash authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    9e61d53 View commit details
    Browse the repository at this point in the history
  25. Merge pull request swiftlang#26878 from aschwaighofer/conditionalize_…

    …kvopaths_tests
    
    Conditionalize KVOKeyPaths tests that only work with Swift 5.1 (2)
    aschwaighofer authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    10fd6fb View commit details
    Browse the repository at this point in the history
  26. [Serialization] Drop GenericEnvironmentID for GenericSignatureID (swi…

    …ftlang#26862)
    
    A generic environment is always serialized as a GenericSignature with
    a lazily-recreated environment, though sometimes it has to include
    extra info specifically for generic environments used by SIL. The code
    that was doing this claimed a bit for disambiguating between the two,
    shrinking the permitted size of a compiled module from 2^31 bits to
    2^30. (The code isn't just needlessly complicated; GenericEnvironments
    used to be serialized with more information.)
    
    Rather than have two representations for GenericEnvironmentID, this
    commit just drops it altogether in favor of referencing
    GenericSignatures directly.  This causes a negligible file size
    shrinkage for swiftmodules in addition to eliminating the problematic
    disambiguation bit.
    
    For now, the Deserialization logic will continue to cache
    GenericEnvironments that are used directly by Deserialization, but
    really that should probably be done at the AST level. Then we can
    simplify further to ModuleFile tracking a plain list of
    GenericSignatures.
    jrose-apple authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    62f947d View commit details
    Browse the repository at this point in the history
  27. Merge pull request swiftlang#26883 from rintaro/revert-revert-26478-g…

    …soc-2019-parser-types
    
    Re-apply "[Parser] Decouple the parser from AST creation (part 2)"
    rintaro authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    faaa3a8 View commit details
    Browse the repository at this point in the history
  28. Add missing ) and code voice.

    rdar://problem/46680213
    amartini51 committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    64c32f3 View commit details
    Browse the repository at this point in the history
  29. test: enable -enable-library-evolution in compare-dump-interface-vs-b…

    …inary.swift
    
    Under `-enable-library-evolution`, a slight AST difference is still found when importing
    from .swiftinterface and from .swiftmodule. The difference is whether @objc attribute
    is inherited by a Swift class subclassing an Objc class.
    nkcsgexi committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    e7fdd67 View commit details
    Browse the repository at this point in the history
  30. Merge pull request swiftlang#26803 from eeckstein/destroy-hoisting

    SILOptimizer: a new optimization to hoist destroys of memory locations
    eeckstein authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    8ea5df1 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    1cc3ed0 View commit details
    Browse the repository at this point in the history
  32. LazyASTScopes only matters when ASTScopes are enabled

    David Ungar committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    1415f2f View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    55f9be3 View commit details
    Browse the repository at this point in the history
  34. ABI/API checker: diagnose ObjC name changes as breakages

    rdar://54797695
    nkcsgexi committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    6374d36 View commit details
    Browse the repository at this point in the history
  35. Runtime: Hook the ObjC runtime with an untrusted demangler.

    We don't want objc_getClass and NSClassFromString to be able to feed arbitrary symbolic reference
    pointers into the Swift runtime. Fixes rdar://problem/54724618.
    jckarter committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    a49e0d5 View commit details
    Browse the repository at this point in the history
  36. benchmark: add naive string finding

    FindStringNaive is a simple benchmark which implements a naive String
    finding algorithm that currently shows a lot of ARC traffic, hopefully
    to be reduced in the future.
    weissi authored and Johannes Weiss committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    f758d22 View commit details
    Browse the repository at this point in the history
  37. Merge pull request swiftlang#26907 from nkcsgexi/post-merge-comment-a…

    …ddress
    
    test: enable -enable-library-evolution in compare-dump-interface-vs-binary.swift
    nkcsgexi authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    4af31e6 View commit details
    Browse the repository at this point in the history
  38. Merge pull request swiftlang#26908 from gottesmm/pr-fc8e6588b30f2b2c8…

    …2b8310793d1b14fde50ef0a
    swift-ci authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    228a394 View commit details
    Browse the repository at this point in the history
  39. [Diagnostics] Add a diagnostic for invalid conversion of inout argu…

    …ment/parameter
    
    Since there is no subtyping allowed in `inout` positions, let's
    produce a tailored error message and a note about that.
    xedin committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    b9cf4fa View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    8f56771 View commit details
    Browse the repository at this point in the history
  41. AST: removeShadowedDecls() takes a DeclContext instead of a ModuleDecl

    This allows shadowing rules to depend on the current SourceFile and
    not just the current ModuleDecl. For now, this isn't actually
    taken advantage of.
    slavapestov committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    b3d95d7 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    f804efd View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    acf5371 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    3819f34 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    665cff1 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    dcefd7f View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    71eae32 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    962f358 View commit details
    Browse the repository at this point in the history
  49. AST: Add module visibility shadowing rule to removeShadowedDecls()

    This simulates the shadowing done by ModuleNameLookup, which is about to be
    removed.
    
    The basic idea is that if a module A imports a module B, and B imports C,
    then from A's point of view, top-level declarations from B will shadow
    top-level declarations from C.
    slavapestov committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    1c28684 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    7039277 View commit details
    Browse the repository at this point in the history
  51. Fix test

    David Ungar committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    2ae2006 View commit details
    Browse the repository at this point in the history
  52. Merge pull request swiftlang#26910 from nkcsgexi/diagnose-objc-name-c…

    …hange
    
    ABI/API checker: diagnose ObjC name changes as breakages
    nkcsgexi authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    03bd71c View commit details
    Browse the repository at this point in the history
  53. [test] Remove redirection stderr->out that corrupted output.

    The RUN line was redirecting stderr to stdout, but nothing in the test
    was checking for the stderr output.
    
    However, the last line of stderr was an empty newline, which was printed
    (in my machine) in the middle of the dump from the AST, breaking the
    test.
    
    If we ever need to check the stderr, it should be redirected to a file,
    and the file should be passed to FileCheck independently, to avoid
    concurrent uses of the output buffer.
    drodriguez committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    a7888f0 View commit details
    Browse the repository at this point in the history
  54. Merge pull request swiftlang#26911 from jckarter/objc_getClass-untrus…

    …ted-demangler
    
    Runtime: Hook the ObjC runtime with an untrusted demangler.
    jckarter authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    5354f9f View commit details
    Browse the repository at this point in the history
  55. Merge pull request swiftlang#26884 from milseman/cache_alignment

    [test] Disable misaligned indices test prior to 5.1
    milseman authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    d30ec5b View commit details
    Browse the repository at this point in the history
  56. [code-completion] Don't delay parsing a decl within a closure - delay…

    … the decl containing that closure instead
    
    We were losing the CurLocalContext state (set when entering the closure's
    BraceStmt) through the delaying process, sometimes causing errors when we
    got back to parsing a delayed decl.
    
    Resolves rdar://problem/54219186
    Nathan Hawes committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    746340f View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    3321794 View commit details
    Browse the repository at this point in the history
  58. Merge pull request swiftlang#26885 from lorentey/nein-nein-nein-nein

    [test] Denineninenineninify behavioral tests added for 5.1
    lorentey authored Aug 28, 2019
    Configuration menu
    Copy the full SHA
    8fcc94f View commit details
    Browse the repository at this point in the history
  59. [CSApply] shouldForceUnwrapResult() should return false when we don't…

    … have an disjunction choice
    
    This will only be false if we have an IUO method call wrapped in parens (like '(s.foo)()'), so assert that the type is a function type as well
    theblixguy committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    28d0c08 View commit details
    Browse the repository at this point in the history
  60. [semantic-arc-opts] Fix small bug around eliminating copies from begi…

    …n_borrow, load_borrow, and dead end blocks.
    
    TLDR:
    
    The bug occurs since a copy_value does not need to be balanced by destroy_values
    along paths that end in dead end blocks. So our check that all "consuming" uses
    of the copy_value are within the lifetime of the begin_borrow, load_borrow
    trivially succeed since there are no consuming uses of the copy_value to check!
    This then results in us creating a use of a borrowed value after the borrowed
    values end borrow.
    
    I go through the bug in detail (via an example) and provide a proof that this
    bug can only occur if the copy_value if there exists a set of dead end blocks
    that jointly post-dominate the copy.
    
    ----
    
    Consider the following SIL:
    
    ```
      %1 = begin_borrow %0 : $KlassPair                            (1)
      %2 = struct_extract %1 : $KlassPair, #KlassPair.firstKlass
      %3 = copy_value %2 : $Klass
      ...
      end_borrow %1 : $LintCommand                                 (2)
      cond_br ..., bb1, bb2
    
      ...
    
      bbN:
        // Never return type implies dead end block.
        apply %f(%3) : $@convention(thin) (@guaranteed Klass) -> Never (3)
        unreachable
    ```
    
    For simplicity, note that if bbN post-dominates %3, given that when we compute
    linear lifetime errors we ignore dead end blocks, we would not register that the
    copy_values only use is outside of the begin_borrow region defined by (1), (2)
    and thus would eliminate the copy. This would result in %2 being used by %f,
    causing the linear lifetime checker to error.
    
    Naively one may assume that the solution to this is to just check if %3 has
    /any/ destroy_values at all and if it doesn't have any reachable destroy_values,
    then we are in this case. But is this correct in general? We prove this below:
    
    The only paths along which the copy_value can not be destroyed or consumed is
    along paths to dead end blocks. Trivially, we know that such a dead end block,
    can not be reachable from the end_borrow since by their definition dead end
    blocks do not have any successor instructions or blocks.
    
    So we know that we can only run into this bug if we have a dead end block
    reachable from the end_borrow, meaning that the bug can not occur if we branch
    before the end_borrow since in that case, the borrow scope would last over the
    dead end block's no return meaning that we will not use the borrowed value after
    its lifetime is ended by the end_borrow.
    
    With that in hand, we note again that if we have exactly one consumed,
    destroy_value /after/ the end_borrow we will not optimize here since the
    optimization only attempts to eliminate copies that are not consumed by
    non-destroy_value instructions. This means that this bug can only occur if the
    copy_value is only post-dominated by dead end blocks that use the value in a
    non-consuming way.
    
    NOTE: This can only occur if the copy_value is from a "borrow introducer" that
    is associated with an end_borrow. This today includes begin_borrow, load_borrow,
    but importantly and notably not function arguments.
    
    rdar://54788632
    gottesmm committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    108a02f View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    a2daa11 View commit details
    Browse the repository at this point in the history
  62. [CSApply] Use the choiceLocator, not locator when checking if a disju…

    …nction choice exists
    
    Obviously we won't have a disjunction choice for the locator, it's only possible if the locator is extended with ImplicitlyUnwrappedDisjunctionChoice path element
    theblixguy committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    532498b View commit details
    Browse the repository at this point in the history
  63. ABI checker: exclude unavailable decls from ABI descriptors

    Framework authors usually have different schemes for different deployment
    targets. We should exclude platform-unavailable ABIs from the Json file so
    developers will only be warned of the breakages that are relevant to the current
    scheme.
    
    rdar://54273296
    nkcsgexi committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    6dd41f4 View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    bdda81c View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    c073e62 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2019

  1. Configuration menu
    Copy the full SHA
    41eebd2 View commit details
    Browse the repository at this point in the history
  2. Merge pull request swiftlang#26912 from xedin/allow-inout-conversion-fix

    [ConstraintSystem] Introduce a fix to allow conversion between `inout` types
    xedin authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    facd27f View commit details
    Browse the repository at this point in the history
  3. [CS] If locator points to a function call, then compare the fn and se…

    …manticFn, otherwise fall back to paren check
    
    This is because otherwise we would have false positives, like 'Foo(Bar())' where Foo's init accepts a non-optional Bar and Bar's init returns an IUO
    theblixguy committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    b32386b View commit details
    Browse the repository at this point in the history
  4. Merge pull request swiftlang#26919 from nathawes/r54219186-interpolat…

    …ed-string-code-completion-crash
    
    [code-completion] Don't delay parsing a decl within a closure - delay the decl containing that closure instead
    Nathan Hawes authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    57e1732 View commit details
    Browse the repository at this point in the history
  5. Merge pull request swiftlang#26922 from nkcsgexi/remove-unavailable-d…

    …ecls-from-abi-descriptors
    
    ABI checker: exclude unavailable decls from ABI descriptors
    nkcsgexi authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    f335010 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e5fa534 View commit details
    Browse the repository at this point in the history
  7. Merge pull request swiftlang#26791 from slavapestov/new-shadowing-rul…

    …e-part-1
    
    New shadowing rule, part 1
    slavapestov authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    da8ef33 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f567b8f View commit details
    Browse the repository at this point in the history
  9. AST: Add scoped import shadowing rule to removeShadowedDecls()

    This simulates the shadowing done by ModuleNameLookup, which is about to be
    removed.
    
    The basic idea is that top-level declarations found via scoped imports
    take precedence over unscoped imports.
    slavapestov committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    61a4a48 View commit details
    Browse the repository at this point in the history
  10. AST: Change lookupInModule() to take a DeclContext instead of a modul…

    …e and extra imports
    
    Also get rid of the 'accessPath' parameter.
    slavapestov committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    37f308b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1224e90 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b8f42d6 View commit details
    Browse the repository at this point in the history
  13. Merge pull request swiftlang#26914 from rintaro/syntaxparse-genericar…

    …gsyntax
    
    [SyntaxParse] use parseGenericArgumentClauseSyntax()
    rintaro authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    0899eb6 View commit details
    Browse the repository at this point in the history
  14. [Parser] Introduce a request for parsing type and extension members.

    Ensure that lazy parsing of the members of nominal type definitions
    and extensions is handled through a request. Most of the effort here
    is in establishing a new request zone for parser requests.
    DougGregor committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    d8f7c9e View commit details
    Browse the repository at this point in the history
  15. Merge pull request swiftlang#26920 from gottesmm/pr-93c0bf13b0385db5c…

    …587ec3901a47e3af1892192
    
    [semantic-arc-opts] Fix small bug around eliminating copies from begi…
    gottesmm authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    ec3975a View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    5f01b0d View commit details
    Browse the repository at this point in the history
  17. [AutoDiff] Temporarily disable non-varied result warning. (swiftlang#…

    …26928)
    
    Previously, a warning and fixit was generated for differentiable functions
    with non-varied results.
    
    ```
    tf-775.swift:3:3: warning: result does not depend on differentiation
    arguments and will always have a zero derivative; do you want to use
    'withoutDerivative(at:)'?
      .zero
      ^
      withoutDerivative(at: )
    ```
    
    However, TF-775 exposes that the fixit does not work and the warning is
    unsilenceable.
    
    This patch temporarily disables the warning, as a robust fix requires
    non-trivial activity analysis changes. A lack of warning is better
    than an unsilenceable false positive.
    
    TF-788 tracks re-enabling the warning.
    Add regression test to ensure that unsilenceable warnings will not
    happen again.
    dan-zheng authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    483d399 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    771a390 View commit details
    Browse the repository at this point in the history
  19. Merge pull request swiftlang#26864 from slavapestov/new-shadowing-rul…

    …e-part-2
    
    New shadowing rule, part 2
    slavapestov authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    016acf3 View commit details
    Browse the repository at this point in the history
  20. tests: fix the commandline for the optionset test

    The purpose of this test is to check if the compiler optimizes optionsets as expected. There should not be any additional tweaks necessary, like disabling exclusivity checks.
    Fortunately, optimizations are good enough in the meantime that this test also works with enabled exclusivity checking.
    eeckstein committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    8f26405 View commit details
    Browse the repository at this point in the history
  21. Remove explicit seeds from string hashes that are compiler-dependent

    The one for enum raw value checking isn't serialized anywhere, so we
    can use normal in-process hashing. The ones in the Clang importer's
    lookup tables are serialized, but the lookup table is already only
    valid for a particular compiler build anyway (it goes into a Clang
    PCM, which has the full compiler version in its cache key).
    jrose-apple committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    11e206a View commit details
    Browse the repository at this point in the history
  22. [Serialization] The hash seed for DeclCommentTableInfo can't change

    Unlike compiled modules, swiftdoc files are considered a stable
    format, so we can't change how information is stored in them. If we
    add any more string-hashed tables to swiftdoc files, we should
    consider using a new hash seed for those.
    jrose-apple committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    b0ad06a View commit details
    Browse the repository at this point in the history
  23. [Serialization] Switch to a better hash seed for lookup tables

    ...fulfilling the promised audit from 0747d9a. No intended
    functionality change /other/ than the order of already-unsorted lists.
    This affected a number of SIL tests that relied on deserialization
    order matching the original source order; I have no idea why the old
    hash logic would make that the case. If we think that's a valuable
    property, we should serialize a list of functions in addition to the
    iterable table. (Maybe just in SIB mode?)
    jrose-apple committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    c06e105 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    6842134 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    974c9d1 View commit details
    Browse the repository at this point in the history
  26. [Parser] Make delayed member parsing not depend on "persistent parser…

    …" state.
    
    The `DelayedDeclKind` structure that's allocated for each case where
    we delay parsing the members of a nominal type definition or extension
    contains information that is already available on the
    `IterableDeclContext` (or can be reconstructed trivially from it). Use
    that AST information rather than this side structure.
    DougGregor committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    9dd5a3c View commit details
    Browse the repository at this point in the history
  27. Merge pull request swiftlang#26916 from drodriguez/test-dump-parse-wi…

    …thout-stderr
    
    [test] Remove redirection stderr->out that corrupted output.
    drodriguez authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    3a78945 View commit details
    Browse the repository at this point in the history
  28. Add Quote to update-checkout-config.json

    Recently, we've given up on swiftlang#26708
    which was trying to include Quote in the apple/swift:tensorflow build.
    
    However, we still need a little bit of that PR in order to keep track
    of which version of Quote the quoting logic in the compiler depends on.
    
    It is somewhat awkward to clone Quote during the build and then not use
    it afterwards, but that's the best that our current infrastructure
    allows us.
    Eugene Burmako committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    683e95f View commit details
    Browse the repository at this point in the history
  29. Merge pull request swiftlang#26933 from rintaro/syntaxparse-roundtrip1

    [SyntaxParse] Fix round-trip issue in function types
    rintaro authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    6fcbb40 View commit details
    Browse the repository at this point in the history
  30. change -Oplayground back to NoOptimization

    Marc Rasi committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    22c1b74 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    a786c24 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    fc9fef2 View commit details
    Browse the repository at this point in the history
  33. Merge pull request swiftlang#26934 from burmako/add-quote-to-checkout…

    …-config
    
    Add Quote to update-checkout-config.json
    Eugene Burmako authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    411f3bb View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    4e8426b View commit details
    Browse the repository at this point in the history
  35. AST: New implementation of lookupInModule() that uses the ImportCache

    Now that the normal name lookup shadowing can handle the module-based
    shadowing rules implemented by lookupInModule(), we can drastically
    simplify the implementation, replacing the graph traversal with an
    iteration over the linearized graph.
    slavapestov committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    053c3c7 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    2256b1f View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    3956fc0 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    d280ae4 View commit details
    Browse the repository at this point in the history
  39. [SyntaxParse] Fix memory leaks

    There were a few places discarding recorded syntax:
    - '#<code-complete>' at top-level (this should be parsed as UnknownDecl).
    - 'typealias' decl with inheritance clause in protocol decl.
    rintaro committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    1ca90ef View commit details
    Browse the repository at this point in the history
  40. Merge pull request swiftlang#26931 from aschwaighofer/outliner_fix

    Outliner fix: Make sure the enum actually has an operand before we access it
    aschwaighofer authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    f1f75ca View commit details
    Browse the repository at this point in the history
  41. [SILOptimizer] Added MandatoryCombiner.

    Minimal commit to get the mandatory combiner rolling.  At the moment,
    the mandatory combiner only processes partial apply instructions,
    attempting both to replace their applies with applies of their
    underlying function refs and also to eliminate them altogether.  That
    processing is only done if all the arguments to the apply and to the
    partial apply are trivial.
    
    For now, the pass is not part of any pipeline.
    nate-chandler committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    bed890c View commit details
    Browse the repository at this point in the history
  42. build: dereference variable as appropriate

    Certain versions of CMake behave differently with variable expansion.  This may
    be evaluated incorrectly in some versions.  Dereference the value explicitly.
    compnerd committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    89516d0 View commit details
    Browse the repository at this point in the history
  43. Merge pull request swiftlang#26925 from DougGregor/parse-members-request

    [Parser] Introduce a request for parsing type and extension members.
    DougGregor authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    2c9def8 View commit details
    Browse the repository at this point in the history
  44. Merge pull request swiftlang#26685 from jrose-apple/po-tay-toes

    Use a better hash seed when doing string hashing in the compiler
    jrose-apple authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    9bc5a55 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    bd222ad View commit details
    Browse the repository at this point in the history
  46. ABI/API checker: populate several lazily computed attributes to nodes

    ABI/API checker should check semantic differences of two modules.
    Adhering too strictly to the actual ASTs could yield false positives. This
    patch populates ObjC, Dynamic and Final to the attribute list if AST
    APIs say so.
    
    rdar://50217247
    nkcsgexi committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    1e173d8 View commit details
    Browse the repository at this point in the history
  47. [Diagnostics] Treat type requirement failures associated with Self

    …= `Any` as unrelated
    
    This helps us to filter out cases like operator overloads where
    `Self` type comes from e.g. default for collection element -
    `[1, "hello"].map { $0 + 1 }`. Main problem here is that
    collection type couldn't be determined without unification to
    `Any` and `+` failing for all numeric overloads is just a consequence.
    xedin committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    ecf8146 View commit details
    Browse the repository at this point in the history
  48. reset more of SILOptimizer to upstream state

    Marc Rasi committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    e48c89b View commit details
    Browse the repository at this point in the history
  49. change python_runtime test to use generic

    Something about the existential specialization pass generates code that
    causes FunctionSignatureTransform to assertion fail.
    Marc Rasi committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    2c34b5e View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    b8ced14 View commit details
    Browse the repository at this point in the history
  51. [CSDiagnostics] Do not crash when the path is empty and we have a cal…

    …l expression
    
    When the path is empty, it's possible that we have a ternary expression as an argument to a function call and a contextual conformance failure for either or both the branches of that expression.
    theblixguy committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    c904a59 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    016e3dc View commit details
    Browse the repository at this point in the history
  53. Factor out a visitor from findAccessedStorage.

    The same logic for looking through projection paths is useful elsewhere.
    jckarter committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    0e3987a View commit details
    Browse the repository at this point in the history
  54. Use the new visitor to handle multiple borrows in SemanticARCOpts.

    By intercepting the walk that the findAccessedStorage walker does, we can find the exact borrow
    that appeared along a certain access, so we don't need to limit ourselves to a singly-borrowed
    base.
    jckarter committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    97d15f6 View commit details
    Browse the repository at this point in the history
  55. [Sema] Produce a type-checked AST when deriving the hashValue getter.

    Should fix rdar://problem/54712316, a case where the non-type-checked
    AST was getting processed by SILGen.
    DougGregor committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    eb217bf View commit details
    Browse the repository at this point in the history
  56. Merge pull request swiftlang#26937 from rintaro/syntaxparse-leakfix

    [SyntaxParse] Fix memory leaks
    rintaro authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    e49401b View commit details
    Browse the repository at this point in the history
  57. Merge pull request swiftlang#26940 from nkcsgexi/populate-attribute

    ABI/API checker: populate several lazily computed attributes to nodes
    nkcsgexi authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    50147c4 View commit details
    Browse the repository at this point in the history
  58. Revert "[CSDiagnostics] Do not crash when the path is empty and we ha…

    …ve a call expression"
    
    This reverts commit c904a59.
    theblixguy committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    faf6ba0 View commit details
    Browse the repository at this point in the history
  59. Merge pull request swiftlang#26943 from rintaro/syntaxparse-parsedraw…

    …node-dump
    
    [SyntaxParse] Improve ParsedRawSyntaxNode::dump()
    rintaro authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    d0d89fa View commit details
    Browse the repository at this point in the history
  60. fix test/stdlib/ElementaryFunctions.swift.gyb

    Marc Rasi committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    ce40f0c View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    86807ac View commit details
    Browse the repository at this point in the history
  62. Stop hiding '@Frozen' from code completion (swiftlang#26942)

    And print it explicitly on imported NS_CLOSED_ENUMs.
    jrose-apple authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    6e25fd9 View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    67e7eba View commit details
    Browse the repository at this point in the history
  64. Merge pull request swiftlang#26865 from slavapestov/faster-module-nam…

    …e-lookup
    
    Faster module name lookup
    slavapestov authored Aug 29, 2019
    Configuration menu
    Copy the full SHA
    af30902 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    7aad090 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2019

  1. [semantic-arc-opts] Change semantic arc opts to use a SmallBlotSetVec…

    …tor instead of a SmallSetVector.
    
    Blotting is a trick with Map/Set vectors that involves one assigning None to the
    vector at the index mapped to an entry instead of deleting the entry itself from
    the vector. This ensures that we do not need to move elements of the vector down
    when erasing elements from the worklist.
    gottesmm committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    dee2627 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    02d6075 View commit details
    Browse the repository at this point in the history
  3. [Sema] Fix protocol refinement access control message (swiftlang#26855)

    Previously, the protocol refinement access control error
    would always assume a protocol was being refined. Change it
    to instead refer to the appropriate declaration kind.
    
    Resolves SR-9195
    owenv authored and jrose-apple committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    9222dfd View commit details
    Browse the repository at this point in the history
  4. [CSSimplify] Return failure if there are no elements in the path and …

    …the anchor does not point towards an AssignExpr
    theblixguy committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    3eea861 View commit details
    Browse the repository at this point in the history
  5. Merge pull request swiftlang#26831 from theblixguy/fix/SR-10492

    [AST] Paren'd reference to an IUO function crashes the compiler in SILGen
    theblixguy authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    4126215 View commit details
    Browse the repository at this point in the history
  6. Merge pull request swiftlang#26896 from jckarter/accessed-storage-cha…

    …in-visitor
    
    [WIP] Visitor for AccessedStorage use-def chain walk
    jckarter authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    c0ec48c View commit details
    Browse the repository at this point in the history
  7. Merge pull request swiftlang#26744 from weissi/jw-bench-find-string

    benchmark: add naive string finding
    gottesmm authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    d128664 View commit details
    Browse the repository at this point in the history
  8. Merge pull request swiftlang#26945 from gottesmm/pr-380b7ca9a019868d2…

    …a9fe0de564bfbaabcabe894
    
    [semantic-arc-opts] Change semantic arc opts to use a SmallBlotSetVec…
    gottesmm authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    5085e45 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c226eaa View commit details
    Browse the repository at this point in the history
  10. [semantic-arc] Rename isWrittenTo -> isLoadGuaranteedByStorage.

    NFC.
    
    This reflects what the method /actually/ does.
    gottesmm committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    dbf84f3 View commit details
    Browse the repository at this point in the history
  11. [semantic-arc] Rename isConsumed -> isDeadLiveRange.

    Also, eliminate some bitrot from comments.
    gottesmm committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    225c3f8 View commit details
    Browse the repository at this point in the history
  12. [SyntaxParse] Don't parse postfix if faield to parse type identifier

    Fixes crashing regress in code-completion
    rintaro committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    23fe5ed View commit details
    Browse the repository at this point in the history
  13. Fix ASTScope PatternEntryDeclScope::beCurrent typo

    David Ungar committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    f5f0101 View commit details
    Browse the repository at this point in the history
  14. Merge pull request swiftlang#26950 from gottesmm/pr-58d8dce3519c33f66…

    …b6246c0c796e87e6e817744
    swift-ci authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    7f26004 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    75d482a View commit details
    Browse the repository at this point in the history
  16. Merge pull request swiftlang#26944 from theblixguy/fix/SR-11394

    [CSDiagnostics] Fix a crasher in MissingContextualConformanceFailure
    theblixguy authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    9121f45 View commit details
    Browse the repository at this point in the history
  17. Merge pull request swiftlang#26930 from eeckstein/fix-test

    tests: fix the commandline for the optionset test
    eeckstein authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    be20957 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    fd86e85 View commit details
    Browse the repository at this point in the history
  19. Merge pull request swiftlang#26954 from apple/revert-26913-mandatory-…

    …combiner
    
    Revert "[SILOptimizer] Added MandatoryCombiner."
    eeckstein authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    7ea48a8 View commit details
    Browse the repository at this point in the history
  20. Merge pull request swiftlang#26938 from compnerd/star

    build: dereference variable as appropriate
    compnerd authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    4fa3cef View commit details
    Browse the repository at this point in the history
  21. Simplify lazy parsing of nominal and extension members.

    Lazy parsing for the members of nominal types and extensions depends
    only on information already present in
    `IterableDeclContext`. Eliminate the use of PersistentParserState as
    an intermediary and have the member-parsing request construct a new
    `Parser` instance itself to handle parsing. Make this possible even
    for ill-formed nominal types/extensions to simplify the code path.
    
    Eliminate `LazyMemberParser` and all of its uses, because it was only
    present for lazy member parsing, which no longer needs it.
    DougGregor committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    1196984 View commit details
    Browse the repository at this point in the history
  22. Add PersistentParserState constructor back for LLDB.

    This is to avoid having to sychronize PRs across LLDB and Swift.
    DougGregor committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    0989943 View commit details
    Browse the repository at this point in the history
  23. Remove unnecessary assertion

    There's no reason not to do delayed member parsing for SIL files.
    DougGregor committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    879d617 View commit details
    Browse the repository at this point in the history
  24. Merge pull request swiftlang#26952 from rintaro/syntaxparse-type-fail…

    …edpostfix
    
    [SyntaxParse] Don't parse postfix if faield to parse type identifier
    rintaro authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    987b856 View commit details
    Browse the repository at this point in the history
  25. Merge pull request swiftlang#26951 from gottesmm/pr-b8323b758c1b08c4a…

    …a81aef51c8cc675f2d0acae
    
    [semantic-arc] Rename isConsumed -> isDeadLiveRange.
    gottesmm authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    88f8592 View commit details
    Browse the repository at this point in the history
  26. Ensure we have type-checked _hashValue(for:) before we use it.

    Otherwise, the standard library won't build ;)
    DougGregor committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    7ca5abd View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    acba675 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    eb4d0ee View commit details
    Browse the repository at this point in the history
  29. Revert "[semantic-arc] Rename isWrittenTo -> isLoadGuaranteedByStorage."

    This reverts commit dbf84f3.
    
    I closed the PR, but swift-ci merged anyways. The change was just a rename.
    gottesmm committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    022d3a5 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    53bad9e View commit details
    Browse the repository at this point in the history
  31. Merge pull request swiftlang#26795 from theblixguy/fix/SR-11288

    [Typechecker] Check conforming protocols of context when resolving a custom attribute
    theblixguy authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    d219829 View commit details
    Browse the repository at this point in the history
  32. Merge pull request swiftlang#26959 from gottesmm/pr-0f450ce44620c8285…

    …1110ae19f7d52708f6089d1
    swift-ci authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    962c9d2 View commit details
    Browse the repository at this point in the history
  33. Merge pull request swiftlang#26941 from xedin/req-failures-with-any

    [Diagnostics] Treat type requirement failures associated with `Self` …
    xedin authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    c16b888 View commit details
    Browse the repository at this point in the history
  34. swift-api-checker.py: teach the script to generate target-specific ba…

    …seline for a single module
    
    This allows us to generate baselines for the Swift stdlib using an Xcode release.
    nkcsgexi committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    d093296 View commit details
    Browse the repository at this point in the history
  35. [NFC] Make DeclName::dump() and ObjCSelector::dump() work

    They were being stripped out of builds as dead code.
    beccadax committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    0e8d600 View commit details
    Browse the repository at this point in the history
  36. Merge pull request swiftlang#26963 from nkcsgexi/collect-baseline-module

    swift-api-checker.py: teach the script to generate target-specific baseline for a single module
    nkcsgexi authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    c1e41a3 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    deec505 View commit details
    Browse the repository at this point in the history
  38. Merge pull request swiftlang#26955 from DougGregor/simplify-lazy-memb…

    …er-parsing
    
    Simplify lazy member parsing
    DougGregor authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    7e21c16 View commit details
    Browse the repository at this point in the history
  39. cmake: symlink framework ABI baseline data into the build directory

    When running the ABI checker from the build artifact, the executable
    should be able to find baselines in the same relative paths as if
    it's running from a toolchain.
    nkcsgexi committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    4f7ade9 View commit details
    Browse the repository at this point in the history
  40. [IDE] Disable constraint system diagnostics during code completion

    It seems disabling diagnstics doesn't introduce any regression.
    
    rdar://problem/50679428
    rintaro authored and Nathan Hawes committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    242699f View commit details
    Browse the repository at this point in the history
  41. [Sema] Cosolidate suppress diagnostics mechanisms

    TypeCheckExprFlags::SuppressDiagnostics is now done by
    DiagnosticSuppression.
    rintaro authored and Nathan Hawes committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    f11cc97 View commit details
    Browse the repository at this point in the history
  42. Revert "[code-completion] Disable diagnostics in @functionBuilder bod…

    …ies"
    
    This reverts commit c6eade1.
    rintaro authored and Nathan Hawes committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    8bd9fde View commit details
    Browse the repository at this point in the history
  43. [code-completion] Fix correctness regressions from disabling diagnost…

    …ics in code completion
    
    There were some changes to completion results because AST mutations that were
    made while diagnosing are no longer happening.
    
    This patch 1) changes expression type checking to allow unresolved types when
    solving constraint systems, so we get a solution and apply its types in more
    cases, and 2) fixes a parsing issue where we would drop a ternary expression
    completely if the code completion point was in its true branch.
    Nathan Hawes committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    feb48a6 View commit details
    Browse the repository at this point in the history
  44. Merge pull request swiftlang#26946 from DougGregor/synthesize-pre-typ…

    …e-checked
    
    [Sema] Synthesize pre-type-checked ASTs for more derived conformances
    DougGregor authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    dccca2f View commit details
    Browse the repository at this point in the history
  45. Merge pull request swiftlang#26966 from nkcsgexi/cmake-abi-baseline-data

    cmake: symlink framework ABI baseline data to the build directory
    nkcsgexi authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    08c943d View commit details
    Browse the repository at this point in the history
  46. Merge pull request swiftlang#26815 from ravikandhadai/oslog-integer-t…

    …ypes
    
    [oslog][stdlib-private] Refactor and generalize interpolation of Int type in the new os_log APIs so as to extend to other integer types.
    ravikandhadai authored Aug 30, 2019
    Configuration menu
    Copy the full SHA
    dcd0893 View commit details
    Browse the repository at this point in the history
  47. Add a request to lazily parse function bodies.

    Rework the lazy function body parsing mechanism to use the
    request-evaluator, so that asking for the body of a function will
    initiate parsing. Clean up a number of callers to
    AbstractFunctionDecl::getBody() that don't actually need the body, so
    we don't perform unnecessary parsing.
    
    This change does not delay parsing of function bodies in the general
    case; rather, it sets up the infrastructure to always delay parsing of
    function bodies.
    DougGregor committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    2ab05a6 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    bd53fe3 View commit details
    Browse the repository at this point in the history
  49. typecheck DifferentiableAttr in non-primary files

    Marc Rasi committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    e7feb22 View commit details
    Browse the repository at this point in the history
  50. adjust test expectations for the merge

    Marc Rasi committed Aug 30, 2019
    Configuration menu
    Copy the full SHA
    22aac13 View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2019

  1. update update-checkout-config for merge

    Marc Rasi committed Aug 31, 2019
    Configuration menu
    Copy the full SHA
    b1c08de View commit details
    Browse the repository at this point in the history
  2. Merge pull request swiftlang#26888 from nathawes/pr-disable-diagnosti…

    …cs-for-code-completion-2
    swift-ci authored Aug 31, 2019
    Configuration menu
    Copy the full SHA
    ed0d5dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2ad0360 View commit details
    Browse the repository at this point in the history
  4. Merge pull request swiftlang#26964 from brentdax/dump-rump

    [NFC] Make DeclName::dump() and ObjCSelector::dump() work
    beccadax authored Aug 31, 2019
    Configuration menu
    Copy the full SHA
    5d4b151 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    60a5564 View commit details
    Browse the repository at this point in the history
  6. Merge pull request swiftlang#26972 from DougGregor/request-function-b…

    …ody-parse
    
    Add a request to lazily parse function bodies.
    DougGregor authored Aug 31, 2019
    Configuration menu
    Copy the full SHA
    7ce3553 View commit details
    Browse the repository at this point in the history
  7. Merge pull request swiftlang#26958 from gottesmm/pr-266cfd499d8b73f2e…

    …36fbf2ce23b72aa89097910
    
    [semantic-arc] Invert a condition so that the early exit is first.
    gottesmm authored Aug 31, 2019
    Configuration menu
    Copy the full SHA
    bcf93c6 View commit details
    Browse the repository at this point in the history
  8. [semantic-arc-opts] Teach load [copy] -> load_borrow about forwarding…

    … instructions.
    
    I implemented this some time ago for copy_value, but I (IIRC due to time) did
    not enable it for the load [copy] optimization. Specifically now we should be
    able to optimize this:
    
    ```
    %ref = ref_element_addr %guaranteedArg
    %0a = load [copy] %ref
    %0b = unchecked_ref_cast %0a
    destroy_value %0b
    ```
    
    ->
    
    ```
    %ref = ref_element_addr %guaranteedArg
    %0a = load_borrow %guaranteedArg
    %0b = unchecked_ref_cast %0a
    end_borrow %0a
    ```
    gottesmm committed Aug 31, 2019
    Configuration menu
    Copy the full SHA
    df6ff7f View commit details
    Browse the repository at this point in the history
  9. swift-api-digester: teach the tool to find framework-specific baselin…

    …es from relative path
    
    The framework baselines are installed at 'lib/swift/FrameworkABIBaseline' and the
    tool is inside 'bin'. This patch teaches the executable to locate baselines
    from the relative path.
    
    In addition, this patch moves the stdlib ABI/API baselines to the canonical
    location so we don't have to check the stability of the stdlib using a
    different mechanism from other Swift frameworks.
    nkcsgexi committed Aug 31, 2019
    Configuration menu
    Copy the full SHA
    178e5d5 View commit details
    Browse the repository at this point in the history
  10. reset test to upstream state

    Marc Rasi committed Aug 31, 2019
    Configuration menu
    Copy the full SHA
    6e9477d View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    903eeb2 View commit details
    Browse the repository at this point in the history
  12. Merge pull request swiftlang#26978 from apple/revert-26972-request-fu…

    …nction-body-parse
    
    Revert "Add a request to lazily parse function bodies."
    eeckstein authored Aug 31, 2019
    Configuration menu
    Copy the full SHA
    a951a4f View commit details
    Browse the repository at this point in the history
  13. Merge pull request swiftlang#26956 from gottesmm/pr-26ba3ee6d03272d05…

    …9164d68ed32c67574fca737
    swift-ci authored Aug 31, 2019
    Configuration menu
    Copy the full SHA
    a5d7b72 View commit details
    Browse the repository at this point in the history
  14. Merge pull request swiftlang#26977 from nkcsgexi/api-digester-use-bui…

    …ltin-baseline
    
    swift-api-digester: teach the tool to find framework-specific baselines from relative path
    nkcsgexi authored Aug 31, 2019
    Configuration menu
    Copy the full SHA
    6b9133b View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    d576fc1 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8c5730a View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    95132fd View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    1cd5d2e View commit details
    Browse the repository at this point in the history
  19. Add a request to lazily parse function bodies.

    Rework the lazy function body parsing mechanism to use the
    request-evaluator, so that asking for the body of a function will
    initiate parsing. Clean up a number of callers to
    AbstractFunctionDecl::getBody() that don't actually need the body, so
    we don't perform unnecessary parsing.
    
    This change does not delay parsing of function bodies in the general
    case; rather, it sets up the infrastructure to always delay parsing of
    function bodies.
    DougGregor committed Aug 31, 2019
    Configuration menu
    Copy the full SHA
    d8b745d View commit details
    Browse the repository at this point in the history
  20. [Source loader] Delay parsing and type checking for source imports.

    Use the delayed parsing of function bodies for source imports, and
    switch source imports over to lazy type checking. There's no point in
    doing a full type check for them.
    DougGregor committed Aug 31, 2019
    Configuration menu
    Copy the full SHA
    9249966 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2019

  1. [Changelog] Add SE-0253: func callAsFunction. (swiftlang#26866)

    Changelog entry for SE-0253.
    Follow-up to implementation: swiftlang#24299.
    dan-zheng authored Sep 1, 2019
    Configuration menu
    Copy the full SHA
    9022437 View commit details
    Browse the repository at this point in the history
  2. Merge pull request swiftlang#26981 from DougGregor/request-function-b…

    …ody-parse-again
    
    Add a request to lazily parse function bodies.
    DougGregor authored Sep 1, 2019
    Configuration menu
    Copy the full SHA
    097b1b4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a50796e View commit details
    Browse the repository at this point in the history
  4. Merge pull request swiftlang#26983 from apple/revert-26956-pr-26ba3ee…

    …6d03272d059164d68ed32c67574fca737
    
    Revert "[semantic-arc-opts] Teach load [copy] -> load_borrow about forwarding…"
    eeckstein authored Sep 1, 2019
    Configuration menu
    Copy the full SHA
    2570af6 View commit details
    Browse the repository at this point in the history
  5. Revert "swift-api-digester: teach the tool to find framework-specific…

    … baselines from relative path"
    eeckstein authored Sep 1, 2019
    Configuration menu
    Copy the full SHA
    63a3cee View commit details
    Browse the repository at this point in the history
  6. Merge pull request swiftlang#26984 from apple/revert-26977-api-digest…

    …er-use-builtin-baseline
    
    Revert "swift-api-digester: teach the tool to find framework-specific baselines from relative path"
    eeckstein authored Sep 1, 2019
    Configuration menu
    Copy the full SHA
    12b33f6 View commit details
    Browse the repository at this point in the history
  7. Revert "Revert "swift-api-digester: teach the tool to find framework-…

    …specific baselines from relative path""
    nkcsgexi committed Sep 1, 2019
    Configuration menu
    Copy the full SHA
    cc6a246 View commit details
    Browse the repository at this point in the history
  8. Parse: repair build after swiftlang#26981

    The build on Windows has been failing due to the ambiguous constructor
    overload:
    
    ```
    lib\Parse\ParseRequests.cpp(83): error C2666: 'swift::Parser::Parser': 2 overloads have similar conversions
    include\swift\Parse\Parser.h(412): note: could be 'swift::Parser::Parser(std::unique_ptr<swift::Lexer,std::default_delete<_Ty>>,swift::SourceFile &,swift::SILParserTUStateBase *,swift::PersistentParserState *,std::shared_ptr<swift::SyntaxParseActions>,bool)'
            with
            [
                _Ty=swift::Lexer
            ]
    include\swift\Parse\Parser.h(408): note: or       'swift::Parser::Parser(unsigned int,swift::SourceFile &,swift::SILParserTUStateBase *,swift::PersistentParserState *,std::shared_ptr<swift::SyntaxParseActions>,bool)'
    include\swift\Parse\Parser.h(403): note: or       'swift::Parser::Parser(unsigned int,swift::SourceFile &,swift::DiagnosticEngine *,swift::SILParserTUStateBase *,swift::PersistentParserState *,std::shared_ptr<swift::SyntaxParseActions>,bool)'
    lib\Parse\ParseRequests.cpp(84): note: while trying to match the argument list '(unsigned int, swift::SourceFile, nullptr, nullptr, nullptr, bool)'
    ```
    compnerd committed Sep 1, 2019
    Configuration menu
    Copy the full SHA
    b1dc288 View commit details
    Browse the repository at this point in the history
  9. Merge pull request swiftlang#26985 from apple/revert-26984-revert-269…

    …77-api-digester-use-builtin-baseline
    
    Re-apply "swift-api-digester: teach the tool to find framework-specific baselines from relative path"
    nkcsgexi authored Sep 1, 2019
    Configuration menu
    Copy the full SHA
    af45d00 View commit details
    Browse the repository at this point in the history
  10. Merge pull request swiftlang#26986 from compnerd/26981

    Parse: repair build after swiftlang#26981
    compnerd authored Sep 1, 2019
    Configuration menu
    Copy the full SHA
    7e5e00a View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2019

  1. Merge branch 'tensorflow' into tensorflow-merge

    Marc Rasi committed Sep 2, 2019
    Configuration menu
    Copy the full SHA
    caa4435 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2019

  1. update lldb commit hash (swiftlang#27001)

    marcrasi authored Sep 3, 2019
    Configuration menu
    Copy the full SHA
    9b788c7 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2019

  1. update lldb commit hash (swiftlang#27009)

    This brings in the changes from apple/swift-lldb#1961.
    marcrasi authored Sep 4, 2019
    Configuration menu
    Copy the full SHA
    726d619 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a262a68 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2019

  1. Remove dependency on libtensorflow_framework.so. (swiftlang#27029)

    Remove libtensorflow_framework.so as a build product.
    This reduces toolchain size.
    
    Follow-up attempt to swiftlang#20898.
    dan-zheng authored Sep 5, 2019
    Configuration menu
    Copy the full SHA
    d67c913 View commit details
    Browse the repository at this point in the history
  2. update lldb commit hash

    Marc Rasi committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    b32d41e View commit details
    Browse the repository at this point in the history
  3. Merge branch 'tensorflow' into tensorflow-merge

    Marc Rasi committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    2cb26e3 View commit details
    Browse the repository at this point in the history
  4. Merge pull request swiftlang#26992 from apple/tensorflow-merge

    merge swift-DEVELOPMENT-SNAPSHOT-2019-08-22-a into tensorflow
    marcrasi authored Sep 5, 2019
    Configuration menu
    Copy the full SHA
    0d6cb12 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2019

  1. Optimize toolchain size by preserving TensorFlow library symlinks. (s…

    …wiftlang#27032)
    
    Bazel produces multiple TensorFlow library artifacts:
    ```
    $ ls -alh tensorflow/bazel-bin/tensorflow
     18B libtensorflow.so -> libtensorflow.so.1
     23B libtensorflow.so.1 -> libtensorflow.so.1.14.0
    277M libtensorflow.so.1.14.0
    ```
    
    Previously, TensorFlow libraries were copied using `cp -a` via a glob
    pattern. For some reason, symlinks were not preserved:
    ```
    $ ls -alh <TOOLCHAIN_BEFORE>.xctoolchain/usr/lib/swift/macosx
     18B libtensorflow.so -> libtensorflow.so.1
    277M libtensorflow.so.1
    277M libtensorflow.so.1.14.0 # duplicate library
    ```
    
    Now, rather than copying all libraries via glob,
    `copy_file_preserving_symlinks` copies exactly the necessary source
    files to the destination while preserving symlinks:
    ```
    $ ls -alh <TOOLCHAIN_AFTER>.xctoolchain/usr/lib/swift/macosx
     18B libtensorflow.so -> libtensorflow.so.1
    277M libtensorflow.so.1
    ```
    
    This combined with removing libtensorflow_framework.so dependency
    (swiftlang#27029) led to a macOS toolchain
    size reduction from 4.91 GB to 3.45 GB.
    dan-zheng authored and pschuh committed Sep 6, 2019
    Configuration menu
    Copy the full SHA
    2de0021 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2019

  1. Merge tag 'swift-DEVELOPMENT-SNAPSHOT-2019-09-02-a' into tensorflow-m…

    …erge
    
    Tag build swift-DEVELOPMENT-SNAPSHOT-2019-09-02-a
    Marc Rasi committed Sep 9, 2019
    Configuration menu
    Copy the full SHA
    30cdf50 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8a50e80 View commit details
    Browse the repository at this point in the history
  3. Update dependencies to new snapshot version 'swift-DEVELOPMENT-SNAPSH…

    …OT-2019-09-02-a'
    Marc Rasi committed Sep 9, 2019
    Configuration menu
    Copy the full SHA
    485c1ef View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2019

  1. fix some merge compile errors

    Marc Rasi committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    f35e10d View commit details
    Browse the repository at this point in the history
  2. refactor AutoDiff changes in BuiltinGenericSignatureBuilder to work w…

    …ith the AbstractGenericSignatureRequest
    Marc Rasi committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    2730ba0 View commit details
    Browse the repository at this point in the history
  3. remove @_transparent from Array.init(arrayLiteral:)

    It causes SwiftOnoneSupport to fail to compile, with error "swift:
    /usr/local/google/home/marcrasi/swift-merge/swift/lib/SILOptimizer/Utils/Generics.cpp:1864:
    swift::SILFunction
    *swift::GenericFuncSpecializer::tryCreateSpecialization(): Assertion
    `!SpecializedF->hasOwnership()' failed."
    
    Since we don't depend on constexpr any more, this removal shouldn't
    break anything.
    Marc Rasi committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    fb306d7 View commit details
    Browse the repository at this point in the history
  4. Bring ElementaryFunctions back to tensorflow

    This reverts commit d80b1d3.
    Marc Rasi committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    6a6ffa5 View commit details
    Browse the repository at this point in the history
  5. refactor type parsing to use new API

    Marc Rasi committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    84b2857 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7e89bee View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2019

  1. Merge pull request swiftlang#27091 from gottesmm/pr-4e08bfd476fc6b39e…

    …e3e81032ed3ccaae7417568
    swift-ci authored and Ewa Matejska committed Sep 11, 2019
    Configuration menu
    Copy the full SHA
    319f8be View commit details
    Browse the repository at this point in the history
  2. These files were renamed or not contributed as part of [SE-0253] Intr…

    …oduce callables. (swiftlang#24299).  They are duplicates.
    ematejska committed Sep 11, 2019
    Configuration menu
    Copy the full SHA
    c47e6a8 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2019

  1. Configuration menu
    Copy the full SHA
    dd4fd33 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2019

  1. Companion fix to: swiftlang#26776

    pschuh committed Sep 14, 2019
    Configuration menu
    Copy the full SHA
    e4144e9 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2019

  1. Configuration menu
    Copy the full SHA
    9dc2ca1 View commit details
    Browse the repository at this point in the history
  2. [AutoDiff] Fix 'autodiff_function_extract' operand ownership kind and…

    … memory leaks. (swiftlang#27199)
    
    The `autodiff_function_extract` instruction behaves like `tuple_extract`, where it extracts some element from an aggregate. Its operand should have the same ownership kind as that of `tuple_extract`. That is, it should be defined as `CONSTANT_OR_TRIVIAL_OWNERSHIP_INST(Guaranteed, AutoDiffFunctionInst)` in ValueOwnershipKindClassifier.
    
    However, this is currently defined wrongly as `FORWARDING_OWNERSHIP_INST(AutoDiffFunctionExtract)`, which caused a bug in the differentiation transform to be uncaught: VJPEmitter and JVPEmitter in the differentiation transform is performing `autodiff_function_extract` on an `@owned` `@differentiable` function, which caused associated functions that are not extracted to be not released:
    
    ```
    %f = autodiff_function %original
    %f_vjp = autodiff_function_extract [vjp] %f
    ... // %f is not released, and not caught by ownership verification!
    ```
    
    After we fix the operand ownership kind for `autodiff_function_extract`, all these cases are now caught by ownership verification. The reproducer in [TF-795](https://bugs.swift.org/browse/TF-795) and most differentiation tests are failing to compile because ownership verification caught the bug in AD-generated code. The existing AD test suite is serving as good test cases for this ownership error.
    
    To fix this, VJPEmitter and JVPEmitter are now changed to emit borrows of `@differentiable` functions and copies of associated functions and property destroying the `@differentiable` function:
    
    ```
    %f = autodiff_function %original
    %f_borrowed = begin_borrow %f
    %f_vjp_extracted = autodiff_function_extract [vjp] %f_borrowed
    %f_vjp = copy_value %f_vjp_extracted
    end_borrow %f_borrowed
    destroy_value %f
    ```
    
    Fixes [TF-795](https://bugs.swift.org/browse/TF-795).
    rxwei authored Sep 16, 2019
    Configuration menu
    Copy the full SHA
    0641a22 View commit details
    Browse the repository at this point in the history
  3. Make ElementaryFunctions available on macOS.

    Filed TF-796 with more context.
    dan-zheng committed Sep 16, 2019
    Configuration menu
    Copy the full SHA
    b42dd7c View commit details
    Browse the repository at this point in the history
  4. [Sema] Fix Differentiable.TangentVector derived conformances.

    Fix logic for deriving `VectorProtocol` for derived `TangentVector` struct.
    dan-zheng committed Sep 16, 2019
    Configuration menu
    Copy the full SHA
    9a7c32a View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2019

  1. [TF] Set default RPATH to toolchain stdlib instead of `/usr/lib/swift…

    …` on macOS. (swiftlang#27206)
    
    Previously, the default RPATH was set to `/usr/lib/swift`.
    This caused linker issues on macOS, as tensorflow-branch-specific modules like
    TensorFlow and Python do not exist in `/usr/lib/swift`.
    
    This patch defaults the `-toolchain-stdlib-rpath` flag to be true, so the
    default RPATH is the toolchain standard library instead of `/usr/lib/swift`.
    
    With this default, the linker issues are fixed. A `-no-toolchain-stdlib-path`
    flag is added to opt out of this default, making `/usr/lib/swift` the RPATH.
    
    Add positive/negative tests.
    `swift test` works on macOS for packages that import/use TensorFlow again.
    
    Partially reverts swiftlang#24787.
    Resolves TF-797.
    dan-zheng authored Sep 17, 2019
    Configuration menu
    Copy the full SHA
    b45f2db View commit details
    Browse the repository at this point in the history
  2. Update README to use clean command in Build Failures (swiftlang#17069) (

    swiftlang#27217)
    
    The `--rebuild` flag has been renamed to `--clean`.
    vguerra authored and dan-zheng committed Sep 17, 2019
    Configuration menu
    Copy the full SHA
    5a39e90 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2019

  1. Bring this Float80 availability check up to date. (swiftlang#27144)

    It had gotten out-of-sync with the equivalent check in
    stdlib/public/core/FloatingPointTypes.swift.gyb, so this change
    copies it verbatim from there.
    allevato authored and dan-zheng committed Sep 18, 2019
    Configuration menu
    Copy the full SHA
    cf557ab View commit details
    Browse the repository at this point in the history
  2. Fix AutoDiff/differentiable_attr_type_checking.swift.

    Previously, `ProtocolConformanceRef::getTypeWitnessByName` returned a null type.
    Now, it returns a dependent member type with an error base type:
    
    ```
    (dependent_member_type assoc_type=Swift.(file).Differentiable.TangentVector
      (base=error_type
        (original_type=bound_generic_struct_type decl=main.(file).TF_521@tf-521.swift:1:8
          (primary_archetype_type address=0x7fe08d860660
                                  conforms_to=Swift.(file).Differentiable
                                  conforms_to=Swift.(file).FloatingPoint name=T
            (nested_type=Exponent <<unresolved>>)
            (nested_type=IntegerLiteralType <<unresolved>>)
            (nested_type=Magnitude <<unresolved>>)
            (nested_type=Stride <<unresolved>>)
            (nested_type=TangentVector =T)))))
    ```
    
    Explicitly check whether types have error in `conformsToDifferentiable`.
    dan-zheng committed Sep 18, 2019
    Configuration menu
    Copy the full SHA
    6d51923 View commit details
    Browse the repository at this point in the history
  3. Workaround for test/AutoDiff/array.swift.

    `-Xfrontend -enable-ownership-stripping-after-serialization` for swiftCore
    causes test/AutoDiff/array.swift to crash (regarding calls to
    `Array.recursivelyAllKeyPaths`).
    
    SR-11336 seems related and is reproducible from master.
    Disabling flag for swiftCore (and all other standard library modules) until
    SR-11336 is resolved.
    
    Temporarily disable affected test SILOptimizer/pound_assert.swift.
    TF-799 tracks re-enabling the test.
    dan-zheng committed Sep 18, 2019
    Configuration menu
    Copy the full SHA
    f3c7cca View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e60269b View commit details
    Browse the repository at this point in the history
  5. Merge pull request swiftlang#27232 from apple/tensorflow-merge

    Merge tag 'swift-DEVELOPMENT-SNAPSHOT-2019-09-02-a' into tensorflow
    ematejska authored Sep 18, 2019
    Configuration menu
    Copy the full SHA
    c4d9eb4 View commit details
    Browse the repository at this point in the history
  6. Reduce toolchain size by preserving TensorFlow library symlinks. (swi…

    …ftlang#27233)
    
    Bazel produces multiple TensorFlow library artifacts:
    ```
    $ ls -alh tensorflow/bazel-bin/tensorflow
     18B libtensorflow.so -> libtensorflow.so.1
     23B libtensorflow.so.1 -> libtensorflow.so.1.14.0
    277M libtensorflow.so.1.14.0
    ```
    
    Previously, TensorFlow libraries were copied via `cp -p`.
    This did not preserve symlinks, leading to library duplication:
    ```
    $ ls -alh <TOOLCHAIN_BEFORE>.xctoolchain/usr/lib/swift/macosx
     18B libtensorflow.so -> libtensorflow.so.1
    277M libtensorflow.so.1
    277M libtensorflow.so.1.14.0 # duplicate library
    ```
    
    Now, `cp -a` is used, which preserves symlinks:
    ```
    $ ls -alh <TOOLCHAIN_AFTER>.xctoolchain/usr/lib/swift/macosx
     18B libtensorflow.so -> libtensorflow.so.1
    277M libtensorflow.so.1
    ```
    
    This combined with removing libtensorflow_framework.so dependency
    (swiftlang#27029) led to a macOS toolchain
    size reduction from 3.99 GB to 3.62 GB on the tensorflow-0.5 branch.
    dan-zheng authored Sep 18, 2019
    Configuration menu
    Copy the full SHA
    3c2d5d1 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2019

  1. Merge branch 'tensorflow' of github.com:apple/swift into differential…

    …-emitter-generic-support
    dan-zheng committed Sep 19, 2019
    Configuration menu
    Copy the full SHA
    f2540db View commit details
    Browse the repository at this point in the history
  2. Disabled non-varied result warning.

    Follow-up to swiftlang#26928 for reverse-mode.
    TF-788 tracks re-enabling the warning.
    dan-zheng committed Sep 19, 2019
    Configuration menu
    Copy the full SHA
    82e9605 View commit details
    Browse the repository at this point in the history
  3. Differential generation fixes.

    - Handle `copy_value` and `destroy_addr` in "should differentiate" logic.
      These should be visited if they have an active operand.
    - Add differential visitors for `destroy_value` and `destroy_addr`.
    dan-zheng committed Sep 19, 2019
    Configuration menu
    Copy the full SHA
    73f1176 View commit details
    Browse the repository at this point in the history
  4. Cleanup: simplify getSingleDestructureTupleUser.

    Remove precondition that argument must be tuple-typed to simplify call sites.
    Clean up call site code and doc comments.
    dan-zheng committed Sep 19, 2019
    Configuration menu
    Copy the full SHA
    c5ebacc View commit details
    Browse the repository at this point in the history
  5. Cleanup: add todo comments referencing TF-800.

    TF-800 tracks special-case activity analysis and "should differentiate" logic
    regarding tuple-typed `apply` results.
    dan-zheng committed Sep 19, 2019
    Configuration menu
    Copy the full SHA
    9ed9448 View commit details
    Browse the repository at this point in the history
  6. Assorted cleanup.

    dan-zheng committed Sep 19, 2019
    Configuration menu
    Copy the full SHA
    d3155ed View commit details
    Browse the repository at this point in the history