profile
viewpoint
Nate Cook natecook1000 @apple Evanston, IL

natecook1000/Collections-in-Swift 5

Code samples from my CocoaConf talk

airspeedswift/swift 2

The Swift Programming Language

natecook1000/Alamofire 1

Elegant HTTP Networking in Swift

natecook1000/BlocksKit 1

The Objective-C block utilities you always wish you had.

natecook1000/ABCalendarPicker 0

Fully configurable iOS calendar UI component with multiple layouts and smooth animations.

natecook1000/Aerial 0

Apple TV Aerial Screensaver for Mac

natecook1000/AFIncrementalStore 0

Core Data Persistence with AFNetworking, Done Right

natecook1000/AFNetworking 0

A delightful iOS and OS X networking framework

natecook1000/AlamofireImage 0

AlamofireImage is an image component library for Alamofire

natecook1000/Antenna 0

Extensible Remote Logging for iOS

pull request commentapple/swift

Enable LoopRotate on OSSA

@swift-ci test

meg-gupta

comment created time in 3 minutes

PR opened apple/swift

Reviewers
Enable LoopRotate on OSSA

Also added support for @guaranteed phi args in SILSSAUpdater.

+685 -28

0 comment

15 changed files

pr created time in 4 minutes

pull request commentapple/swift

Add debug info support for boxed arguments in async functions.

@swift-ci test

adrian-prantl

comment created time in 11 minutes

pull request commentapple/swift

Support SILBoxWithLayout in TypeDecoder

@swift-ci test

adrian-prantl

comment created time in 12 minutes

Pull request review commentapple/swift

[cxx-interop] Generate IR for decls called from members

+// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-cxx-interop -validate-tbd-against-ir=none | %FileCheck %s++// TODO: See why -validate-tbd-against-ir=none is needed here

Thanks.

scentini

comment created time in 16 minutes

Pull request review commentapple/swift

[cxx-interop] Generate IR for decls called from members

+#ifndef TEST_INTEROP_CXX_MEMBERS_INPUTS_CONSTRUCTOR_CALLS_FUNCTION_FROM_NESTED_STRUCT_H

I moved the tests into Cxx/class/inline-functions-through-member, as to keep them separate from future tests on members.

Fantastic. I really like using a subdirectory here.

As for the headers - I am strongly in favor of keeping tests as isolated as possible. Putting everything in one header will reduce readability when one looks at a single test (eg. me 6 months from now). And the similarity between the content of the header files doesn't make things better - no two headers call the increment function from the same place, so we'd need a constructor that calls the function, a method that calls the function, a nested struct with a constructor that calls the function etc. - the sum of all these is less readable than having them in separate headers.

Fair enough.

scentini

comment created time in 17 minutes

push eventapple/swift

Meghana Gupta

commit sha f2760bbea30a719895e6742b2e29203e424c2847

Enable DCE on OSSA

view details

swift-ci

commit sha 9ef7b2ac3c45c659e1980f39e186e91afdcf511f

Merge pull request #35530 from meg-gupta/dceossapr

view details

swift-ci

commit sha de409eb5051c07ea4644b5190e54d7bac0243642

Merge remote-tracking branch 'origin/main' into rebranch

view details

push time in an hour

pull request commentapple/swift

Add debug info support for boxed arguments in async functions.

Build failed Swift Test OS X Platform Git Sha - 218fec14c8b5340a0caee9278ec98963f5f5e6da

adrian-prantl

comment created time in an hour

PR opened apple/swift-algorithms

Precompute LazyChunked's startIndex

<!-- Thanks for contributing to Swift Algorithms!

If this pull request adds new API, please add '?template=new.md'
to the URL to switch to the appropriate template.

Before you submit your request, please replace the paragraph
below with the relevant details, and complete the steps in the
checklist by placing an 'x' in each box:

- [x] I've completed this task
- [ ] This task isn't completed

-->

This PR adds a firstUpperBound stored property to the LazyChunked type to avoid computing the first chunk twice during iteration, similar to what the ChunkedByCount and SlidingWindows types do.

Checklist

  • [x] I've added at least one test that validates that my change is working, if appropriate
  • [x] I've followed the code style of the rest of the project
  • [x] I've read the Contribution Guidelines
  • [x] I've updated the documentation if necessary
+23 -29

0 comment

1 changed file

pr created time in an hour

push eventapple/swift

Meghana Gupta

commit sha f2760bbea30a719895e6742b2e29203e424c2847

Enable DCE on OSSA

view details

swift-ci

commit sha 9ef7b2ac3c45c659e1980f39e186e91afdcf511f

Merge pull request #35530 from meg-gupta/dceossapr

view details

push time in an hour

PR merged apple/swift

Reviewers
Enable DCE on OSSA
  • Support destroy_value/copy_value/begin_borrow/end_borrow
  • Support adding reverse dependencies for SILArgument
  • Insert lifetime end instructions (destroy_value/end_borrow) while deleting instructions which would have ended the lifetime of its operands
+753 -72

6 comments

4 changed files

meg-gupta

pr closed time in an hour

PR opened apple/sourcekit-lsp

Reviewers
[5.4] Adjust the SwiftPMWorkspaceTests.testMultiTargetSwift() test to account for the SwiftPM fix for SR-12050

A SwiftPM fix (apple/swift-package-manager#3215) adds '-Xcc' to the command line generated by SwiftPM and thereby introduces revlock between the SwiftPM fix and SourceKit-LSP. Because of the branch-based dependency of SourceKit-LSP on SwiftPM, this means that SourceKit-LSP's unit test will start failing once that PR is merged. This adds a temporary change to allow SourceKit-LSP to accommodate both command lines. It will be removed once SwiftPM's PR has been merged.

This is the 5.4 nomination for the fix in https://github.com/apple/sourcekit-lsp/pull/362.

(cherry-picked from commit ad735d45ca2077bc49443d7b27604530ed4dd324)

+12 -3

0 comment

1 changed file

pr created time in an hour

pull request commentapple/swift

Add debug info support for boxed arguments in async functions.

@swift-ci test

adrian-prantl

comment created time in an hour

create barnchapple/sourcekit-lsp

branch : adjust-to-swiftpm-sr-12050-fix-5.4

created branch time in an hour

delete branch apple/sourcekit-lsp

delete branch : adjust-to-swiftpm-sr-12050-fix

delete time in an hour

push eventapple/sourcekit-lsp

Anders Bertelrud

commit sha ad735d45ca2077bc49443d7b27604530ed4dd324

Adjust the SwiftPMWorkspaceTests.testMultiTargetSwift() test to account for the SwiftPM fix for SR-12050, which adds '-Xcc' to the command line generated by SwiftPM and thereby introduces revlock between the SwiftPM fix and SourceKit-LSP.

view details

Anders Bertelrud

commit sha c4124234d0cf4a5533d915caa2d59bae2513d092

Merge pull request #362 from apple/adjust-to-swiftpm-sr-12050-fix Adjust the SwiftPMWorkspaceTests.testMultiTargetSwift() test to account for the SwiftPM fix for SR-12050

view details

push time in an hour

PR merged apple/sourcekit-lsp

Adjust the SwiftPMWorkspaceTests.testMultiTargetSwift() test to account for the SwiftPM fix for SR-12050

This fix (https://github.com/apple/swift-package-manager/pull/3215) adds '-Xcc' to the command line generated by SwiftPM and thereby introduces revlock between the SwiftPM fix and SourceKit-LSP. Because of the branch-based dependency of SourceKit-LSP on SwiftPM, this means that SourceKit-LSP's unit test will start failing once that PR is merged. This adds a temporary change to allow SourceKit-LSP to accommodate both command lines. It will be removed once SwiftPM's PR has been merged.

+12 -3

1 comment

1 changed file

abertelrud

pr closed time in an hour

pull request commentapple/swift

Replace llvm::MD5 with SipHash-2-4

@swift-ci smoke test Windows platform

CodaFi

comment created time in an hour

pull request commentapple/swift

[ASTPrinter] Print 'async' as a keyword

@swift-ci Please smoke test

rintaro

comment created time in an hour

PR opened apple/swift

[ASTPrinter] Print 'async' as a keyword

rdar://problem/73426591

+61 -6

0 comment

3 changed files

pr created time in an hour

Pull request review commentapple/swift

[Diagnostics] Add specific warning for overriden `NSObject.hash(into:)`

 static bool isNSObjectHashValue(ValueDecl *baseDecl) {   return false; } +/// Returns true if the given declaration is for the `NSObject.hash(into:)`+/// function.+static bool isNSObjectHashMethod(ValueDecl *baseDecl) {+  ASTContext &ctx = baseDecl->getASTContext();++  if (auto baseVar = dyn_cast<FuncDecl>(baseDecl)) {

Thanks!

mininny

comment created time in an hour

Pull request review commentapple/swift

Warn on member assignments capturing self

 static void diagRecursivePropertyAccess(const Expr *E, const DeclContext *DC) {   const_cast<Expr *>(E)->walk(walker); } +static void+diagnoseMemberMethodAssignmentsCapturingSelf(const Expr *E,+                                             const DeclContext *DC) {++  class DiagnoseWalker : public ASTWalker {+    ASTContext &Ctx;++  public:+    explicit DiagnoseWalker(ASTContext &ctx) : Ctx(ctx) {}++    bool walkToDeclPre(Decl *D) override { return false; }++    bool shouldWalkIntoSeparatelyCheckedClosure(ClosureExpr *expr) override {+      return false;+    }++    bool shouldWalkCaptureInitializerExpressions() override { return true; }++    bool shouldWalkIntoTapExpression() override { return false; }++    DeclRefExpr *getMemberFuncReferencingSelf(Expr *selfParam,+                                              AutoClosureExpr *ACE) {++      if (auto *ICE = dyn_cast<AutoClosureExpr>(ACE->getSingleExpressionBody()))+        if (auto *AE = dyn_cast<ApplyExpr>(ICE->getSingleExpressionBody()))+          if (auto *DSCE = dyn_cast<DotSyntaxCallExpr>(AE->getFn()))+            if (auto *base = dyn_cast<DeclRefExpr>(DSCE->getBase()))+              if (base->getType()->getCanonicalType() ==+                  selfParam->getType()->getCanonicalType()) {+                auto *member = dyn_cast<DeclRefExpr>(DSCE->getFn());+                return member;+              }++      return nullptr;+    }++    std::pair<bool, Expr *> walkToExprPre(Expr *E) override {++      if (auto *ASE = dyn_cast<AssignExpr>(E))+        if (auto *AE = dyn_cast<ApplyExpr>(ASE->getSrc()))

Yes, makes sense.

However, I went the route of folding the logic inside the current diagnoseMemberMethodAssignmentsCapturingSelf, which has changed things quite a bit. I am not checking for assignment expressions anymore and am also not sure about the logic's robustness. Sorry to make you review it once again :disappointed:

tapthaker

comment created time in an hour

pull request commentapple/swift

[build] Reenable lldb tests for macOS toolchain package

10:40:45 [/Users/buildnode/jenkins/workspace/swift-PR-osx-preset/branch-release/5.4/swift/utils/build-script] ERROR: no value found for install_symroot in "%(install_symroot)s"

kastiglione

comment created time in 2 hours

PR opened apple/swift

async: Allocate memory in the caller for direct return results

This will allow us to destroy the async context in the callee.

+72 -37

0 comment

5 changed files

pr created time in 2 hours

pull request commentapple/swift

test: update Interop.cxx tests for newer clang

Thank you! It looks like the Windows PR still has config issues...

compnerd

comment created time in 2 hours

pull request commentapple/swift

SIL: add a utility which can manage per-block bitfields and flags efficiently.

So @eeckstein informed me that SILBasicBlock was already just over a cache line, and cache alignment doesn't matter because we're using the bump pointer allocator (I was thinking of issues we had with LLVM IR, especially MachineInstr)

eeckstein

comment created time in 2 hours

push eventapple/swift

Alexis Laferrière

commit sha e47a3788e5eb1b20fa977f4bff29da962d84ba7a

[Tests] Xfail DebugInfo/async-args.swift

view details

Alexis Laferrière

commit sha 66562cec0a247a698c9a4159ac4b9de131a24fe4

[Tests] Disable flaky async_taskground_next_on_* tests

view details

Alexis Laferrière

commit sha ac62aa44228e10790ef1815aabc5de2aebe5eb8a

Merge pull request #35541 from xymus/disable-tests-on-rebranch [rebranch][Tests] XFail async-args and disable flaky async_taskgroup_next_on*

view details

push time in 2 hours

pull request commentapple/swift

[rebranch][Tests] XFail async-args and disable flaky async_taskgroup_next_on*

The remaining macOS tests should be fixed by #35542.

xymus

comment created time in 2 hours

pull request commentapple/swift

test: update Interop.cxx tests for newer clang

Build failed Swift Test Linux Platform Git Sha - 3db60d2c208e8d862a07872d038fb4ca1e91d174

compnerd

comment created time in 2 hours

more