Skip to content

[pull] swiftwasm from master #1426

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 60 commits into from
Jul 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ead9bc3
[ModuleInterface] Don't print SPI attributes on unsupported decls
xymus Jun 5, 2020
f44cbe4
[Foundation] Update & simplify class name stability check
lorentey Jul 2, 2020
f361b25
[Explicit Module Builds] Add canImport functionality to the ExplicitS…
artemcm Jul 8, 2020
b614a4d
Sema: Don't look through nested typealiases when checking for unsuppo…
slavapestov Jul 8, 2020
9bcb549
[AST] Prefer the 'macOS' spelling over 'OSX' when printing the platfo…
Jun 29, 2020
1ac9acb
Sema: We don't have to explicitly set the type of the main function
slavapestov Jul 8, 2020
56a0b82
Sema: Lazily synthesize body of main function
slavapestov Jul 8, 2020
50632d2
Sema: Add a request to synthesize the main function
slavapestov Jul 8, 2020
244dc4a
[AST] Rename PlatformKind::OSX to PlatformKind::macOS
Jul 8, 2020
f858309
Sema: EmittedMembersRequest forces SynthesizeMainFunctionRequest
slavapestov Jul 8, 2020
7bc5088
Sema: Check declaration attributes before checking members
slavapestov Jul 8, 2020
505d87c
[Foundation] Extract logging details to a standalone function
lorentey Jul 9, 2020
94e9263
Sema: Fix crash on circular reference in checkContextualRequirements()
slavapestov Jul 9, 2020
1f5433f
Add regression test for rdar://64759168
slavapestov Jul 9, 2020
e4a8e0e
Remove -sil-merge-partial-modules
hamishknight Jul 9, 2020
b42910a
[test] Reenable NSValueBridging tests on i386
lorentey Jul 9, 2020
3de9e5a
Rename synthesized initializer test to follow the pattern
gribozavr Jul 9, 2020
03411af
[SIL] Convert computeLoweredRValueType to CanTypeVisitor
davezarzycki Jul 9, 2020
a405da4
Merge pull request #32776 from slavapestov/fix-circularity-crash
slavapestov Jul 9, 2020
3d6d186
Merge pull request #32767 from slavapestov/requestify-main-attr
slavapestov Jul 9, 2020
a689dd2
Merge pull request #32761 from slavapestov/typealias-member-reference…
slavapestov Jul 9, 2020
40104ba
Link against the C++ standard library when C++ interop is enabled (#3…
martinboehme Jul 9, 2020
7fccbad
[AutoDiff] NFC: Reimplement `PullbackCloner` using pimpl pattern. (#3…
dan-zheng Jul 9, 2020
6f97c7a
test: make `test_util` more python 3 friendly
compnerd Jul 9, 2020
67073c7
Fix typo in comparison in comments and help text
ffried Jul 9, 2020
0de3535
Merge pull request #32785 from davezarzycki/pr32785
davezarzycki Jul 9, 2020
6df3d90
[NFC] AssociatedTypeInference: Improve dumping of an inference solution
AnthonyLatsis Jul 8, 2020
42b19b7
[NFC] Remove a redundant location print after dumping a decl reference
AnthonyLatsis Jul 9, 2020
09ee4a6
Update test_util.py
compnerd Jul 9, 2020
2701a08
[metadata prespecialization] Ptrauth for compared protocol conformances.
nate-chandler Jul 9, 2020
de27747
Merge pull request #32211 from xymus/fix-invalid-spi-attr
xymus Jul 9, 2020
2a70360
Merge pull request #32787 from ffried/fix_comparison_typo
swift-ci Jul 9, 2020
60be1fd
Merge pull request #32786 from compnerd/2-steps-forward-3-steps-back
compnerd Jul 9, 2020
94cb223
Merge pull request #32765 from AnthonyLatsis/readable-dump
AnthonyLatsis Jul 9, 2020
2e02377
Merge pull request #32783 from gribozavr/improve-synthesized-initiali…
gribozavr Jul 9, 2020
5c3f34f
Merge pull request #32781 from lorentey/NValueBridging-adjustment
gribozavr Jul 9, 2020
3543cf8
Cleanup MemAccessUtils.
atrick Jul 9, 2020
17be66c
[PlaceholderExpansion] Omit return type in closure signature
rintaro Jul 9, 2020
f8ee94d
Merge pull request #32777 from hamishknight/out-of-the-link
hamishknight Jul 9, 2020
7dd220f
Merge pull request #32754 from artemcm/CanImportExplicitly
artemcm Jul 9, 2020
69ff5be
Merge pull request #32791 from nate-chandler/generic-metadata-prespec…
nate-chandler Jul 9, 2020
f074995
test: partially undo changes to `PathSanitizingFileCheck`
compnerd Jul 9, 2020
0b5dbb1
[swift-ide-test] Add indicator of "reusing ASTContext" to the result
rintaro Jul 9, 2020
b77d68a
[build-script] Tie llvm, swift, and lldb to the same sysroot
vedantk Jul 10, 2020
01a44bb
[Test] Xfail attr/attr_originally_definedin_backward_compatibility.sw…
nate-chandler Jul 10, 2020
2bc97cf
Merge pull request #32790 from atrick/cleanup-memaccess
swift-ci Jul 10, 2020
962e0bb
Merge pull request #32606 from nathawes/prefer-macOS-to-OSX-spelling-…
Jul 10, 2020
d966dbb
Merge pull request #32676 from lorentey/simplify-checkclass
lorentey Jul 10, 2020
383482b
[AutoDiff] Fix derivative generic signature same-type requirements. (…
dan-zheng Jul 10, 2020
4f10601
Merge pull request #32804 from nate-chandler/rdar64298096
swift-ci Jul 10, 2020
d1a54a5
Merge pull request #32802 from vedantk/pass-sysroot
JDevlieghere Jul 10, 2020
28e7bc6
Merge pull request #32801 from rintaro/ide-completion-test-reusingast…
rintaro Jul 10, 2020
185317f
Merge pull request #32779 from rintaro/ide-completion-closureplacehol…
rintaro Jul 10, 2020
2daf6cd
[gardening] Update SILLowerAggregateInstrs to be of a more modern style.
gottesmm Jul 10, 2020
c6812ce
[Test] Mark executable test appropriately.
nate-chandler Jul 10, 2020
ab458d0
Merge pull request #32813 from nate-chandler/fix-test-validation-test…
nate-chandler Jul 10, 2020
c5270a5
[Test] Xfail stdlib/NSValueBridging.swift
nate-chandler Jul 10, 2020
550f6fb
Merge pull request #32810 from gottesmm/pr-8065f86ba5642aaa24fc678591…
gottesmm Jul 10, 2020
7573a64
Merge pull request #32798 from compnerd/separate-issues
compnerd Jul 10, 2020
bfc63de
Merge pull request #32805 from nate-chandler/rdar64995079
swift-ci Jul 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/swift/ABI/MetadataValues.h
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,9 @@ namespace SpecialPointerAuthDiscriminators {
/// Runtime function variables exported by the runtime.
const uint16_t RuntimeFunctionEntry = 0x625b;

/// Protocol conformance descriptors.
const uint16_t ProtocolConformanceDescriptor = 0xc6eb;

/// Value witness functions.
const uint16_t InitializeBufferWithCopyOfBuffer = 0xda4a;
const uint16_t Destroy = 0x04f8;
Expand Down
1 change: 1 addition & 0 deletions include/swift/AST/ASTTypeIDZone.def
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ SWIFT_TYPEID_NAMED(ConstructorDecl *, ConstructorDecl)
SWIFT_TYPEID_NAMED(CustomAttr *, CustomAttr)
SWIFT_TYPEID_NAMED(Decl *, Decl)
SWIFT_TYPEID_NAMED(EnumDecl *, EnumDecl)
SWIFT_TYPEID_NAMED(FuncDecl *, FuncDecl)
SWIFT_TYPEID_NAMED(GenericParamList *, GenericParamList)
SWIFT_TYPEID_NAMED(GenericTypeParamType *, GenericTypeParamType)
SWIFT_TYPEID_NAMED(InfixOperatorDecl *, InfixOperatorDecl)
Expand Down
1 change: 1 addition & 0 deletions include/swift/AST/ASTTypeIDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class ConstructorDecl;
class CustomAttr;
class Decl;
class EnumDecl;
class FuncDecl;
enum class FunctionBuilderBodyPreCheck : uint8_t;
class GenericParamList;
class GenericSignature;
Expand Down
4 changes: 4 additions & 0 deletions include/swift/AST/DiagnosticsDriver.def
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ ERROR(cannot_find_migration_script, none,
ERROR(error_darwin_static_stdlib_not_supported, none,
"-static-stdlib is no longer supported on Apple platforms", ())

ERROR(error_darwin_only_supports_libcxx, none,
"The only C++ standard library supported on Apple platforms is libc++",
())

WARNING(warn_drv_darwin_sdk_invalid_settings, none,
"SDK settings were ignored because 'SDKSettings.json' could not be parsed",
())
Expand Down
6 changes: 6 additions & 0 deletions include/swift/AST/IRGenOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ struct PointerAuthOptions : clang::PointerAuthOptions {
/// Type descriptor data pointers when passed as arguments.
PointerAuthSchema TypeDescriptorsAsArguments;

/// Protocol conformance descriptors.
PointerAuthSchema ProtocolConformanceDescriptors;

/// Protocol conformance descriptors when passed as arguments.
PointerAuthSchema ProtocolConformanceDescriptorsAsArguments;

/// Resumption functions from yield-once coroutines.
PointerAuthSchema YieldOnceResumeFunctions;

Expand Down
4 changes: 2 additions & 2 deletions include/swift/AST/PlatformKinds.def
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
AVAILABILITY_PLATFORM(iOS, "iOS")
AVAILABILITY_PLATFORM(tvOS, "tvOS")
AVAILABILITY_PLATFORM(watchOS, "watchOS")
AVAILABILITY_PLATFORM(OSX, "macOS")
AVAILABILITY_PLATFORM(macOS, "macOS")
AVAILABILITY_PLATFORM(iOSApplicationExtension, "application extensions for iOS")
AVAILABILITY_PLATFORM(tvOSApplicationExtension, "application extensions for tvOS")
AVAILABILITY_PLATFORM(watchOSApplicationExtension, "application extensions for watchOS")
AVAILABILITY_PLATFORM(OSXApplicationExtension, "application extensions for macOS")
AVAILABILITY_PLATFORM(macOSApplicationExtension, "application extensions for macOS")
AVAILABILITY_PLATFORM(macCatalyst, "Mac Catalyst")
AVAILABILITY_PLATFORM(macCatalystApplicationExtension, "application extensions for Mac Catalyst")

Expand Down
17 changes: 17 additions & 0 deletions include/swift/AST/TypeCheckRequests.h
Original file line number Diff line number Diff line change
Expand Up @@ -2564,6 +2564,23 @@ class CustomAttrTypeRequest
void cacheResult(Type value) const;
};

class SynthesizeMainFunctionRequest
: public SimpleRequest<SynthesizeMainFunctionRequest,
FuncDecl *(Decl *),
RequestFlags::Cached> {
public:
using SimpleRequest::SimpleRequest;

private:
friend SimpleRequest;

// Evaluation.
FuncDecl *evaluate(Evaluator &evaluator, Decl *) const;

public:
bool isCached() const { return true; }
};

// Allow AnyValue to compare two Type values, even though Type doesn't
// support ==.
template<>
Expand Down
2 changes: 2 additions & 0 deletions include/swift/AST/TypeCheckerTypeIDZone.def
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,5 @@ SWIFT_REQUEST(TypeChecker, LookupAllConformancesInContextRequest,
Uncached, NoLocationInfo)
SWIFT_REQUEST(TypeChecker, SimpleDidSetRequest,
bool(AccessorDecl *), Cached, NoLocationInfo)
SWIFT_REQUEST(TypeChecker, SynthesizeMainFunctionRequest,
FuncDecl *(Decl *), Cached, NoLocationInfo)
4 changes: 2 additions & 2 deletions include/swift/Driver/Compilation.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace driver {
enum class OutputLevel {
/// Indicates that normal output should be produced.
Normal,

/// Indicates that only jobs should be printed and not run. (-###)
PrintJobs,

Expand All @@ -83,7 +83,7 @@ class Compilation {
const bool &EnableIncrementalBuild;
const bool EnableSourceRangeDependencies;

/// If not empty, the path to use to log the comparision.
/// If not empty, the path to use to log the comparison.
const StringRef CompareIncrementalSchemesPath;

const unsigned SwiftInputCount;
Expand Down
3 changes: 3 additions & 0 deletions include/swift/Driver/ToolChain.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ class ToolChain {
void getClangLibraryPath(const llvm::opt::ArgList &Args,
SmallString<128> &LibPath) const;

// Returns the Clang driver executable to use for linking.
const char *getClangLinkerDriver(const llvm::opt::ArgList &Args) const;

/// Returns the name the clang library for a given sanitizer would have on
/// the current toolchain.
///
Expand Down
2 changes: 2 additions & 0 deletions include/swift/Frontend/ModuleInterfaceLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ class ExplicitSwiftModuleLoader: public SerializedModuleLoaderBase {
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) override;

bool canImportModule(Located<Identifier> mID) override;

bool isCached(StringRef DepPath) override { return false; };

struct Implementation;
Expand Down
4 changes: 0 additions & 4 deletions include/swift/Option/FrontendOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,6 @@ def sil_unroll_threshold : Separate<["-"], "sil-unroll-threshold">,
MetaVarName<"<250>">,
HelpText<"Controls the aggressiveness of loop unrolling">;

// FIXME: This option is now redundant and should eventually be removed.
def sil_merge_partial_modules : Flag<["-"], "sil-merge-partial-modules">,
Alias<merge_modules>;

def sil_verify_all : Flag<["-"], "sil-verify-all">,
HelpText<"Verify SIL after each transform">;

Expand Down
12 changes: 10 additions & 2 deletions include/swift/Option/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Flag<["-"], "enable-only-one-dependency-file">, Flags<[DoesNotAffectIncrementalB
def disable_only_one_dependency_file :
Flag<["-"], "disable-only-one-dependency-file">, Flags<[DoesNotAffectIncrementalBuild]>,
HelpText<"Disables incremental build optimization that only produces one dependencies file">;


def enable_source_range_dependencies :
Flag<["-"], "enable-source-range-dependencies">, Flags<[]>,
Expand All @@ -167,7 +167,7 @@ HelpText<"Print a simple message comparing dependencies with source ranges (w/ f

def driver_compare_incremental_schemes_path :
Separate<["-"], "driver-compare-incremental-schemes-path">, Flags<[ArgumentIsPath,DoesNotAffectIncrementalBuild]>,
HelpText<"Path to use for machine-readable comparision">,
HelpText<"Path to use for machine-readable comparison">,
MetaVarName<"<path>">;

def driver_compare_incremental_schemes_path_EQ :
Expand Down Expand Up @@ -556,6 +556,14 @@ def disable_direct_intramodule_dependencies : Flag<["-"],
Flags<[FrontendOption, HelpHidden]>,
HelpText<"Disable experimental dependency tracking that never cascades">;

def enable_experimental_cxx_interop :
Flag<["-"], "enable-experimental-cxx-interop">,
HelpText<"Allow importing C++ modules into Swift (experimental feature)">;

def experimental_cxx_stdlib :
Separate<["-"], "experimental-cxx-stdlib">,
HelpText<"C++ standard library to use; forwarded to Clang's -stdlib flag">;


// Diagnostic control options
def suppress_warnings : Flag<["-"], "suppress-warnings">,
Expand Down
40 changes: 40 additions & 0 deletions include/swift/Runtime/FoundationSupport.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//===--- FoundationSupport.cpp - Support functions for Foundation ---------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// Helper functions for the Foundation framework.
//
//===----------------------------------------------------------------------===//

#ifndef SWIFT_RUNTIME_FOUNDATION_SUPPORT_H
#define SWIFT_RUNTIME_FOUNDATION_SUPPORT_H

#include "swift/Runtime/Config.h"

#if SWIFT_OBJC_INTEROP
#include <objc/runtime.h>

#ifdef __cplusplus
namespace swift { extern "C" {
#endif

/// Returns a boolean indicating whether the Objective-C name of a class type is
/// stable across executions, i.e., if the class name is safe to serialize. (The
/// names of private and local types are unstable.)
SWIFT_RUNTIME_STDLIB_SPI
bool _swift_isObjCTypeNameSerializable(Class theClass);

#ifdef __cplusplus
}} // extern "C", namespace swift
#endif

#endif // SWIFT_OBJC_INTEROP
#endif // SWIFT_RUNTIME_FOUNDATION_SUPPORT_H
Loading