Skip to content

[pull] swiftwasm from main #3876

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 58 commits into from
Nov 17, 2021
Merged

[pull] swiftwasm from main #3876

merged 58 commits into from
Nov 17, 2021

Conversation

pull[bot]
Copy link

@pull pull bot commented Nov 16, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

mikeash and others added 30 commits November 11, 2021 12:16
MetadataAllocator should never return NULL, but bugs or corruption could potentially make that happen. On the large path, switch from malloc to swift_slowAlloc, which aborts on failure. On the pool path, check for a NULL allocation pointer, and log a bunch of information about the allocation request and the allocator's current state.

rdar://84503396
`willreturn`
This function attribute indicates that a call of this function will
either exhibit undefined behavior or comes back and continues execution
at a point in the existing call stack that includes the current
invocation. Annotated functions may still raise an exception, i.a.,
`nounwind` is not implied. If an invocation of an annotated function does
not return control back to a point in the call stack, the behavior is
undefined.

I conservatively did not assume that the deinit is willreturn therefore
release like operations are not marked `willreturn`.

rdar://73574236
… mismatches

Diagnostics cannot assume that solution would always be applied
to the constraint system, so all of the elements affected by the
mismatch have to be determined by the fix.

Resolves: rdar://85021348
It's useful not only inside of isolation checking but in the
type-checker as well.
…stributed thunk

Make it possible for type-checker to determine whether the given
reference in the given context represents a call to a remote distributed
actor.
Use newly added `isDistributedThunk` check to determine whether
the given call is to a remote distributed actor and if so mark
it as implicitly throwing.

Resolves: rdar://83610106
…itter

This logic cannot live in `ActorIsolationChecker` because
all of the relevant information is only accessible through
constraint system while applying solutions.
…nger useful

`ConstraintSystem` has its own method to determine this.
Required for UnsafeRawPointer.withMemoryRebound(to:)

%token = bind_memory %0 : $Builtin.RawPointer, %1 : $Builtin.Word to $T

%0 must be of $Builtin.RawPointer type

%1 must be of $Builtin.Word type

%token is an opaque $Builtin.Word representing the previously bound types
for this memory region.
Required for UnsafeRawPointer.withMemoryReboud(to:).

%out_token = rebind_memory %0 : $Builtin.RawPointer to %in_token

%0 must be of $Builtin.RawPointer type

%in_token represents a cached set of bound types from a prior memory state.

%out_token is an opaque $Builtin.Word representing the previously bound
types for this memory region.

This instruction's semantics are identical to ``bind_memory``, except
that the types to which memory will be bound, and the extent of the
memory region is unknown at compile time. Instead, the bound-types are
represented by a token that was produced by a prior memory binding
operation. ``%in_token`` must be the result of bind_memory or
The protocols in the standard library are called `ExpressibleBy*` and SwiftSyntax should follow the same naming convention.
…e nightly toolchains

I don’t believe sk-stress-test and swift-evolve were used much and were adding ~20MB to the toolchain size. Let’s remove them.

rdar://85079653
The naming here has bothered me for a little while
now, it just sets the components, it doesn't
resolve anything.
The logic here could form AST loops due to passing
in `anchor` for the key path's parsed path.

However setting a parsed path here seems to be a
holdover from the CSDiag days, so set the path to
`nullptr` and rip out and the rest of the synthesis
and SanitizeExpr logic for it.

rdar://85236369
Now that the CSApply just uses components, we can
better split up the key path constructors to either
accept a set of resolved components, or a parsed
root or path.
[SwiftSyntax] Replace ExpressibleAs protocols by ExpressibleBy protocols
When a `@_cdecl` function is printed to a generated header, the types
it uses in its signature are not forward declared or imported, so the
header isn't usable unless you also add another Objective-C declaration
to the module (like a class or protocol) that uses the types to force
it.
[ClangImporter] Don't expect unmodularized structs to appear in 2 modules
…l-check

[Runtime] Add a NULL check to MetadataAllocator.
[CSApply/Distributed] Identify implicitly throwing calls while applying solution
gottesmm and others added 21 commits November 15, 2021 13:47
…instead of a bool.

The reason why I am doing this is that we are going to be enabling lexical
lifetimes early in the pipeline so that I can use it for the move operator's
diagnostics.

To make it easy for passes to know whether or not they should support lexical
lifetimes, I included a query on SILOptions called
supportsLexicalLifetimes. This will return true if the pass (given the passed in
option) should insert the lexical lifetime flag. This ensures that passes that
run in both pipelines (e.x.: AllocBoxToStack) know whether or not to set the
lexical lifetime flag without having to locally reason about it.

This is just chopping off layers of a larger patch I am upstreaming.

NOTE: This is technically NFC since it leaves the default alone of not inserting
lexical lifetimes at all.
The existing insert method preserves insertion order, but the
atomic queue use case actually wants to *reverse* the natural
insertion order.
Revert "[Index] Apply RelationContainedBy role to references contained by VarDecl."
[PrintAsObjC] Import/fwd-declare types used in `@_cdecl` functions.
…#39597)

* Generate Unicode data for Scalar Binary Properties

* Use native scalar binary property lookup

* Add _BinaryProperties to Scalar Properties

narrow access control

* Upgrade the notice to a warning in UnicodeScalarProperties
One fix allows extending nested records in other modules, the other fixes the same issue for namespaces.
Make the continuation type's conformances to the `Sendable` protocol
conditional on the sendability of the result yielded when the
resumption is performed. This ensures that one cannot silently escape
a continuation's result out of a task or actor, closing a safety hole
in Sendable checking.

Fixes rdar://85419546.
…744770c71ce40ca6f0459ff

[move-operator] Specify if LexicalLifetimes is enabled using an enum instead of a bool.
[Distributed] Improve error messages for protocol conformances
…ed extensions for synthesized conformances

rdar://85426499
cmake: export the libswift target and the LIBSWIFT_BUILD_MODE that the lldb build can see it.
- Switch to using ListMerger for priority insertion.
- Move ready delayed jobs to the back to the queue instead of
  running them immediately, before anything currently in the queue.
- Respect priorities in delayed jobs.
- Use the proper std::chrono facilities for managing deadlines
  instead of doing all the math on nanoseconds since the epoch.
- Take advantage of the second word of queue-private storage to
  avoid allocating a separate job when a deadline fits there.
hamishknight and others added 6 commits November 16, 2021 14:14
…runtime_funs_with_willreturn

IRGen: Annotate runtime calls with `willreturn` attribute
…s-tester

[build-presets] Don't install sk-stress-test and swift-evolve into the nightly toolchains
…ss-modules

[cxx-interop] Fix two issues with extending nested types across modules.
…-improvements

Miscellaneous improvements to the cooperative global executor
@pull pull bot merged commit 0450382 into swiftwasm Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.