- 
                Notifications
    
You must be signed in to change notification settings  - Fork 10.6k
 
Merge tag 'swift-DEVELOPMENT-SNAPSHOT-2019-09-30-a' into tensorflow #27478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    I'm not sure this code ever worked, but this new version does. Also includes some style revisions to the surrounding text.
Doing so prevented the coercion of a function with argument labels to a user-written function type, as the latter cannot contain argument labels. This commit changes the behaviour such that the referenced function is considered to be unapplied, meaning it has its argument labels stripped, therefore allowing the coercion. Resolves SR-11429.
Added getAllLeafTypes to ProjectionTree. The new method vends, via an out paramter, a vector containing the types of all the leaves in a projection tree in the order that they appear. The method relies uses a new convenience on ProjectionTreeNode, isLeaf to include only the types of those nodes which are leaves. Excerpted from @GottesM's #16756.
Added getUsers to ProjectionTree. The new method vands, via an out parameter, a set of all the users of all of the nodes in the projection tree that are themselves not in the projection tree by way of getNonProjUsers. Took this opportunity to tweak getNonProjUsers to vend a const ArrayRef rather than a SmallVector. Excerpted from @GottesM's #16756.
Added brief doc for FunctionSignatureOpts' ArgumentDescriptor's method canOptimizeLiveArg and tweaked the style to add braces around the body of a single line if clause.
The command-line option for sil-fso-enable-generics was previously visible outside the FunctionSignatureOpts translation unit. It is not any longer.
The new flag -sil-fso-optimize-if-not-called forced function signature optimization to run even on functions which are not called. Doing so is helpful for tests to alleviate the burden of writing code to actually call a function in whose function signature optimization we are interested.
…ectory which use %target-sil-opt. This causes problems if some lit systems don't recognize %sil-opt and only recognize %target-sil-opt. Updating for consistency.
…nostic Since we are about to start diagnosing more than just closures, we need information about what synthesized arguments look like.
…dex of synthesized argument In diagnostic mode allow argument matcher to synthesize new arguments, which makes it much easier to diagnose problems related to missing arguments.
Diagnose situation when parameter type expects N arguments
but argument has `M` where `M` < `N`, e.g.:
```swift
func foo(_: (Int) -> Void) {}
func bar() -> Void {}
foo(bar) // expected 1 argument, got 0
```
    Function type has fewer arguments than expected by context:
```swift
func foo() {}
let _: (Int) -> Void = foo // expected 1 argument, got 0
```
    … distinct arguments
Diagnose cases when instead of multiple distinct arguments
call got a single tuple argument with expected arity/types:
```swift
func foo(_: Int, _: Int) {}
foo((0, 1)) // expected 2 arguments, got 1 tuple with 2 elements
```
    If call is missing a single argument we can provide a tailored diagnostic and suggest a fix-it to add it at the appropriate position.
… assign_by_wrapper. Fixes a crash when a function, which assigns to a wrapped property has additional generic parameters. https://bugs.swift.org/browse/SR-11484 rdar://problem/55442328
…pped value Teach SILGen to emit a separate SIL function to capture the initialization of the backing storage type for a wrapped property based on the wrapped value. This eliminates manual code expansion at every use site.
Use the newly-introduced property wrapper backing initializer function in definite initialization (DI) to form the assign_by_wrapper instruction, rather than forming a reference to the (only) property wrapper's `init(wrappedValue:)`. This allows DI to work on properties that have multiple, composed property wrappers applied to them.
…lted args Generalize the type checking when searching for "wrappedValue" initializers to also allow initializers that have other, defaulted parameters as well.
…unning against a runtime that isn't part of the OS. rdar://problem/55727341
…-nominal-assertion Fail early if getExtendedNominal is called before extension has been bound.
…pointer MetadataReader: Add an API for reading absolute pointers.
[ClangImporter] Don't transform NSObject<...> when there's no NSObject protocol
… SILInstruction variants. The SILInstruction variant calls the SILValue version for each of its results.
[ClangImporter] In `shouldIgnoreMacro()` Use `Preprocessor::getSpellingOfSingleCharacterNumericConstant()` for determining if a macro is '1'
…b799b8f5c7ca02 [debug-utils] Split deleteAllDebugUses(ValueBase *) into SILValue and…
…0423ec9b63ac32 [apply-site] Refactor out a helper function called insertAfterApply -…
| 
           @swift-ci please test tensorflow  | 
    
| 
           @swift-ci please test tensorflow  | 
    
    
      
        1 similar comment
      
    
  
    | 
           @swift-ci please test tensorflow  | 
    
…27486) #27238 tightened debug info requirements, adding assertions to AllocStack and AllocBox constructors. This requires differentiation transform changes: - When cloning `alloc_stack` instructions that may have SILDebugVariable info, propagate the info. - This is relevant for `JVPEmitter::emitTangentForAllocStackInst`. - When using AllocStack for "local allocations" that do not correspond to user-written VarDecls, use `RegularLocation::getAutoGeneratedLocation()` as the location so that assertions do not trigger. - This is relevant for `PullbackEmitter::getAdjointBuffer`.
| 
           @swift-ci please test tensorflow  | 
    
              
                    dan-zheng
  
              
              approved these changes
              
                  
                    Oct 2, 2019 
                  
              
              
            
            
| 
           @swift-ci please test tensorflow  | 
    
| 
           @swift-ci please test tensorflow  | 
    
    
      
        1 similar comment
      
    
  
    | 
           @swift-ci please test tensorflow  | 
    
| 
           Due to some reason, CI refuses to run on macOS, but I can confirm that I ran tests successfully on my laptop.  | 
    
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
No description provided.