Skip to content

Resolve conflicts with the main branch #2965

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
merged 24 commits into from
Apr 11, 2021
Merged

Resolve conflicts with the main branch #2965

merged 24 commits into from
Apr 11, 2021

Conversation

MaxDesiatov
Copy link

No description provided.

shahmishal and others added 24 commits April 8, 2021 23:26
- stop storing the parent task in the TaskGroup at the .swift level
- make sure that swift_taskGroup_isCancelled is implied by the parent
  task being cancelled
- make the TaskGroup structs frozen
- make the withTaskGroup functions inlinable
- remove swift_taskGroup_create
- teach IRGen to allocate memory for the task group
- don't deallocate the task group in swift_taskGroup_destroy

To achieve the allocation change, introduce paired create/destroy builtins.

Furthermore, remove the _swiftRetain and _swiftRelease functions and
several calls to them.  Replace them with uses of the appropriate builtins.
I should probably change the builtins to return retained, since they're
working with a managed type, but I'll do that in a separate commit.
…rt for borrows.

This is code that was written at the very beginning of Swift and has some early
style remaining interspirsed with newer swift style code. Since I am going to be
touching this and I don't expect other people to touch it for a while, I am
fixing up the formatting/reorganizing rather than leaving the style inconsistent.
…loc promotion, and a generalized MemoryToRegisters.

This code organization already existed in the file in content, but all of the
routines were mixed together. This splits the code by topic providing to the eye
easy code locality when reading.
`TaskGroup::offer(completedTask)`:
* Called from `AsyncTask::completeFuture()` which already takes care of
  `release(completedTask)`.  No additional edge is required if no task
  is waiting and completed task is stored so it can be retrieved by
  `group.poll()`.
* If group has waiting task, it will be dequeued and scheduled, add
  `acquire(waitingTask)`.

`TaskGroupImpl::poll(waitingTask)`:
* If no pending tasks, do nothing.
* If returning finished task, `acquire(finishedTask)`.
* If enqueuing waiting task, `release(waitingTask)`.

Note: `release()` should go before, and `acquire()` after the annotated
      synchronization operation.

Radar-Id: rdar://75910632
…ze-aware-cache

[AST] make ASTContext RawComment cache aware of serialization
…a5e9bb721447e75f17e4d26

[mem2reg] Before adding support for promoting allocations with load_borrow, modernize/standardize style
…oncurrency-import

Revert "Enable import of the _Concurrency module by default."
…-target-cpu

Use %target-cpu in the tests to support running on Apple Silicon hard…
…ationHandler_arm64e_windows

Fix with cancellation handler arm64e windows
# Conflicts:
#	stdlib/public/Concurrency/TaskGroup.swift
@MaxDesiatov MaxDesiatov marked this pull request as draft April 11, 2021 14:29
@MaxDesiatov MaxDesiatov marked this pull request as ready for review April 11, 2021 14:30
@MaxDesiatov MaxDesiatov enabled auto-merge April 11, 2021 14:30
@MaxDesiatov MaxDesiatov merged commit 1c992c7 into swiftwasm Apr 11, 2021
@MaxDesiatov MaxDesiatov deleted the maxd/main-merge branch April 19, 2021 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants