Skip to content

[pull] swiftwasm from main #1891

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 16 commits into from
Oct 2, 2020
Merged

[pull] swiftwasm from main #1891

merged 16 commits into from
Oct 2, 2020

Conversation

pull[bot]
Copy link

@pull pull bot commented Oct 2, 2020

See Commits and Changes for more details.


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

Josh Learn and others added 13 commits October 1, 2020 12:14
The compiler stubs for testing the OSLog implementation are in need of an update. This change updates the stubs to be consistent with the current OSLog implementation, updates the existing tests, and adds new tests for String and metatype interpolations.

rdar://69719729
This infrastructure has more than proven itself. Drop the code paths and tests supporting the status quo.
In order for type body fingerprints to work, these declarations must always be included. Drop the ability to turn this off.
Remove the GPU builder status for TensorFlow which is currently not running.
The parser's own re-declaration checking for local declarations has
slightly different behavior than Sema's re-declaration check.

Whereas Sema rejects this:

class C {
  let x = 123
  func x() {}
}

The parser accepts this:

func f() {
  let x = 123
  func x() {}
}

With Sema's check now handling both cases, fudge the behavior to
match the parser in the local case.
…indings when IncludeOuterResults is set

The old behavior was that ASTScope would introduce all VarDecls
defined in a BraceStmt at the beginning of the BraceStmt.

I recently enabled the use of PatternEntryDeclScopes, which
introduce the binding at its actual source location instead of
at the beginning of the parent statement.

This patch now makes use of the new information by having
UnqualifiedLookupFlags::IncludeOuterResults toggle between
the two behaviors. When searching for outer results, we also
consider all VarDecls in a BraceStmt, not just those in scope.

This is implemented by giving AbstractASTScopeDeclConsumer a
new entry point, consumePossiblyNotInScope(). When looking up
into a BraceStmt, all VarDecls are passed in to this entry
point.

The default implementation does nothing, which means that
ASTScope::lookupSingleLocalDecl() now respects source locations
when searching for bindings, just like parse-time lookup.

However, Sema's preCheckExpression() pass, which sets
Flags::IgnoreOuterResults, will continue to find
forward-referenced VarDecls, just as it did with the old
context-based DeclContext lookup.
Before performing an UnqualifiedLookup with Flags::IncludeOuterResults
turned on, call ASTScope::lookupSingleLocalDecl() to find local
bindings that precede the current source location.

If this fails, we perform an unqualified lookup to try to find
forward references to captures, type members, and top-level
declarations.
…clConsumer::consume()

It wasn't used for anything, and it was always set based on whether
the declaration in question was a GenericTypeParamDecl, a ParamDecl,
or something else.
…ookup

Implement backward-compatible closure capture behavior with parser lookup disabled
The change in swiftlang#33654 had the effect of not leveraging dsymutil
parallelism -- pass instead multiple file at once.

Addresses rdar://69550787
porglezomp and others added 3 commits October 2, 2020 10:37
This prevents us from picking up the .gitkeep file and any other stray
files that might end up in there.
[OSLog] Update compiler stubs and tests
Remove Type Body Fingerprints Flags
@pull pull bot merged commit a1f2fef into swiftwasm Oct 2, 2020
pull bot pushed a commit that referenced this pull request Dec 22, 2020
The target was added for Unix toolchains in #901, but a later pull #1891 added
it again. Since clang only uses the last target flag that's passed in, all
customization done for the first one was unused these last 4+ years, so remove
it and change tests that look for custom strings passed by the first one.
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.

6 participants