[swift-dev] Some feedback / direction on an issue?

2016-11-16 Thread Mark Woollard via swift-dev
Hi

I decided to see if I could contribute and started looking into what seemed it 
would be a straightforward issue in Foundation framework for Linux. After 
debugging this led me to conclude it seems to be a more fundamental issue, 
maybe with the compiler code generation, around exception handling wrt Linux. 
I’d be interested in some feedback / guidance on this - am happy to take 
ownership and see where I might get with it but have a lot of learning to do !

The initial issue I looked at was SR-1547 
 in Foundation but this I determined to 
be the same issue as SR-585 .

I’ve added some comments to these issues relating to my investigation. Anyone 
have any more insight into this issue or suggestions on where to look next ?

Thanks
Mark___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.10 (master) #525

2016-11-16 Thread Ankit Aggarwal via swift-dev
Tracking this here.

 PackageToolTests.testPinning : XCTAssertEqual failed: 
("5") is not equal to ("6")

> On 17-Nov-2016, at 2:57 AM, David Farler  wrote:
> 
> It looks like this test is failing periodically on this bot.
> 
> https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/519/ 
> 
> 
> https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/525/ 
> 
> 
> +Ankit, I believe you added l.172 in 
> Tests/CommandsTests/PackageToolTests.swift. Are you aware of any problems?
> 
> David
> 
>> On Nov 16, 2016, at 12:01 PM, no-re...@swift.org  
>> wrote:
>> 
>> [FAILURE] oss-swift-incremental-RA-linux-ubuntu-16_10 [#525]
>> 
>> Build URL:   
>> https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/525/ 
>> 
>> Project: oss-swift-incremental-RA-linux-ubuntu-16_10
>> Date of build:   Wed, 16 Nov 2016 11:48:38 -0800
>> Build duration:  13 min
>> Identified problems:
>> 
>> Compile Error: This build failed because of a compile error. Below is a list 
>> of all errors in the build log:
>> Indication 1 
>> 
>> Tests:
>> 
>> Name: Swift(linux-x86_64)
>> Failed: 0 test(s), Passed: 8565 test(s), Total: 8565 test(s)
>> Name: Swift-Unit
>> Failed: 0 test(s), Passed: 299 test(s), Total: 299 test(s)
>> 
>> Changes
>> 
>> Commit d6e2b58382147741cf4fcabd9cd0ca5a1cd2159f by dfarler:
>> Preserve whitespace and comments during lexing as Trivia
>> 
>> edit: lib/Sema/TypeCheckConstraints.cpp
>> edit: lib/Immediate/REPL.cpp
>> add: lib/Parse/Trivia.cpp
>> edit: lib/AST/ASTPrinter.cpp
>> edit: lib/IDE/CodeCompletion.cpp
>> add: include/swift/Syntax/Trivia.h
>> edit: lib/IDE/ModuleInterfacePrinting.cpp
>> edit: lib/AST/RawComment.cpp
>> edit: include/swift/AST/ASTContext.h
>> add: include/swift/Syntax/Syntax.h
>> edit: test/SourceKit/SyntaxMapData/syntaxmap-edit.swift.response
>> edit: include/swift/IDE/SyntaxModel.h
>> edit: lib/Parse/Parser.cpp
>> edit: lib/IDE/CommentConversion.cpp
>> edit: include/swift/Parse/Lexer.h
>> edit: test/IDE/comment_attach.swift
>> add: lib/Syntax/CMakeLists.txt
>> edit: lib/Parse/ParseGeneric.cpp
>> edit: test/SourceKit/SyntaxMapData/syntaxmap-pound-keyword.swift.response
>> edit: test/SourceKit/InterfaceGen/gen_swift_source.swift.response
>> edit: test/SourceKit/InterfaceGen/gen_header.swift.response
>> edit: lib/Parse/ParsePattern.cpp
>> edit: test/SourceKit/ExtractComment/Inputs/Comment1.swift
>> edit: test/SourceKit/InterfaceGen/gen_clang_module.swift.response
>> edit: lib/Parse/ParseStmt.cpp
>> edit: lib/ClangImporter/ImportType.cpp
>> delete: include/swift/Parse/Token.h
>> edit: test/IDE/coloring.swift
>> edit: unittests/Parse/TokenizerTests.cpp
>> edit: test/SourceKit/SyntaxMapData/syntaxmap-object-literals.swift.response
>> edit: lib/AST/ASTContext.cpp
>> edit: include/swift/Parse/Parser.h
>> edit: lib/Parse/ParseExpr.cpp
>> add: lib/Syntax/Syntax.cpp
>> edit: test/IDE/comment_merge.swift
>> edit: lib/Parse/ParseDecl.cpp
>> edit: test/SourceKit/SyntaxMapData/syntaxmap.swift.response
>> edit: include/swift/AST/Attr.h
>> edit: lib/Parse/ParseSIL.cpp
>> edit: test/IDE/coloring_playground.swift
>> edit: include/swift/Subsystems.h
>> edit: unittests/Parse/LexerTests.cpp
>> add: include/swift/Syntax/Token.h
>> edit: tools/swift-ide-test/swift-ide-test.cpp
>> edit: lib/Parse/ParseType.cpp
>> edit: lib/IDE/REPLCodeCompletion.cpp
>> edit: lib/CMakeLists.txt
>> edit: lib/IDE/Formatting.cpp
>> edit: test/SourceKit/DocSupport/doc_source_file.swift.response
>> add: include/swift/Basic/String.h
>> edit: lib/Parse/CMakeLists.txt
>> edit: test/Serialization/comments-framework.swift
>> edit: lib/Parse/Lexer.cpp
>> add: lib/Syntax/Token.cpp
>> edit: lib/IDE/SyntaxModel.cpp
>> edit: test/Serialization/comments.swift
>> 
>> Commit 39bfc123a30bfcd297c4c62e8d39541d07ab74c7 by dfarler:
>> Refactor: Rename Parser::consumeToken, consumeLoc. Add consumeToken API.
>> 
>> edit: lib/Parse/ParseGeneric.cpp
>> edit: lib/Parse/ParsePattern.cpp
>> edit: lib/Parse/Parser.cpp
>> add: include/swift/Syntax/RawSyntax.h
>> edit: lib/Parse/ParseStmt.cpp
>> edit: lib/Parse/ParseExpr.cpp
>> edit: lib/Parse/ParseSIL.cpp
>> edit: lib/Parse/ParseType.cpp
>> edit: include/swift/Parse/Parser.h
>> edit: lib/Parse/ParseDecl.cpp
>> 
>> Commit 2aad4bf871b7767aa404508f2d2d8f3acc19adff by mren:
>> [modules] Fix assert if multiple update records provide a definition for
>> 
>> edit: test/Modules/Inputs/templates-left.h
>> edit: test/Modules/Inputs/templates-right.h
>> edit: test/Modules/Inputs/templates-top.h
>> edit: lib/Serialization/ASTReaderDecl.cpp
>> edit: test/Modules/templates.mm
>> 
>> Commit e30aee85b3

Re: [swift-dev] High-level SIL Optimization: How do I get a FuncRef from the stdlib?

2016-11-16 Thread Ben Ng via swift-dev
> On Nov 16, 2016, at 7:11 PM, Arnold Schwaighofer  
> wrote:
> 
> 
>> On Nov 16, 2016, at 2:58 PM, Ben Ng  wrote:
>> 
>> Correct, that is what I am trying to do.
>> 
>>> On Nov 16, 2016, at 12:22 PM, Arnold Schwaighofer  
>>> wrote:
>>> 
>>> // Really, by the time you look at this in array value prop
>>> // this call should have been inline and you would see a call
>>> // to:
>>> // a.append(contentsOf: [1])
>> 
>> I do not understand this comment; I thought that inlining of stdlib 
>> functions happened after high-level SIL optimizations are run. Is my 
>> understanding incorrect?
> 
> 
> Inlining of functions with @_semantics is delayed until after high-level SIL 
> optimizations are run. Other functions are inlined.
> 
>  
> https://github.com/apple/swift/blob/master/lib/SILOptimizer/PassManager/Passes.cpp#L221
>  
> https://github.com/apple/swift/blob/master/lib/SILOptimizer/Transforms/PerformanceInliner.cpp#L722
> 
> 
> I recommend looking at the SIL function dump in ArrayElementValuePropagation 
> of an example function after adding @semantics(“array.mutate_unknown”) to 
> “append(contentsOf:)”.
> 
> 
> $ git diff HEAD~
> diff --git a/lib/SILOptimizer/Transforms/ArrayElementValuePropagation.cpp 
> b/lib/SILOptimizer/Transforms/ArrayElementValuePropagation.cpp
> index 76328a6..cb976f7 100644
> --- a/lib/SILOptimizer/Transforms/ArrayElementValuePropagation.cpp
> +++ b/lib/SILOptimizer/Transforms/ArrayElementValuePropagation.cpp
> @@ -259,6 +259,8 @@ public:
>   void run() override {
> auto &Fn = *getFunction();
> 
> +Fn.dump();
> +
> bool Changed = false;
> 
> // Propagate the elements an of array value to its users.
> diff --git a/stdlib/public/core/Arrays.swift.gyb 
> b/stdlib/public/core/Arrays.swift.gyb
> index f00cc23..2acfd06 100644
> --- a/stdlib/public/core/Arrays.swift.gyb
> +++ b/stdlib/public/core/Arrays.swift.gyb
> @@ -1344,6 +1344,7 @@ extension ${Self} : RangeReplaceableCollection, 
> _ArrayProtocol {
>   /// - Parameter newElements: The elements to append to the array.
>   ///
>   /// - Complexity: O(*n*), where *n* is the length of the resulting array.
> +  @_semantics("array.mutate_unknown")
>   public mutating func append(contentsOf newElements: C)
> where C.Iterator.Element == Element {
> 
> 
> # Rebuild the compiler and stdlib (without stdlib assertions).
> $ swift/utils/build-script -r  --assertions --no-swift-stdlib-assertions
> 
> 
> $ cat TestArray.swift 
> @inline(never)
> public func test() {
>  var a = [1, 2, 3]
>  a += [1]
>  print(a)
> }
> 
> $ bin/swiftc -O 2>&1 | less
> ...
> sil shared [_semantics "array.mutate_unknown"] 
> @_TTSg5Si_GSaSi_GSaSi_s10Collections___TFSa6appenduRd__s10CollectionxzWd__8Iterator7Element_rfT10contentsOfqd___T_
>  : $@convention(method) (@owned Array nt>, @inout Array) -> () {
> 
> …
> // testArray() -> ()
> sil [noinline] @_TF9TestArray9testArrayFT_T_ : $@convention(thin) () -> () {
> bb0:
>  %0 = alloc_stack $Array, var, name "a", loc "TestArray.swift":3:7, 
> scope 2 // users: %54, %32, %60, %23, %43
>  %1 = integer_literal $Builtin.Word, 3, loc "TestArray.swift":3:12, scope 2 
> // user: %4
>  %2 = integer_literal $Builtin.Int64, 3, scope 5 // user: %3
>  %3 = struct $Int (%2 : $Builtin.Int64), scope 5 // users: %22, %7
>  %4 = alloc_ref [tail_elems $Int * %1 : $Builtin.Word] 
> $_ContiguousArrayStorage, scope 5 // user: %7
>  %5 = metatype $@thin Array.Type, scope 5   // users: %25, %7
>  // function_ref specialized static 
> Array._adoptStorage(_ContiguousArrayStorage, count : Int) -> ([A], 
> UnsafeMutablePointer)
>  %6 = function_ref 
> @_TTSg5Si___TZFSa13_adoptStoragefTGCs23_ContiguousArrayStoragex_5countSi_TGSax_GSpx__
>  : $@convention(method) (@owned _ContiguousArrayStorage, Int, @thin 
> Array.Type) -> (@
> owned Array, UnsafeMutablePointer), scope 5 // users: %25, %7
>  %7 = apply %6(%4, %3, %5) : $@convention(method) (@owned 
> _ContiguousArrayStorage, Int, @thin Array.Type) -> (@owned 
> Array, UnsafeMutablePointer), scope 5 // users: %9, %8
>  %8 = tuple_extract %7 : $(Array, UnsafeMutablePointer), 0, scope 5 
> // user: %23
>  %9 = tuple_extract %7 : $(Array, UnsafeMutablePointer), 1, scope 5 
> // user: %10
>  %10 = struct_extract %9 : $UnsafeMutablePointer, 
> #UnsafeMutablePointer._rawValue, scope 5 // user: %11
>  %11 = pointer_to_address %10 : $Builtin.RawPointer to [strict] $*Int, loc 
> "TestArray.swift":3:12, scope 2 // users: %14, %21, %16
>  %12 = integer_literal $Builtin.Int64, 1, loc "TestArray.swift":3:12, scope 2 
> // user: %13
>  %13 = struct $Int (%12 : $Builtin.Int64), loc "TestArray.swift":3:12, scope 
> 2 // users: %37, %30, %25, %14
>  store %13 to %11 : $*Int, loc "TestArray.swift":3:12, scope 2 // id: %14
>  %15 = integer_literal $Builtin.Word, 1, loc "TestArray.swift":3:15, scope 2 
> // users: %34, %24, %16
>  %16 = index_addr %11 : $*Int, %15 : $Builtin.Word, loc 
> "TestArray.swift":3:15, scope 2 // user: %19
>  %17 = integer_literal $Builtin.Int64, 2, loc "TestArray.swift":3:15, 

Re: [swift-dev] High-level SIL Optimization: How do I get a FuncRef from the stdlib?

2016-11-16 Thread Arnold Schwaighofer via swift-dev

> On Nov 16, 2016, at 2:58 PM, Ben Ng  wrote:
> 
> Correct, that is what I am trying to do.
> 
>> On Nov 16, 2016, at 12:22 PM, Arnold Schwaighofer  
>> wrote:
>> 
>>  // Really, by the time you look at this in array value prop
>>  // this call should have been inline and you would see a call
>>  // to:
>>  // a.append(contentsOf: [1])
> 
> I do not understand this comment; I thought that inlining of stdlib functions 
> happened after high-level SIL optimizations are run. Is my understanding 
> incorrect?


Inlining of functions with @_semantics is delayed until after high-level SIL 
optimizations are run. Other functions are inlined.

  
https://github.com/apple/swift/blob/master/lib/SILOptimizer/PassManager/Passes.cpp#L221
  
https://github.com/apple/swift/blob/master/lib/SILOptimizer/Transforms/PerformanceInliner.cpp#L722


I recommend looking at the SIL function dump in ArrayElementValuePropagation of 
an example function after adding @semantics(“array.mutate_unknown”) to 
“append(contentsOf:)”.


$ git diff HEAD~
diff --git a/lib/SILOptimizer/Transforms/ArrayElementValuePropagation.cpp 
b/lib/SILOptimizer/Transforms/ArrayElementValuePropagation.cpp
index 76328a6..cb976f7 100644
--- a/lib/SILOptimizer/Transforms/ArrayElementValuePropagation.cpp
+++ b/lib/SILOptimizer/Transforms/ArrayElementValuePropagation.cpp
@@ -259,6 +259,8 @@ public:
   void run() override {
 auto &Fn = *getFunction();
 
+Fn.dump();
+
 bool Changed = false;
 
 // Propagate the elements an of array value to its users.
diff --git a/stdlib/public/core/Arrays.swift.gyb 
b/stdlib/public/core/Arrays.swift.gyb
index f00cc23..2acfd06 100644
--- a/stdlib/public/core/Arrays.swift.gyb
+++ b/stdlib/public/core/Arrays.swift.gyb
@@ -1344,6 +1344,7 @@ extension ${Self} : RangeReplaceableCollection, 
_ArrayProtocol {
   /// - Parameter newElements: The elements to append to the array.
   ///
   /// - Complexity: O(*n*), where *n* is the length of the resulting array.
+  @_semantics("array.mutate_unknown")
   public mutating func append(contentsOf newElements: C)
 where C.Iterator.Element == Element {
 

# Rebuild the compiler and stdlib (without stdlib assertions).
$ swift/utils/build-script -r  --assertions --no-swift-stdlib-assertions


$ cat TestArray.swift 
@inline(never)
public func test() {
  var a = [1, 2, 3]
  a += [1]
  print(a)
}

$ bin/swiftc -O 2>&1 | less
...
sil shared [_semantics "array.mutate_unknown"] 
@_TTSg5Si_GSaSi_GSaSi_s10Collections___TFSa6appenduRd__s10CollectionxzWd__8Iterator7Element_rfT10contentsOfqd___T_
 : $@convention(method) (@owned Array, @inout Array) -> () {

…
// testArray() -> ()
sil [noinline] @_TF9TestArray9testArrayFT_T_ : $@convention(thin) () -> () {
bb0:
  %0 = alloc_stack $Array, var, name "a", loc "TestArray.swift":3:7, scope 
2 // users: %54, %32, %60, %23, %43
  %1 = integer_literal $Builtin.Word, 3, loc "TestArray.swift":3:12, scope 2 // 
user: %4
  %2 = integer_literal $Builtin.Int64, 3, scope 5 // user: %3
  %3 = struct $Int (%2 : $Builtin.Int64), scope 5 // users: %22, %7
  %4 = alloc_ref [tail_elems $Int * %1 : $Builtin.Word] 
$_ContiguousArrayStorage, scope 5 // user: %7
  %5 = metatype $@thin Array.Type, scope 5   // users: %25, %7
  // function_ref specialized static 
Array._adoptStorage(_ContiguousArrayStorage, count : Int) -> ([A], 
UnsafeMutablePointer)
  %6 = function_ref 
@_TTSg5Si___TZFSa13_adoptStoragefTGCs23_ContiguousArrayStoragex_5countSi_TGSax_GSpx__
 : $@convention(method) (@owned _ContiguousArrayStorage, Int, @thin 
Array.Type) -> (@
owned Array, UnsafeMutablePointer), scope 5 // users: %25, %7
  %7 = apply %6(%4, %3, %5) : $@convention(method) (@owned 
_ContiguousArrayStorage, Int, @thin Array.Type) -> (@owned 
Array, UnsafeMutablePointer), scope 5 // users: %9, %8
  %8 = tuple_extract %7 : $(Array, UnsafeMutablePointer), 0, scope 5 
// user: %23
  %9 = tuple_extract %7 : $(Array, UnsafeMutablePointer), 1, scope 5 
// user: %10
  %10 = struct_extract %9 : $UnsafeMutablePointer, 
#UnsafeMutablePointer._rawValue, scope 5 // user: %11
  %11 = pointer_to_address %10 : $Builtin.RawPointer to [strict] $*Int, loc 
"TestArray.swift":3:12, scope 2 // users: %14, %21, %16
  %12 = integer_literal $Builtin.Int64, 1, loc "TestArray.swift":3:12, scope 2 
// user: %13
  %13 = struct $Int (%12 : $Builtin.Int64), loc "TestArray.swift":3:12, scope 2 
// users: %37, %30, %25, %14
  store %13 to %11 : $*Int, loc "TestArray.swift":3:12, scope 2 // id: %14
  %15 = integer_literal $Builtin.Word, 1, loc "TestArray.swift":3:15, scope 2 
// users: %34, %24, %16
  %16 = index_addr %11 : $*Int, %15 : $Builtin.Word, loc 
"TestArray.swift":3:15, scope 2 // user: %19
  %17 = integer_literal $Builtin.Int64, 2, loc "TestArray.swift":3:15, scope 2 
// user: %18
  %18 = struct $Int (%17 : $Builtin.Int64), loc "TestArray.swift":3:15, scope 2 
// user: %19
  store %18 to %16 : $*Int, loc "TestArray.swift":3:15, scope 2 // id: %19
  %20 = integer_literal $Builtin.Word, 2, loc "TestArray.swift":3:1

Re: [swift-dev] High-level SIL Optimization: How do I get a FuncRef from the stdlib?

2016-11-16 Thread Ben Ng via swift-dev
Correct, that is what I am trying to do.

> On Nov 16, 2016, at 12:22 PM, Arnold Schwaighofer  
> wrote:
> 
>  // Really, by the time you look at this in array value prop
>  // this call should have been inline and you would see a call
>  // to:
>  // a.append(contentsOf: [1])

I do not understand this comment; I thought that inlining of stdlib functions 
happened after high-level SIL optimizations are run. Is my understanding 
incorrect?___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.10 (master) #525

2016-11-16 Thread David Farler via swift-dev
It looks like this test is failing periodically on this bot.

https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/519/ 


https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/525/ 


+Ankit, I believe you added l.172 in 
Tests/CommandsTests/PackageToolTests.swift. Are you aware of any problems?

David

> On Nov 16, 2016, at 12:01 PM, no-re...@swift.org wrote:
> 
> [FAILURE] oss-swift-incremental-RA-linux-ubuntu-16_10 [#525]
> 
> Build URL:
> https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/525/ 
> 
> Project:  oss-swift-incremental-RA-linux-ubuntu-16_10
> Date of build:Wed, 16 Nov 2016 11:48:38 -0800
> Build duration:   13 min
> Identified problems:
> 
> Compile Error: This build failed because of a compile error. Below is a list 
> of all errors in the build log:
> Indication 1 
> 
> Tests:
> 
> Name: Swift(linux-x86_64)
> Failed: 0 test(s), Passed: 8565 test(s), Total: 8565 test(s)
> Name: Swift-Unit
> Failed: 0 test(s), Passed: 299 test(s), Total: 299 test(s)
> 
> Changes
> 
> Commit d6e2b58382147741cf4fcabd9cd0ca5a1cd2159f by dfarler:
> Preserve whitespace and comments during lexing as Trivia
> 
> edit: lib/Sema/TypeCheckConstraints.cpp
> edit: lib/Immediate/REPL.cpp
> add: lib/Parse/Trivia.cpp
> edit: lib/AST/ASTPrinter.cpp
> edit: lib/IDE/CodeCompletion.cpp
> add: include/swift/Syntax/Trivia.h
> edit: lib/IDE/ModuleInterfacePrinting.cpp
> edit: lib/AST/RawComment.cpp
> edit: include/swift/AST/ASTContext.h
> add: include/swift/Syntax/Syntax.h
> edit: test/SourceKit/SyntaxMapData/syntaxmap-edit.swift.response
> edit: include/swift/IDE/SyntaxModel.h
> edit: lib/Parse/Parser.cpp
> edit: lib/IDE/CommentConversion.cpp
> edit: include/swift/Parse/Lexer.h
> edit: test/IDE/comment_attach.swift
> add: lib/Syntax/CMakeLists.txt
> edit: lib/Parse/ParseGeneric.cpp
> edit: test/SourceKit/SyntaxMapData/syntaxmap-pound-keyword.swift.response
> edit: test/SourceKit/InterfaceGen/gen_swift_source.swift.response
> edit: test/SourceKit/InterfaceGen/gen_header.swift.response
> edit: lib/Parse/ParsePattern.cpp
> edit: test/SourceKit/ExtractComment/Inputs/Comment1.swift
> edit: test/SourceKit/InterfaceGen/gen_clang_module.swift.response
> edit: lib/Parse/ParseStmt.cpp
> edit: lib/ClangImporter/ImportType.cpp
> delete: include/swift/Parse/Token.h
> edit: test/IDE/coloring.swift
> edit: unittests/Parse/TokenizerTests.cpp
> edit: test/SourceKit/SyntaxMapData/syntaxmap-object-literals.swift.response
> edit: lib/AST/ASTContext.cpp
> edit: include/swift/Parse/Parser.h
> edit: lib/Parse/ParseExpr.cpp
> add: lib/Syntax/Syntax.cpp
> edit: test/IDE/comment_merge.swift
> edit: lib/Parse/ParseDecl.cpp
> edit: test/SourceKit/SyntaxMapData/syntaxmap.swift.response
> edit: include/swift/AST/Attr.h
> edit: lib/Parse/ParseSIL.cpp
> edit: test/IDE/coloring_playground.swift
> edit: include/swift/Subsystems.h
> edit: unittests/Parse/LexerTests.cpp
> add: include/swift/Syntax/Token.h
> edit: tools/swift-ide-test/swift-ide-test.cpp
> edit: lib/Parse/ParseType.cpp
> edit: lib/IDE/REPLCodeCompletion.cpp
> edit: lib/CMakeLists.txt
> edit: lib/IDE/Formatting.cpp
> edit: test/SourceKit/DocSupport/doc_source_file.swift.response
> add: include/swift/Basic/String.h
> edit: lib/Parse/CMakeLists.txt
> edit: test/Serialization/comments-framework.swift
> edit: lib/Parse/Lexer.cpp
> add: lib/Syntax/Token.cpp
> edit: lib/IDE/SyntaxModel.cpp
> edit: test/Serialization/comments.swift
> 
> Commit 39bfc123a30bfcd297c4c62e8d39541d07ab74c7 by dfarler:
> Refactor: Rename Parser::consumeToken, consumeLoc. Add consumeToken API.
> 
> edit: lib/Parse/ParseGeneric.cpp
> edit: lib/Parse/ParsePattern.cpp
> edit: lib/Parse/Parser.cpp
> add: include/swift/Syntax/RawSyntax.h
> edit: lib/Parse/ParseStmt.cpp
> edit: lib/Parse/ParseExpr.cpp
> edit: lib/Parse/ParseSIL.cpp
> edit: lib/Parse/ParseType.cpp
> edit: include/swift/Parse/Parser.h
> edit: lib/Parse/ParseDecl.cpp
> 
> Commit 2aad4bf871b7767aa404508f2d2d8f3acc19adff by mren:
> [modules] Fix assert if multiple update records provide a definition for
> 
> edit: test/Modules/Inputs/templates-left.h
> edit: test/Modules/Inputs/templates-right.h
> edit: test/Modules/Inputs/templates-top.h
> edit: lib/Serialization/ASTReaderDecl.cpp
> edit: test/Modules/templates.mm
> 
> Commit e30aee85b3803128d2bbd989ad827778b9f69b72 by mren:
> [modules] PR28812: Modules can return duplicate field decls.
> 
> add: test/Modules/Inputs/PR28812/b.h
> add: test/Modules/pr28812.cpp
> edit: lib/Sema/SemaDeclCXX.cpp
> add: test/Modules/Inputs/PR28812/Textual.h
> add: test/Modules/Inputs/PR28812/module.modulemap
> add: test/Modu

Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.10 (master) #519

2016-11-16 Thread Michael Gottesman via swift-dev
SGTM!

Thanks!

> On Nov 16, 2016, at 12:02 PM, ankit_aggar...@apple.com wrote:
> 
> I figured this was a 16.10 issue because PR bot (16.04) passed, however I 
> wasn't able to reproduce this locally after installing 16.10, I pushed a 
> commit to pin point the failure line but that integration went fine. I will 
> keep an eye if this comes again. 
> 
> Sent from my iPhone
> 
> On 17-Nov-2016, at 12:57 AM, Michael Gottesman  > wrote:
> 
>> Question. How did this get through PR testing?
>> 
>> Sent from my iPhone
>> 
>> On Nov 16, 2016, at 6:01 AM, Ankit Aggarwal via swift-dev 
>> mailto:swift-dev@swift.org>> wrote:
>> 
>>> This is mine, checking.
>>> 
 On 16-Nov-2016, at 6:12 PM, no-re...@swift.org  
 wrote:
 
 [FAILURE] oss-swift-incremental-RA-linux-ubuntu-16_10 [#519]
 
 Build URL: 
 https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/519/ 
 
 Project:   oss-swift-incremental-RA-linux-ubuntu-16_10
 Date of build: Wed, 16 Nov 2016 04:32:08 -0800
 Build duration:10 min
 Identified problems:
 
 Compile Error: This build failed because of a compile error. Below is a 
 list of all errors in the build log:
 Indication 1 
 
 Tests:
 
 Name: Swift(linux-x86_64)
 Failed: 0 test(s), Passed: 8564 test(s), Total: 8564 test(s)
 Name: Swift-Unit
 Failed: 0 test(s), Passed: 299 test(s), Total: 299 test(s)
 
 Changes
 
 Commit 17a732b4d351d74f7bbb392d8cf6d1097b8bd10e by practicalswift:
 [swiftc (134 vs. 5198)] Add crasher in ?
 
 add: 
 validation-test/compiler_crashers/28523-child-source-range-not-contained-within-its-parent-sequence-expr-type-null.swift
 
 Commit 8dac299dc3109a70ae1ce12c8cd9c201c562f9e6 by ankit_aggarwal:
 [PackageTool] Add pinning CLI
 
 edit: Tests/CommandsTests/PackageToolTests.swift
 edit: Sources/Commands/Workspace.swift
 edit: Sources/Commands/SwiftPackageTool.swift
 edit: Sources/Commands/Error.swift
>>> 
>>> ___
>>> swift-dev mailing list
>>> swift-dev@swift.org 
>>> https://lists.swift.org/mailman/listinfo/swift-dev 
>>> 

___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.10 (master) #519

2016-11-16 Thread ankit_aggarwal--- via swift-dev
I figured this was a 16.10 issue because PR bot (16.04) passed, however I 
wasn't able to reproduce this locally after installing 16.10, I pushed a commit 
to pin point the failure line but that integration went fine. I will keep an 
eye if this comes again. 

Sent from my iPhone

> On 17-Nov-2016, at 12:57 AM, Michael Gottesman  wrote:
> 
> Question. How did this get through PR testing?
> 
> Sent from my iPhone
> 
>> On Nov 16, 2016, at 6:01 AM, Ankit Aggarwal via swift-dev 
>>  wrote:
>> 
>> This is mine, checking.
>> 
>>> On 16-Nov-2016, at 6:12 PM, no-re...@swift.org wrote:
>>> 
>>> [FAILURE] oss-swift-incremental-RA-linux-ubuntu-16_10 [#519]
>>> 
>>> Build URL:  
>>> https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/519/
>>> Project:oss-swift-incremental-RA-linux-ubuntu-16_10
>>> Date of build:  Wed, 16 Nov 2016 04:32:08 -0800
>>> Build duration: 10 min
>>> Identified problems:
>>> 
>>> Compile Error: This build failed because of a compile error. Below is a 
>>> list of all errors in the build log:
>>> Indication 1
>>> Tests:
>>> 
>>> Name: Swift(linux-x86_64)
>>> Failed: 0 test(s), Passed: 8564 test(s), Total: 8564 test(s)
>>> Name: Swift-Unit
>>> Failed: 0 test(s), Passed: 299 test(s), Total: 299 test(s)
>>> 
>>> Changes
>>> 
>>> Commit 17a732b4d351d74f7bbb392d8cf6d1097b8bd10e by practicalswift:
>>> [swiftc (134 vs. 5198)] Add crasher in ?
>>> 
>>> add: 
>>> validation-test/compiler_crashers/28523-child-source-range-not-contained-within-its-parent-sequence-expr-type-null.swift
>>> 
>>> Commit 8dac299dc3109a70ae1ce12c8cd9c201c562f9e6 by ankit_aggarwal:
>>> [PackageTool] Add pinning CLI
>>> 
>>> edit: Tests/CommandsTests/PackageToolTests.swift
>>> edit: Sources/Commands/Workspace.swift
>>> edit: Sources/Commands/SwiftPackageTool.swift
>>> edit: Sources/Commands/Error.swift
>> 
>> ___
>> swift-dev mailing list
>> swift-dev@swift.org
>> https://lists.swift.org/mailman/listinfo/swift-dev
___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.10 (master) #519

2016-11-16 Thread Michael Gottesman via swift-dev
Question. How did this get through PR testing?

Sent from my iPhone

> On Nov 16, 2016, at 6:01 AM, Ankit Aggarwal via swift-dev 
>  wrote:
> 
> This is mine, checking.
> 
>> On 16-Nov-2016, at 6:12 PM, no-re...@swift.org wrote:
>> 
>> [FAILURE] oss-swift-incremental-RA-linux-ubuntu-16_10 [#519]
>> 
>> Build URL:   
>> https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/519/
>> Project: oss-swift-incremental-RA-linux-ubuntu-16_10
>> Date of build:   Wed, 16 Nov 2016 04:32:08 -0800
>> Build duration:  10 min
>> Identified problems:
>> 
>> Compile Error: This build failed because of a compile error. Below is a list 
>> of all errors in the build log:
>> Indication 1
>> Tests:
>> 
>> Name: Swift(linux-x86_64)
>> Failed: 0 test(s), Passed: 8564 test(s), Total: 8564 test(s)
>> Name: Swift-Unit
>> Failed: 0 test(s), Passed: 299 test(s), Total: 299 test(s)
>> 
>> Changes
>> 
>> Commit 17a732b4d351d74f7bbb392d8cf6d1097b8bd10e by practicalswift:
>> [swiftc (134 vs. 5198)] Add crasher in ?
>> 
>> add: 
>> validation-test/compiler_crashers/28523-child-source-range-not-contained-within-its-parent-sequence-expr-type-null.swift
>> 
>> Commit 8dac299dc3109a70ae1ce12c8cd9c201c562f9e6 by ankit_aggarwal:
>> [PackageTool] Add pinning CLI
>> 
>> edit: Tests/CommandsTests/PackageToolTests.swift
>> edit: Sources/Commands/Workspace.swift
>> edit: Sources/Commands/SwiftPackageTool.swift
>> edit: Sources/Commands/Error.swift
> 
> ___
> swift-dev mailing list
> swift-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


Re: [swift-dev] High-level SIL Optimization: How do I get a FuncRef from the stdlib?

2016-11-16 Thread Arnold Schwaighofer via swift-dev

> On Wed, Nov 16, 2016 at 12:01 AM Michael Gottesman  
> wrote:
>> On Nov 15, 2016, at 8:54 PM, Ben Ng  wrote:
>> 
>> Hi Michael,
>> 
>> It can probably be stuck in the Array Value Propagation pass since its 
>> pretty similar. Yes, it uses Array semantics. I isolated it in a separate 
>> file because it's my first time working on the Swift compiler and I wanted 
>> to keep the moving parts to a minimum.
> 
> Ok. I was just saying this transformation is small enough it probably makes 
> sense not to have a pass just for it. That is all.


It makes sense for this to eventually be part of array value 
propagation. I think you will reuse some code that is in there
(probably most of “ArrayAllocation” to get at the element of the
appended array).

As I understand, you are going to transform:

  var a = […]
  a += [1]
  // Really, by the time you look at this in array value prop
  // this call should have been inline and you would see a call
  // to:
  // a.append(contentsOf: [1])

to

  var a = […]
  a.append(1)


I agree with Roman that you should emit a call to the unspecialized 
“append(_:)” method and be able to rely on later specialization passes
to clean up the unspecialized code.
___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.10 (master) #519

2016-11-16 Thread Ankit Aggarwal via swift-dev
This is mine, checking.

> On 16-Nov-2016, at 6:12 PM, no-re...@swift.org wrote:
> 
> [FAILURE] oss-swift-incremental-RA-linux-ubuntu-16_10 [#519]
> 
> Build URL:
> https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/519/ 
> 
> Project:  oss-swift-incremental-RA-linux-ubuntu-16_10
> Date of build:Wed, 16 Nov 2016 04:32:08 -0800
> Build duration:   10 min
> Identified problems:
> 
> Compile Error: This build failed because of a compile error. Below is a list 
> of all errors in the build log:
> Indication 1 
> 
> Tests:
> 
> Name: Swift(linux-x86_64)
> Failed: 0 test(s), Passed: 8564 test(s), Total: 8564 test(s)
> Name: Swift-Unit
> Failed: 0 test(s), Passed: 299 test(s), Total: 299 test(s)
> 
> Changes
> 
> Commit 17a732b4d351d74f7bbb392d8cf6d1097b8bd10e by practicalswift:
> [swiftc (134 vs. 5198)] Add crasher in ?
> 
> add: 
> validation-test/compiler_crashers/28523-child-source-range-not-contained-within-its-parent-sequence-expr-type-null.swift
> 
> Commit 8dac299dc3109a70ae1ce12c8cd9c201c562f9e6 by ankit_aggarwal:
> [PackageTool] Add pinning CLI
> 
> edit: Tests/CommandsTests/PackageToolTests.swift
> edit: Sources/Commands/Workspace.swift
> edit: Sources/Commands/SwiftPackageTool.swift
> edit: Sources/Commands/Error.swift

___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


Re: [swift-dev] Autoconf needed for builds?

2016-11-16 Thread Alex Blewitt via swift-dev
Thanks, created https://bugs.swift.org/browse/SR-3222 
 to address the documentation since it's 
necessary to build dispatch if building foundation on Linux

Alex

> On 15 Nov 2016, at 20:48, Mishal Shah  wrote:
> 
> Hi Alex, 
> 
> Libdispatch requires following:
> 
> sudo apt-get install autoconf libtool pkg-config clang systemtap-sdt-dev 
> libbsd-dev
> 
> For more detail: 
> https://github.com/apple/swift-corelibs-libdispatch/blob/master/INSTALL.md#building-and-installing-for-linux
>  
> 
> 
> Thanks,
> Mishal Shah
> 
> Mishal Shah
> 
> On Tue, Nov 15, 2016 at 8:31 AM, Alex Blewitt via swift-dev 
> mailto:swift-dev@swift.org>> wrote:
> I just tried to build Swift on Ubuntu 10.04 and it failed with an error 
> message 'autoreconf: command not found'. It seems this comes with the 
> autoconf module.
> 
> According to https://github.com/apple/swift/#system-requirements 
>  the requirements for 
> installing includes:
> 
> sudo apt-get install git cmake ninja-build clang python uuid-dev libicu-dev 
> icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev swig 
> libpython-dev libncurses5-dev pkg-config libblocksruntime-dev 
> libcurl4-openssl-dev
> 
> This doesn't include autoconf, and as such, falls over here. Should the 
> documentation be updated to require autoconf, or should the libdispatch code 
> not require autoconf in the first place?
> 
> Alex
> 
> ---
> 
> libdispatch: using gold linker
> Reconfiguring libdispatch
> + mkdir -p /build/Ninja-ReleaseAssert/libdispatch-linux-x86_64
> + pushd //swift-corelibs-libdispatch
> //swift-corelibs-libdispatch /
> + autoreconf -fvi
> /swift/utils/build-script-impl: line 274: autoreconf: command not found
> swift/utils/build-script: fatal error: command terminated with a non-zero 
> exit status 127, aborting
> 
> 
> ___
> swift-dev mailing list
> swift-dev@swift.org 
> https://lists.swift.org/mailman/listinfo/swift-dev 
> 
> 
> 

___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


Re: [swift-dev] [swift-users] Planned Outage - Nov 15th 2016 at 11pm PST

2016-11-16 Thread Mishal Shah via swift-dev
All of the services are back online.

Sorry for any inconvenience.

Thanks,
Mishal Shah

> On Nov 15, 2016, at 12:18 PM, mishal_shah via swift-users 
>  wrote:
> 
> Planned Outage:
> 
> When: 
> Nov 15th 2016 at 11pm PST 
> 
> Duration:
> 1-2hrs
> 
> Services affected:
> 
> - Swift Website: swift.org
> - Swift CI: ci.swift.org
> - Swift Bugs: bugs.swift.org
> - Swift Mail: lists.swift.org
> 
> Thanks, 
> Mishal Shah
> ___
> swift-users mailing list
> swift-us...@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev