Skip to content

[pull] swiftwasm from master #1185

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 34 commits into from
Jun 9, 2020
Merged

[pull] swiftwasm from master #1185

merged 34 commits into from
Jun 9, 2020

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 8, 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 30 commits May 18, 2020 15:10
And fix the name of the underlying vector.
Now that SIL files no longer interleave parsing
with type-checking, the query doesn't make much
sense. Inline it into its only client,
`shouldBuildSyntaxTree`.
Sink the `BuildSyntaxTree` and
`CollectParsedTokens` bits into
`SourceFile::ParsingFlags`, with a static method
to get the parsing options from the lang opts.

Also add a parsing flag for enabling the interface
hash, which can be used instead of calling
`enableInterfaceHash`.
The `SaveAndRestore` is unnecessary as `Parser`'s
constructor already sets up the interface hash,
and the request covers the `FrontendStatsTracer`.
Rename `Bag` to `Tokens`, and query the
SourceManager from the ASTContext instead of
storing it directly.
Currently when parsing a SourceFile, the parser
gets handed pointers so that it can write the
interface hash and collected tokens directly into
the file. It can also call `setSyntaxRoot` at
the end of parsing to set the syntax tree.

In preparation for the removal of
`performParseOnly`, this commit formalizes these
values as outputs of `ParseSourceFileRequest`,
ensuring that the file gets parsed when the
interface hash, collected tokens, or syntax tree
is queried.
This is temporarily swapped in as the token
receiver while backtracking, so make sure we don't
try to call `finalize` on it.
Start with some high-level checks of whether a declaration is formally final, or has no visible overrides
in the domain of the program visible to the SIL module.

We can eventually adopt more of the logic from the Devirtualizer pass to tell whether call sites are
"effectively final", and maybe make the Devirtualizer consume that information applied by this pass.
The fact that a declaration has `@_show_in_interface` shouldn't be
used to decide whether something has underscored naming, which
is just one specific kind of check regarding naming only.

Move the check for this attribute out one level.

rdar://63120829
… multiple non-trivial operands.

<rdar://problem/63950481>
A previous commit inadvertently changed the
logic such that the member hash of an extension
body would be set to a partial interface hash.
Luckily this shouldn't have caused any behavioural
change as the interface hash itself would have
been left unaffected.

This commit makes sure we preserve the original
behaviour where if we don't have the body tokens
hashed separately, we give the body hash a default
constructed MD5.

Noticed by inspection.
Use `shouldBuildSyntaxTree` instead.
Introduce a `PruneVTables` pass to mark non-overridden entries.
Previously a bool argument was passed to
isCanonicalSpecializedNominalTypeMetadataStaticallyAddressable to
indicate whether the metadata was to be used only from a specialized
metadata accessor.  Here, that bool is replaced with an enum.
…0829-show-in-interface-not-underscored

[SymbolGraph] Don't consider @show_in_interface for underscored names
Lift the `DisablePoundIfEvaluation` parsing option
into `LangOptions` to subsume the need for the
`EvaluateConditionals` parameter, and sink the
computation of `CanDelayBodies` down into
`createSourceFileForMainModule`.
Rather than waiting until one of the performXXX
methods are called, make sure all the main module's
files have been populated up-front by
`getMainModule`.
Move into `performEndOfPipelineActions`, and move
the call up a bit in `performCompile` to make sure
it gets called even for a parse-only invocation.

Unfortunately this requires carving out an
exception for `-emit-imported-modules`, which can
load modules.
Most clients were only using it to populate the
main module with files, which is now done by
`getMainModule`. Instead, they can now just rely
on parsing happening lazily.
Now that it no longer needs to handle the
parse-only case, we can simplify things by having
`performSema` call into
`performParseAndResolveImportsOnly`.
So that these identifiers aren't turned into links.

rdar://63941806
…ces a DAG build graph.

Some notes:

* I am purposely trying to not do something too crazy here. My hope is that this
  can tied us over until we can remove a bunch of build-script logic (after
  build-script-impl is destroyed).

* Given this need for simplicity, I purposely did something really simple: I
  assumed the build-graph was a DAG. This makes it really easy to compute a
  topological ordering just by computing RPOT numbers from POT numbers. That is
  what I did in this implementation.

I haven't wired it up to anything and just added a simple test that shows how it
can properly infer from a toy dependency tree the dependencies of a "toy
swiftpm" project.
…7985-fully-qualified-title

[SymbolGraph] Use fully qualified name for type's page titles
…0ecdd3afe8df66b67ba01b0

[semantic-arc-opts] Teach semantic-arc-opts how to handle tuples with multiple non-trivial operands.
[NFC] AST: Push up a fast path in TypeBase::getContextSubstitutions
nate-chandler and others added 4 commits June 8, 2020 15:35
…a-prespecialization-components/enum-not-bool

[metadata prespecialization] NFC: Replaced bool with enum.
…1806-dont-link-self-fragment

[SymbolGraph] Don't add precise identifier to `Self` fragment
…3271019b129f8436acd493e

[build-script] Add a really simple build scheduler that assumes/enforces a DAG build graph.
@kateinoigakukun kateinoigakukun merged commit 265111f into swiftwasm Jun 9, 2020
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.

8 participants