profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/atrick/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

atrick/llvm-project 0

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. This fork is used to manage Apple’s stable releases of Clang as well as support the Swift project.

atrick/sourcekit-lsp 0

Language Server Protocol implementation for Swift and C-based languages

atrick/swift 0

The Swift Programming Language

atrick/swift-corelibs-foundation 0

The Foundation Project, providing core utilities, internationalization, and OS independence

atrick/swift-corelibs-libdispatch 0

The libdispatch Project, (a.k.a. Grand Central Dispatch), for concurrency on multicore hardware

atrick/swift-evolution 0

This maintains proposals for changes and user-visible enhancements to the Swift Programming Language.

atrick/swift-llbuild 0

A low-level build system, used by the Swift Package Manager

atrick/swift-lldb 0

This is the version of LLDB that supports the Swift programming language & REPL.

pull request commentapple/swift

[WIP] Task local revisions based on review thread

@swift-ci please smoke test

ktoso

comment created time in 14 minutes

Pull request review commentapple/swift

concurrency: alloc an async-let task with the parent's allocator.

 static AsyncTaskAndContext swift_task_create_group_future_commonImpl(   // as if they might be null, even though the only time they ever might   // be is the final hop.  Store a signed null instead.   initialContext->Parent = nullptr;-  initialContext->ResumeParent = reinterpret_cast<TaskContinuationFunction *>(-      (closureContext && owningClosureContext) ? &completeTaskWithClosure :-                                                 &completeTask);   initialContext->Flags = AsyncContextKind::Ordinary;   initialContext->Flags.setShouldNotDeallocateInCallee(true);    // Initialize the task-local allocator.-  // TODO: consider providing an initial pre-allocated first slab to the allocator.-  _swift_task_alloc_initialize(task);+  if (isAsyncLetTask) {+    initialContext->ResumeParent = reinterpret_cast<TaskContinuationFunction *>(+                                                   &completeTask);+    assert(parent);+    void *initialSlab = (char*)allocation + amountToAllocate;+    _swift_task_alloc_initialize_with_slab(task, initialSlab, initialSlabSize);

cool! so even a bunch of tiny task-local allocs inside the child have a chance to stay in the initial slab... <3

eeckstein

comment created time in 19 minutes

Pull request review commentapple/swift

concurrency: alloc an async-let task with the parent's allocator.

 static void task_wait_throwing_resume_adapter(SWIFT_ASYNC_CONTEXT AsyncContext * }  /// All `swift_task_create*` variants funnel into this common implementation.+///+/// If \p isAsyncLetTask is true, the \p closureContext is not heap allocated,+/// but stack-allocated (and must not be ref-counted).+/// Also, async-let tasks are not heap allcoated, but allcoated with the parent+/// task's stack allocator. static AsyncTaskAndContext swift_task_create_group_future_commonImpl(     JobFlags flags, TaskGroup *group,     const Metadata *futureResultType,     FutureAsyncSignature::FunctionType *function,-    void *closureContext, bool owningClosureContext,+    void *closureContext, bool isAsyncLetTask,     size_t initialContextSize) {

ABI wise my impression was we wanted something like [TaskCreateRecords] to be passed in and e.g. check their .kind == .isAsyncLet or similar to be future proof about adding more smarts to creating tasks.

But maybe we want to do that in a separate PR? (totally find by me to do later on!)

eeckstein

comment created time in 28 minutes

Pull request review commentapple/swift

concurrency: alloc an async-let task with the parent's allocator.

 static void destroyJob(SWIFT_CONTEXT HeapObject *obj) {   assert(false && "A non-task job should never be destroyed as heap metadata."); } -SWIFT_CC(swift)-static void destroyTask(SWIFT_CONTEXT HeapObject *obj) {-  auto task = static_cast<AsyncTask*>(obj);+AsyncTask::~AsyncTask() {   // For a future, destroy the result.-  if (task->isFuture()) {-    task->futureFragment()->destroy();+  if (isFuture()) {+    futureFragment()->destroy();   }    // Release any objects potentially held as task local values.-  task->Local.destroy(task);+  Local.destroy(this);+}++SWIFT_CC(swift)+static void destroyTask(SWIFT_CONTEXT HeapObject *obj) {+  auto task = static_cast<AsyncTask*>(obj);++  task->~AsyncTask();

no idea if doing a destructor is nicer... am I missing something? so far we've mostly had all destroyX things explicitly (but I'm by no means C++ or this codebase guru...)

eeckstein

comment created time in 31 minutes

Pull request review commentapple/swift

concurrency: alloc an async-let task with the parent's allocator.

 static void swift_asyncLet_endImpl(AsyncLet *alet) {   // TODO: we need to implicitly await either before the end or here somehow.    // and finally, release the task and free the async-let
  // and finally deallocate the async-let

no releasing anymore (yay!)

eeckstein

comment created time in 33 minutes

Pull request review commentapple/swift

concurrency: alloc an async-let task with the parent's allocator.

 class TaskGroup; extern FullMetadata<DispatchClassMetadata> jobHeapMetadata;  /// A schedulable job.-class alignas(2 * alignof(void*)) Job : public HeapObject {+class alignas(2 * alignof(void*)) Job :+  // For async-let tasks, the refcount bits are initialized as "immortal"+  // because such a task is allocated with the parent's stack allocator.+  public HeapObject {

nice, thanks for the comment!

eeckstein

comment created time in 36 minutes

pull request commentapple/swift

concurrency: alloc an async-let task with the parent's allocator.

@swift-ci test

eeckstein

comment created time in 37 minutes

push eventapple/swift

David Zarzycki

commit sha 75087862e0b808e4da89be09aaffeed6c9f30325

[Testing] Unbreak minimal Swift builds

view details

David Zarzycki

commit sha a7c24c53477d111d7d7233d41204e9789852ea15

Merge pull request #36990 from davezarzycki/pr36990 [Testing] Unbreak minimal Swift builds

view details

swift_jenkins

commit sha 7d40f7a9b38962506f6cdcf4f065068ca8d1ed40

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

view details

push time in 44 minutes

Pull request review commentapple/swift

[Concurrency] Add "async" operation for continuing work asynchronously.

 public func detach<T>(   return Task.Handle<T, Error>(task) } +/// Run given `operation` as asynchronously in its own top-level task.+///+/// The `async` function should be used when creating asynchronous work+/// that operations on behalf of the synchronous function that calls it.+/// Like `detach`, the async function creates a separate, top-level task.+/// Unlike `detach`, the task creating by `async` inherits the priority and+/// actor context of the caller, so the `operation` is treated more like an+/// asynchronous extension to the synchronous operation. Additionally, `async`+/// does not return a handle to refer to the task.+///+/// - Parameters:+///   - priority: priority of the task. If unspecified, the priority will+///               be inherited from the task that is currently executing+///               or, if there is none, from the platform's understanding of+///               which thread is executing.+///   - operation: the operation to execute+@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)+public func async(

Man... I'd really like a verb here; Isn't this a send?

Nah, it's a dispatch ;-) (yeah, gcd connotations I know, but one could say the same for send(2))

DougGregor

comment created time in an hour

push eventapple/swift

David Zarzycki

commit sha 75087862e0b808e4da89be09aaffeed6c9f30325

[Testing] Unbreak minimal Swift builds

view details

David Zarzycki

commit sha a7c24c53477d111d7d7233d41204e9789852ea15

Merge pull request #36990 from davezarzycki/pr36990 [Testing] Unbreak minimal Swift builds

view details

push time in an hour

PR merged apple/swift

Reviewers
[Testing] Unbreak minimal Swift builds

#36975 broke minimal Swift builds.

+18 -15

2 comments

2 changed files

davezarzycki

pr closed time in an hour

pull request commentapple/swift

Support watchOS Simulator x86_64

Build failed Swift Test OS X Platform Git Sha - 1ed3583697e9a2fb1a154e972eda6770d6d0453b

shahmishal

comment created time in an hour

push eventapple/swift

Alex Hoppen

commit sha aa695298095fb5043956df2cd95988977de94c61

[AST] Add method to create an implicit `SwitchStmt` There are a number of occurances that create implicit `Switch`s by passing `SourceLoc()` for all location paramters. Refactor those occurances out to a separate `createImplicit` method that automatically fills the locations with invalid source locations.

view details

Kim de Vos

commit sha a8fa3ba0ebc6133fa550e52a69cb776c5568ebef

Added helper variables and methods for SwiftSyntax gyb https://github.com/apple/swift-syntax/pull/268

view details

Alex Hoppen

commit sha efd413a6e24abb83a86d7f6c9779a836d6fc68cb

Merge pull request #36726 from kimdv/kimdv/add-more-properties-to-help-gyb-for-swift-syntax [libSyntax] Added helper variables and methods for SwiftSyntax gyb

view details

Alex Hoppen

commit sha 1504870004bc0e400c764008fb2bf27b3546d323

Merge pull request #36973 from ahoppen/pr/create-implicit-switch-stmt [AST] Add method to create an implicit `SwitchStmt`

view details

swift_jenkins

commit sha 22b5c9c236f3a4d6f1a09d8ea444427eabcc4eb1

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

view details

push time in an hour

pull request commentapple/swift

[Refactoring] Fix crash when refactoring protocol requirement to async

@swift-ci Please test

ahoppen

comment created time in an hour

pull request commentapple/swift

[Refactoring] Fix crash when refactoring protocol requirement to async

@swift-ci Please test

ahoppen

comment created time in an hour

Pull request review commentapple/swift

[Refactoring] Fix crash when refactoring protocol requirement to async

+protocol Foo {+// RUN: swift-refactor --convert-to-async -source-filename %s -pos=%(line+1):6 | %FileCheck %s+  func bar(for number: Int, completion: @escaping (_ success: Bool) -> Void)+}+// FIXME: The current async refactoring only refactors the client side and thus only adds the 'async' keyword.

I didn’t see that. Thanks. Moved the test case to basic.swift.

ahoppen

comment created time in an hour

push eventapple/swift

Alex Hoppen

commit sha 7707133dc00afba880d51f841c8959c5caeb3326

[TypeChecker] Fix assertion failure when using Self in extension that’s not on top-level We fail to resolve the extended type if an extension is not declared at the top level. This causes us to diagnose a lookup failure on `Self`. If the extended type is a protocol, we thus end up with a nominal Self type that’s not a class, violating the assertion that’s currently in place. To fix the crasher, convert the assertion to an `if` condition and issue a generic "cannot find type 'Self' in scope" in the else case. Cherry-picking 78d6fb2e260e558e92924f20b1ac06294316cce6 from the `main` branch.

view details

Alex Hoppen

commit sha 61bcb391bfcbd5a6dc34ba6970412c4efc7a09d7

Merge pull request #36988 from ahoppen/pr/rdar76329083-5.5 Cherry-Pick 5.5: [TypeChecker] Fix assertion failure when using Self in extension that’s not on top-level

view details

push time in 2 hours

PR merged apple/swift

Cherry-Pick 5.5: [TypeChecker] Fix assertion failure when using Self in extension that’s not on top-level

We fail to resolve the extended type if an extension is not declared at the top level. This causes us to diagnose a lookup failure on Self. If the extended type is a protocol, we thus end up with a nominal Self type that’s not a class, violating the assertion that’s currently in place. To fix the crasher, convert the assertion to an if condition and issue a generic "cannot find type 'Self' in scope" in the else case.

Cherry-picking https://github.com/apple/swift/pull/36818 from the main branch.

+29 -12

1 comment

2 changed files

ahoppen

pr closed time in 2 hours

pull request commentapple/swift

Cherry-Pick 5.5: [AST] Add method to create an implicit `SwitchStmt`

@swift-ci Please test

ahoppen

comment created time in 2 hours

PR opened apple/swift

Reviewers
Cherry-Pick 5.5: [AST] Add method to create an implicit `SwitchStmt`

There are a number of occurances that create implicit Switchs by passing SourceLoc() for all location paramters. Refactor those occurrences out to a separate createImplicit method that automatically fills the locations with invalid source locations.

Cherry-picking https://github.com/apple/swift/pull/36973

+31 -33

0 comment

7 changed files

pr created time in 2 hours

push eventapple/swift

Alex Hoppen

commit sha aa695298095fb5043956df2cd95988977de94c61

[AST] Add method to create an implicit `SwitchStmt` There are a number of occurances that create implicit `Switch`s by passing `SourceLoc()` for all location paramters. Refactor those occurances out to a separate `createImplicit` method that automatically fills the locations with invalid source locations.

view details

Alex Hoppen

commit sha 1504870004bc0e400c764008fb2bf27b3546d323

Merge pull request #36973 from ahoppen/pr/create-implicit-switch-stmt [AST] Add method to create an implicit `SwitchStmt`

view details

push time in 2 hours

PR merged apple/swift

[AST] Add method to create an implicit `SwitchStmt`

There are a number of occurances that create implicit SwitchStmts by passing SourceLoc() for all location paramters. Refactor those occurrences out to a separate createImplicit method that automatically fills the locations with invalid source locations.

As discussed here: https://github.com/apple/swift/pull/36930#discussion_r614238150.

+31 -33

4 comments

7 changed files

ahoppen

pr closed time in 2 hours

push eventapple/swift

Kim de Vos

commit sha a8fa3ba0ebc6133fa550e52a69cb776c5568ebef

Added helper variables and methods for SwiftSyntax gyb https://github.com/apple/swift-syntax/pull/268

view details

Alex Hoppen

commit sha efd413a6e24abb83a86d7f6c9779a836d6fc68cb

Merge pull request #36726 from kimdv/kimdv/add-more-properties-to-help-gyb-for-swift-syntax [libSyntax] Added helper variables and methods for SwiftSyntax gyb

view details

push time in 2 hours

PR merged apple/swift

[libSyntax] Added helper variables and methods for SwiftSyntax gyb

https://github.com/apple/swift-syntax/pull/268

This add a leading property for nodes and children. This will help generating code for SwiftSyntaxBuilder

+22 -8

4 comments

4 changed files

kimdv

pr closed time in 2 hours

pull request commentapple/swift

Support watchOS Simulator x86_64

Build failed Swift Test Linux Platform Git Sha - 1ed3583697e9a2fb1a154e972eda6770d6d0453b

shahmishal

comment created time in 2 hours

pull request commentapple/swift

Fix calling convention mismatch on `Builtin.getCurrentAsyncTask`

@swift-ci please smoke test

kateinoigakukun

comment created time in 2 hours

pull request commentapple/swift

Support watchOS Simulator x86_64

@swift-ci test Windows

shahmishal

comment created time in 3 hours

pull request commentapple/swift

Support watchOS Simulator x86_64

@swift-ci test Linux

shahmishal

comment created time in 3 hours

pull request commentapple/swift

Support watchOS Simulator x86_64

@swift-ci test new Xcode

shahmishal

comment created time in 3 hours

push eventapple/swift

Mishal Shah

commit sha 1ed3583697e9a2fb1a154e972eda6770d6d0453b

Update the test_should_skip_testing_32bit_watchos test

view details

push time in 3 hours