Skip to content

[pull] swiftwasm from master #1033

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

Closed
wants to merge 47 commits into from
Closed

[pull] swiftwasm from master #1033

wants to merge 47 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented May 18, 2020

See Commits and Changes for more details.


Created by pull[bot]. Want to support this open source service? Please star it : )

AnthonyLatsis and others added 12 commits May 8, 2020 03:15
Platform defines sem_open in Swift that calls through to the underlying
platform functions because sem_open is variadic. However, the
definitions here assume sem_t is non-nullable, but this assumption only
holds when the platform has nullability annotations on the semaphore
type, or the semaphore type on the platform is not an opaque pointer.

On OpenBSD specifically, the semaphore type is an opaque pointer without
any nullability annotations. This means that the type gets inferred as
UnsafeMutablePointer<sem_t?>? instead of UnsafeMutablePointer<sem_t>?.
To make sure the pointer values returned and their types match, we
introduce a conditional typealias.

The other option is to coerce everything to UnsafeMutablePointer<sem_t>?
but this would be a rather blunt instrument. While sem_open is public in
stdlib, it is not so much codified stdlib API, so this is a slightly
nicer approach.
The correct usage of "-SAME" is after the check-prefix, not in the
middle. I've updated the constants to what is emitted today.

Now with verified 32-bit fixes.
Even if a store is not dominating the loop exits, it makes sense to move it out of the loop if the pre-header also as a store to the same memory location.
When this is done, dead-store-elimination can then most likely remove the store in the pre-header.
Following swiftlang#31125 and swiftlang#31612, `-target` is not added automatically to
linker flags when that's needed (e.g. when building for Apple SDKs) --
mimic the logic used to add it for compiler flags.

Addresses rdar://63138761
Permit the directory style `.swiftmodule` on non-Apple targets.  This
allows all platforms to use the directory layout enabling
multi-architecture SDKs.  This not only unifies the layout of the SDK
across the various targets, it also enables Windows to have a single
unified SDK.

The complexity here is due to the compatibility for older layouts.  This
change does not break compatibility on Linux/Android/Windows for the old
style layout.
LICM: enable more stores to moved out of a loop
[update-checkout] swift-argument-parser 0.0.5 -> 0.0.6
This removes the last reference to the `llvm::` namespace in the
standard library.  All uses of the LLVMSupport library now are
namespaced into the `__swift::__runtime` namespace.  This allows us to
incrementally vend the LLVMSupport library and make the separation
explicit.
compnerd and others added 17 commits May 18, 2020 15:11
Adjust the test to care for environments which cannot handle direct
references across modules.  This field needs to be filled in at runtime.
…rabledc

[NFC] AST: Relocate some conformance lookup client methods from DeclContext to IterableDeclContext
…s_OpenBSD

[stdlib] sem_t is a nullable pointer on OpenBSD.
Similar to swiftlang#28486 in motivation.
Before this change 'count' got lowered to multiple 'endIndex' calls

Fixes rdar://46702232
Add a test to ensure that the standard library does not accidentally end
up with symbols in the `llvm::` namespace.  The LLVMSupport symbols for
now are namespaced to `__swift::__runtime` with the desire that they
will move into `swift::` and become vended in the swift namespace.
build: remove last `llvm::` reference in stdlib
I don't see any reason to split the tests like this. I merged the tests
into the biggest and best-organized test file.

I also removed the `REQUIRES: OS=macosx` line and made some small
adjustments to the test to make it cross-platform.
This forces it to be inlined even in cold paths
This restores getSourceRange() on DefaultArgumentExpr after it was removed in
swiftlang#31184.

It was originally removed to solve the issues it was causing when computing the
source range of its parent TupleExpr. To account for trailing closures we walk
back through the tuple's arguments until one with a valid location is found,
which we use as the end location. If the last argument was a DefaultArgumentExpr
though that meant the end loc would end up being the tuple's start location, so
none of the tuple's other arguments were contained in its range, triggering an
ASTVerifier assertion. Source tooling and diagnostics don't care about default
arg expression locations as nothing can reference them, but their locations are
output in the debug info. Added a regression test to catch that in future, and
updated TupleExpr::getSourceRange() to ignore them when computing the end loc.

Resolves rdar://problem/63195504.
Allow empty input as PE/COFF does not provide a symbol table which results in no visible symbols.
[IRGen testing] Reapply: Fix bogus FileCheck check-prefix "-SAME" usage
This diagnostic logic is currently called from
`finishTypeChecking`, however it doesn't need to
be delayed until after all the source files have
been type-checked, only after they have all had
their imports resolved.

It can therefore be lifted into a request that
operates on a ModuleDecl, and be called from
TypeCheckSourceFileRequest. Being a request will
ensure that the pass is only run once across the
module.

Eventually we'll probably want to re-do import
resolution so that it operates on an entire
module. At that point, we'll want to look at
integrating this diagnostic logic into it.
owenv and others added 9 commits May 18, 2020 18:23
[Diagnostics] Rely on clang headers for .dia block and record IDs
Invert if statement in filesystem for clearer intent.
…Quadrature.swift

Fixes example snippets in Quadrature.swift
…-source-loc

[AST] Restore getSourceRange() on DefaultArgumentExpr
The last reader of this bit was the legacy integrated REPL.
While refactoring in 48805b1, I accidentally added the computation of this bit before CompilerInstance::setupInputs is called. This means that the compiler currently does not have any knowledge of any primary input buffers, and thus the check for whole module mode is trivially true. As a consequence, this bit has been true ever since.

Since we seem to have got on just fine without computing this correctly, just inline that truthiness everywhere.

Whoops
@pull pull bot added the merge-conflict Resolve conflicts manually label May 19, 2020
CodaFi and others added 9 commits May 18, 2020 20:07
We actually wanted to use forEachFileToTypeCheck, which will restrict
the source files we analyze to just the given primaries in incremental
mode, and the whole module's source files otherwise.
[NFC] Clean Up Some Unneeded TypeCheckerOptions
Consolidated four CoreGraphics execution tests
[stdlib] Make non-native ArrayBuffer.capacity smaller
Fixes a compiler warning.
NFC
test: ensure that we do not regress the standard library isolation
…fication

Serialization: permit the directory layout on non-Apple targets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.