Skip to content

swiftwasm from master #917

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 84 commits into from
May 5, 2020
Merged

swiftwasm from master #917

merged 84 commits into from
May 5, 2020

Conversation

MaxDesiatov
Copy link

@MaxDesiatov MaxDesiatov commented May 5, 2020

The pull app stopped working for some reason, here's a manual merge PR. The issue is reported in wei/pull#200.

gottesmm and others added 30 commits April 29, 2020 23:18
The verifier is done, this is the correct thing to do. QED.
… and related idents requests.

Resolves rdar://problem/46409010
Resolves rdar://problem/48256383
We were asserting that the attribute range recorded in the AST started at the
same location as the fist unconsumed SyntaxNode in the file. This should be
true in most cases, but isn't for mispelled attributes, corrected in the AST
but not recognised or present in the list of SyntaxNodes. E.g.
@Availability(...) comes through as if @available(...) was specified, but
there's no SyntaxNode for it because we don't highlight invalid attributes
(to indicate they're invalid).

Resolves rdar://problem/62201594
Resolves https://bugs.swift.org/browse/SR-12500
The toolchain does not actually use any catalyst flavor, which resulted
in these paths actually being dead.  Cull them except for the one path
which simply computes the target triple.
In Podcast Player example of Intelligent Systems, struct `Observation` has var `podcastState`, while it has been referenced as `state` in the following cell. Changed it to `podcastState`.
…e a helper routine that stores into an outarray a cloner for each ManagedValue in the RValue.

This simplifies CleanupCloner so that it only needs to model the cleanup of a
single managed value. It also eliminates a tie in between RValue and
CleanupCloner which is not needed.
Try to redirect the module caches to the build root
…493da7dac83053c1a8e4ea4

[silgen] Eliminate stale comment.
…419f44d230f9528f6dd9dba

[silgen] Instead of creating a single CleanupCloner for an RValue, use a helper routine that stores into an outarray a cloner for each ManagedValue in the RValue.
Just seemed useful. I am going to use it in some new ARC code to enable me to
handle coroutine based apply sites differently.
The test expects the output location to be temp directory layout which
may not be the case.  Loosen the test to enable moving the temporary
directory.
rintaro and others added 26 commits May 4, 2020 13:02
Check if dependencies are modified since the last checking.
Dependencies:

 - Other source files in the current module
 - Dependent files collected by the dependency tracker

When:

 - If the last dependency check was over N (defaults to 5) seconds ago

Invalidate if:

 - The dependency file is missing
 - The modification time of the dependecy is greater than the last check
 - If the modification time is zero, compare the content using the file
   system from the previous completion and the current completion

rdar://problem/62336432
These test cases use shell variables etc.
…it in ownership verifier FileCheck tests instead of SILVerifier.

This will make it easier for me with a few further refactors to make the
ownership verifier testing mode emit per function error numbers instead of the
global error number that it is emitting now.

The reason why this is necessary is that today, the verification by
-sil-verify-all causes the errors to be emitted. That verification is done on a
per value level, rather than a per function level, so it is hard to get per
function error numbers without doing unprincipled things like propagating around
state saying what the current function being verified is.

This pass instead will let me make the error counter be per ErrorBuilder which
are created per function.

One thing to be aware of is that this /will/ cause SILValue::verifyOwnership to
not emit any output when the testing flag is enabled. This is to ensure I only
do not get duplicate textual error messages from the SILVerifier.
NFC. Just matching other parts of the compiler.
Extend function builders with support for for..in loops, such as

   for person in contacts {
     "Hello \(person.name)"
   }

The loop will be (eagerly) executed and all results will be collected
into an array. That array will be passed to a function `buildArray` to
produce the result from the loop. Specifically, the above will be
translated to the following when used with a function builder type
named `FunctionBuilder`,, where all $ names are introduced by the
compiler and are not user-visible:

    let $a1: $T1
    var $a2: [$T2] = []
    for person in contacts {
      let $a3: $T3
      let $a4 = FunctionBuilder.buildExpression("Hello \(person.name)")
      $a3 = FunctionBuilder.buildBlock($a4)
      $a2.append($3)
    }
    $a1 = FunctionBuilder.buildArray($a2)

where `$a1` is the result of the for-each loop.
https://bugs.swift.org/browse/SR-12732
3 AutoDiff test failures: crashing in SIL verification

Failing Tests (3):
06:26:12     Swift(macosx-x86_64) :: AutoDiff/validation-test/derivative_registration.swift
06:26:12     Swift(macosx-x86_64) :: AutoDiff/validation-test/custom_derivatives.swift
06:26:12     Swift(macosx-x86_64) :: AutoDiff/stdlib/derivative_customization.swift

Possibly from:

commit 738ef73
Author: Dan Zheng <[email protected]>
Date:   Mon May 4 00:44:48 2020 -0700

    [AutoDiff] Fix `@differentiable` attribute derivative configurations. (swiftlang#31524)
[IDE][SourceKit] Support escaped identifiers for the syntactic rename and related idents requests.
…962d4d262f239a4b74e437d

[ownership] In a few FileCheck, RUN: lines move %s before 2>&1.
- Detect same file with bufferID instead of the file name
- Compare virtual in-memory filesystem content with hash value
…a3c1f7a88d81fac297d0ee2

[ownership] Add new pass OwnershipVerifierTextualErrorDumper and use it in ownership verifier FileCheck tests instead of SILVerifier.
[CxxInterop] Fix static-var-irgen test for arm/ios
Fix paths in the Windows build guide
…eckdep-rdar62336432

[CodeCompletion] Give up fast-completion if dependent files are modified
…ents-of-inlinable-local-functions

Fix default arguments of inlinable local functions
…iftlang#30580)

Adding JVP and VJP function derivatives for pow function
defined in stdlib.

Resolves TF-1200.
build: clean up the mac catalyst flag handling in the host
…buildarray

[Function builders] Add for...in loop support via buildArray().
Remove extraneous `@usableFromInline` attribute.
`partial_apply` can be rewritten to `thin_to_thick_function` only if the
specialized callee is `@convention(thin)`.

This condition is newly exercised by the differentiation transform:
`{JVP,VJP}Emitter::visitApplyInst` generates argument-less `partial_apply`
with `@convention(method)` callees.

Resolves SR-12732.
@MaxDesiatov MaxDesiatov merged commit 72be2ca into swiftwasm May 5, 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.