profile
viewpoint

apple/swift 53917

The Swift Programming Language

apple/llvm-project 273

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. This fork is used to manage Apple’s stable releases of Clang as well as support the Swift project.

hamishknight/Pie-Chart-View 29

A simple UIView subclass that creates a pie chart

hamishknight/Callback-Closure-Chaining 6

A simple example of how callbacks can be chained in Swift

hamishknight/VU-Meter-Arc 5

Creates a simple arc with a set number of graduations

hamishknight/JSON-Fragment-Decoding 3

A JSONDecoder extension to allow decoding JSON fragments

hamishknight/Car-Sub-Image 1

Aligns a sub-image into a scaled down image in a UIImageView

hamishknight/Circle-Loader 1

A simple circle loading view

hamishknight/Circle-Pie-Animation 1

A simple circle pie animation in Core Animation

hamishknight/Fading-Trail-Path 1

A simple project for a Core Graphics rendered path that the user can draw and will then fade away.

push eventhamishknight/swift

Butta

commit sha 69d04aad08da3245f87c6a2df35869126d48b55e

[linux] remove absolute rpath of /usr/lib/swift/linux added to many shared libraries This was presumably added as a backup, in case the libraries in a toolchain couldn't be found, but will not work well, so take it out.

view details

Martin Boehme

commit sha a5e953b69009b59541420d06496206a26961a976

Add support for calling C++ constructors. Because C++ constructors always take a `this` pointer to the object to be initialized, we mark the SIL function return type with the `@out` attribute. On the IRGen side, we retrofit support for formal indirect return values as well as thin metatypes.

view details

Martin Boehme

commit sha 7ad2eef26508ad92d8d92f2d5546913c0ced3bbd

Only import constructors marked `noexcept`.

view details

Martin Boehme

commit sha 384854810a60a69c8df8a8c0248e209adc28c295

Revert "Only import constructors marked `noexcept`." This reverts commit 29650d8c1f302708a32304d49c703c9ddbf30b75. As discussed here, we want to import all constructors (whether they are marked `noexcept` or not) as non-throwing initializers; https://forums.swift.org/t/handling-c-exceptions/34823/50

view details

Martin Boehme

commit sha fd00bc1f01357ecd264b8216373c23014771c124

Move tests from `CXXInterop` to `Interop/Cxx`. This is the canonical location that we've agreed on.

view details

Martin Boehme

commit sha e6067275a6659cfab8640e68e93a5bba36ddca20

Duplicate changes to GenClangType in ClangTypeConverter. See discussion here: https://github.com/apple/swift/pull/30630#discussion_r398967412

view details

Martin Boehme

commit sha b2c5a3eeed4e0d80c819f98c816481fbedc49526

Add a constructor thunk if required to add additional constructor arguments. Also add more IR tests and make various other changes.

view details

Martin Boehme

commit sha 3066e16c37e26a5fea370877409b4d0bd1c0fea6

Remove redundant "cxx" from test names.

view details

Martin Boehme

commit sha 5644137ea0696164c5b5835179b1ec450d508c88

Eliminate duplication of code for adding empty argument names.

view details

Martin Boehme

commit sha bed26039446c189a82c453126e0a622e43c6256d

Various changes after merging master: - Adapt tests to changes that have happened in the meantime (e.g. `HasVirtualBase` is rightly no longer considered loadable) - Don't import copy or move constructors (noticed this because references are now imported correctly, so copy and move constructors suddenly started showing up in the SIL test) - Don't try to define an implicitly-deleted default constructor (this previously broke loadable-types-silgen.swift)

view details

Martin Boehme

commit sha beaaa742c3e774b6739de26bb1a3f0c8761512a5

Don't put an `sret` attribute on the `this` argument.

view details

Martin Boehme

commit sha 8416ccfa06d05da67af70a8ed57a2f120ea251b2

Rename constructors-ir.swift to constructors-irgen.swift.

view details

Martin Boehme

commit sha 8f6042aa0870a527505262c7dbe89ec7ffe20e12

Add additional IR tests for a class without a virtual base class.

view details

Martin Boehme

commit sha c9405fb7fc338f59db4386488245a3ce82227e00

Add Windows-name-mangled version of symbol to SIL test.

view details

Martin Boehme

commit sha cb4ddda6e2292c584cb83905f3f9df17a4e017f1

Avoid crashing if lldb imports C++ structs without enabling C++ interop.

view details

Martin Boehme

commit sha 33e8c717f2682b913eb04e1c7746c84315be90ef

Update comment in VisitCXXRecordDecl().

view details

Martin Boehme

commit sha 7e8ea120701b33958a1adca9e885a99f5d583607

Respond to review comments.

view details

Martin Boehme

commit sha 1ce3753d08522cefe255f4acf498dba5085aa60a

Another response to review comments.

view details

Martin Boehme

commit sha faca489c6f524096019fd124cba847949972e0db

Add a test that Objective-C types passed to a C++ constructor are bridged correctly.

view details

Martin Boehme

commit sha 83b51b95b534108494de1032bb4e098274fe606b

Add SILGen and IRGen tests for passing Objective-C types to C++ constructors.

view details

push time in 10 hours

push eventhamishknight/swift

Erik Eckstein

commit sha 007351223eb96a1a0132953a219b12d9b06ec0e7

MemBehavior: handle begin_access when checking for apply side-effects.

view details

Erik Eckstein

commit sha 68db2e7c6ce6f2bf9cdce1add556ef69971bc6a1

TempRValueOpt: don't use collectLoads in tryOptimizeStoreIntoTemp This refactoring removes a lot of special-casing in collectLoads and also makes tryOptimizeStoreIntoTemp simpler. It's a NFC.

view details

Erik Eckstein

commit sha 673b8873ab2930c0497944411a28070877883591

TempRValueOpt: refactoring: simplify the signature of collectLoads It's sufficient to pass the operand instead of the operand, the user and the operand value. NFC.

view details

Erik Eckstein

commit sha d569031f1a367281871ba18c92f385ffa0cafa7d

TempRValueOpt: move the mayWrite-check for applies from collectLoads to checkNoSourceModification ... where it belongs. This is mostly refactoring, but it also fixes a bug: we don't recurse into a begin_access in collectLoads. If there is an apply in such a scope, the mayWrite-check wouldn't be done. In checkNoSourceModification all instructions are visited, so the check is always done.

view details

Erik Eckstein

commit sha 7c293d8de960045fbe2d1717aa21481d801cd036

TempRValueOpt: fix the handling of begin_access Consider the related end_access instructions as uses to correctly mark the end of the lifetime of the temporary. This fixes a miscompile in case there is a modification of the copy-source between an begin_access and end_access.

view details

Erik Eckstein

commit sha 6310dfcc939d88664d1fb63a908f1139e9cf6b47

TempRValueOpt: fix the handling of load [take] load [take] was not considered as a use and it was not detected if it's in a different basic block. This fixes a miscompile in case there is a modification of the copy-source before a load [take]. rdar://problem/69757314

view details

Erik Eckstein

commit sha 9a10ec7d581345cbfcd15990c54848ca1b25dc8c

SILBuilder: add an API to insert _after_ an instruction. ... and use that API in FullApplySite::insertAfterInvocation. Also change FullApplySite::insertAfterInvocation/insertAfterFullEvaluation to directly pass a SILBuilder instead of just an insertion point to the callback. This makes more sense (given the function names) and simplifies the usages. It's a NFC.

view details

Erik Eckstein

commit sha 4557f151b1e90b874f77736bdf4ab20df8affe69

TempRValueOpt: fix the placement of destroy_addr in case of a copy_addr [take] Instead of reusing the existing destroy_addr (or load/copy_addr [take]) of the temporary, insert a new destroy_addr - at the correct location. This fixes a memory lifetime failure in case the copy-source is modified (actually: re-initialized) after the last use of the temporary: E.g. (before copy elimination): copy_addr [take] %src to [initialization] %temp %x = load %temp // last use of %temp store %y to [init] %src destroy_addr %temp The correct location for the destroy_addr is after the last use (after copy elimination): %x = load %src destroy_addr %src store %y to [init] %src rdar://problem/69757314

view details

Erik Eckstein

commit sha 262c7b251f9d650231a394bedcd5d12ca527cc92

TempRValueOpt: don't allow copy_addr [take] from a projection of the temporary. This fixes a memory lifetime failure.

view details

Erik Eckstein

commit sha 1e5f3bd253f0fbfab7f39f176f321b3dce94d11b

TempRValueOpt: only do the check for "unusual" temp object destruction in non-OSSA mode. In OSSA, memory locations are always destroyed in a "visible" way, e.g. with destroy_addr or load [take].

view details

3405691582

commit sha f4b71b5077cd838ffe7caa8c1ae57653f033b766

[build] OpenBSD can install XCTest.

view details

Egor Zhdan

commit sha e893ecfaf0a3ec463994fa2f1cf46ef75177a95c

WinSDK: extract System.MCX submodule Currently this header gets included into `WinSDK.WinSock2` via `windows.h`

view details

Alexis Laferrière

commit sha 40ef504f38bb6fd147f9e39cee16bc0795e27abe

[Index] Don't report extensions with nothing to index in system modules The indexer was looking into “empty” extensions to public types, triggering computing their USR which could fail at deserializing the implementation-only imported types. As a solution, don’t index extensions with nothing to index in system modules. rdar://70225906

view details

Alexis Laferrière

commit sha b87fd1230b03bdf93edb3cdc859af983c8244e86

[Index] Update test related to reporting extensions in system modules

view details

Robert Widmann

commit sha f730ff1d54a874a68c8e04690d651e0f2544fe0b

Disregard Overridden Candidates in Infinite Recursion Check Disregard candidates that have known override points because those points are possible targets for dynamic dispatch. This removes a class of false positives involving classes with known override points in the module, as is this case in many node-based data structures. rdar://70410948

view details

Robert Widmann

commit sha baa45a1167023841b03ffebca9db58b67d9c80e2

[Gardening] Pull Out Callee Variable

view details

Saleem Abdulrasool

commit sha a757d7bd5c5e4e21cb861d911ab8d034041a243d

Merge pull request #34344 from egorzhdan/winsdk WinSDK: extract System.MCX submodule

view details

Robert Widmann

commit sha 789ada59f316f842d525980970b23c91b64b3f48

Merge pull request #34346 from CodaFi/override-overdrive Disregard Overridden Candidates in Infinite Recursion Check

view details

Alexis Laferrière

commit sha f6931c8905b9ee68a6e0711b6e6fa165fcef97f6

[Index] Test records of extensions in sources and modules

view details

Mishal Shah

commit sha 21f4cf6a9c77a7999b91745b1ffedfd640c86c21

[XFAIL] Disable validation-test/stdlib/CommandLine.swift (70423908)

view details

push time in 2 days

push eventhamishknight/swift

Keith Smiley

commit sha ae0c380f1b0f37e11b111a06634dd4c64e67b96c

Improve -*prefix-map help text Before: ``` -coverage-prefix-map <value> -debug-prefix-map <value> ``` After: ``` -coverage-prefix-map <prefix=replacement> -debug-prefix-map <prefix=replacement> ```

view details

Dave Lee

commit sha 52bbe11161f908d4c58cbdd2a423c68b9688b191

[build] Remove dash-dash from build-presets.ini (NFC)

view details

Arnold Schwaighofer

commit sha 96a0d0e5840045e25d2c05f02999972f804201df

Rename various IncludeUsableFromInlineAndInlineable to IncludeUsableFromInline `@inlinable` implies `@usableFromInline`. NFC intended.

view details

Xi Ge

commit sha 29093b15df24e98dda65cd51e26a7bd618a2d709

Driver: -L= belongs to the linker option group rdar://70300892

view details

Arnold Schwaighofer

commit sha a7259558238eadd1c69a234baef1b67ab45f8492

More renaming

view details

Arnold Schwaighofer

commit sha d6d921d7fafcfa67e500e6013f93ac30f6248b79

IRGen: Fix fixLifetime emission of enums rdar://70270724

view details

Arnold Schwaighofer

commit sha 1c85d201921abcedbd3a693229f597a6d015f81d

Try to appease 32bit tests

view details

Holly Borla

commit sha 1e0038c3be0f6f2fbe1ba6ccb7fa394b7320aa22

[ConstraintSystem] Remove implementation of operator designated types in the solver.

view details

Holly Borla

commit sha 4c0f49f7a6a7a642cd57aeec70e8b392f3296cf1

[ConstraintSystem] Remove selectApplyDisjunction, which was only used by the operator designated types implementation.

view details

Vedant Kumar

commit sha 7145afbd9d5683eeb54d142b0eab5ea2ba91fe32

[Demangler] Null-check a pointer before using it in arithmetic This addresses a UBSan -fsanitize=null diagnostic seen when compiling the stdlib: runtime error: applying non-zero offset 128 to null pointer

view details

Slava Pestov

commit sha 3d0e35e082c5f18da4a6eff30fe08706f26695fa

Sema: Remove a bit of dead code

view details

Slava Pestov

commit sha 94e999a1b55dd14284d96b60e1b67de7aae71dac

Sema: Pull availability checking out of resolveType() We used to diagnose references to unavailable declarations in two places: - inside Exprs, right after type checking the expression - inside TypeReprs, from resolveType() In broad terms, resolveType() is called with TypeReprs stored inside both Stmts and Decls. To handle the first case, I added a new overload of diagAvailability() that takes a Stmt, to be called from typeCheckStmt(). This doesn't actually walk into any Exprs stored inside the statement; this means it only walks Patterns and such. For the second case, a new DeclAvailabilityChecker is now defined in TypeCheckAccess.cpp. It's structure is analogous to the other three walkers there: - AccessControlChecker - UsableFromInlineChecker - ExportabilityChecker The new implementation of availability checking for types introduces a lot more code than the old online logic it replaces. However, I hope to consolidate some of the code duplication among the four checkers that are defined in TypeCheckAccess.cpp, and do some other cleanups that will make the benefit of the new approach apparent.

view details

Slava Pestov

commit sha baa9d7142aa1e24f4cf07672d250307e71bc90ab

Sema: Pull conformance exportability checking out of resolveType()

view details

Slava Pestov

commit sha 2a678f29dbcfd48b7ace489937e404ff68fb8f1e

Sema: Remove TypeResolutionFlags::AllowUnavailable{,Protocol}

view details

Slava Pestov

commit sha 5b38671b1c6f7199ee8b074a9be560517bad2b7a

sil-opt: Disable parser lookup This caught some invalid SIL in a SIL parser test.

view details

John McCall

commit sha 1cc3a57e9107f0b788c382739ea845f192f1546e

Test the just-built dylibs when building unittests on Darwin

view details

John McCall

commit sha 8ac43627540483dfb8c7bd0562a37cfd59ed8388

Implement a simple library for task cancellation and status management. There are things about this that I'm far from sold on. In particular, I'm concerned that in order to implement escalation correctly, we're going to have to add a status record for the fact that the task is being executed, which means we're going to have to potentially wait to acquire the status lock; overall, that means making an extra runtime function call and doing some atomics whenever we resume or suspend a task, which is an uncomfortable amount of overhead. The testing here is pretty grossly inadequate, but I wanted to lay down the groundwork here.

view details

Erik Eckstein

commit sha 6c85f267bf5e3c63b9fb1c69b27102c6800269bf

SimplifyCFG: fix a crash caused by an unreachable CFG cycles with block arguments. When SimplifyCFG (temporarily) produces an unreachable CFG cycle, some other transformations in SimplifyCFG didn't deal with this situation correctly. Unfortunately I couldn't create a SIL test case for this bug, so I just added a swift test case. https://bugs.swift.org/browse/SR-13650 rdar://problem/69942431

view details

Slava Pestov

commit sha 52b847e9afbb3b1ea74837c75fbf3ba64781ee8d

Merge pull request #34318 from slavapestov/sil-opt-parser-lookup sil-opt: Disable parser lookup

view details

Slava Pestov

commit sha 5cebe1b8d13347786b157e03de76fd2ec760bf71

Merge pull request #34310 from slavapestov/refactor-availability-checking Sema: Pull availability checking out of resolveType()

view details

push time in 5 days

PullRequestReviewEvent

Pull request review commentapple/swift

[SR-13732] [Sema] Fix crash on simplifyFix constraint for tuple mismatch

 ConstraintSystem::SolutionKind ConstraintSystem::simplifyFixConstraint(         else           newTupleTypes.push_back(smallerElt);       } else {-        if (largerElt.getType()->isTypeVariableOrMember())-          recordPotentialHole(largerElt.getType()->getAs<TypeVariableType>());+        if (largerElt.getType()->isTypeVariableOrMember()) {+          Type eltType = largerElt.getType();+          if (auto depMember = eltType->getAs<DependentMemberType>()) {+            eltType = depMember->getBase();+          }+          recordPotentialHole(eltType->getAs<TypeVariableType>());

Can this use castTo?

LucianoPAlmeida

comment created time in 5 days

Pull request review commentapple/swift

[SR-13732] [Sema] Fix crash on simplifyFix constraint for tuple mismatch

 ConstraintSystem::SolutionKind ConstraintSystem::simplifyFixConstraint(         else           newTupleTypes.push_back(smallerElt);       } else {-        if (largerElt.getType()->isTypeVariableOrMember())-          recordPotentialHole(largerElt.getType()->getAs<TypeVariableType>());+        if (largerElt.getType()->isTypeVariableOrMember()) {+          Type eltType = largerElt.getType();+          if (auto depMember = eltType->getAs<DependentMemberType>()) {+            eltType = depMember->getBase();

What if the base is another DependentMemberType? I think we want to continue digging through to the underlying type variable

LucianoPAlmeida

comment created time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventhamishknight/swift

Michael Gottesman

commit sha d3e6ffdbad9ed2af857508891a4530b7f11d4c6e

[lldb-toolbox] Add the ability to disassemble-to-file a specific function from a target without running the target. The routine already supports dumping the assembly to file if we are at a breakpoint using the current frame. This adds a -n option so one can without running just dump the assembly to a file of a specific function in a binary.

view details

Dave Lee

commit sha 27330f169df5d2dcb018ab2c6615d66be91d04e2

[build] Remove unused lldb cmake

view details

Mike Ash

commit sha 630aff7b19b80f29445b645424e20fd1bb6bd551

[Runtime] Change SimpleGlobalCache to use ConcurrentReadableHashMap instead of ConcurrentMap. This gives us faster lookups and a small advantage in memory usage. Most of these maps need stable addresses for their entries, so we add a level of indirection to ConcurrentReadableHashMap for these cases to accommodate that. This costs some extra memory, but it's still a net win. A new StableAddressConcurrentReadableHashMap type handles this indirection and adds a convenience getOrInsert to take advantage of it. ConcurrentReadableHashMap is tweaked to avoid any global constructors or destructors when using it as a global variable. ForeignWitnessTables does not need stable addresses and it now uses ConcurrentReadableHashMap directly. rdar://problem/70056398

view details

Nathan Hawes

commit sha 90418612f400b3e2c58c4f42c635b55840ffeed8

[CodeCompletion] Reuse CompletionContextFinder for fallback completion when no typeCheckExpression call is made ...and adjust the fallback context it choses now that ErrorExprs no longer cause constraint generation to fail. Also fix some issues with the fallback logic in typeCheckForCodeCompletion: 1) For completion expressions in multi-statement closures, we were assuming a separate typeCheckExpression call would be made when the outer expression produced a single solution that had a resolved type for the closure. If the solution contained other fixes unrelated to the closure however, it wasn't applied and a separate call for the body was never made. 2) typeCheckForCodeComplation sometimes falls back to regular expression type checking but didn't update the passed-in target's expression after santizing and prechecking it, which may have modified it and its sub-expressions. This triggered assertion failures in certain cases due to the mix of the stale top-level expression pointer being used with updated subexpressions.

view details

Pavel Yaskevich

commit sha 9239692d00eb7a5362fe18f42dfcd9ddc687f45c

[unittests] Add a fixture for Sema unit tests

view details

Pavel Yaskevich

commit sha 0b22d91c9416e57a37829a6c471770e53f96fee2

[unittests] Extend Sema testing fixture to load stdlib (+ shims) Setup module importers, load stdlib, establish separate testing module and load a single main file there which imports standard library.

view details

Pavel Yaskevich

commit sha b2c31c394b02c0b2ae97f61e57daeeef8c770087

[unittests/Sema] Add an ability to retrieve stdlib types by name

view details

Pavel Yaskevich

commit sha dc7c9c2bfa0167180ec19f7a26029e16ef03dd60

[unittests/Sema] Add a simple integer literal type inference test

view details

Pavel Yaskevich

commit sha 6e470f5fcd55e94d5010e4621bec225314327f50

[unittest/Sema] NFC: Switch to use `AttributedImport` instead of deprecated `ImportedModuleDesc`

view details

Pavel Yaskevich

commit sha 2d6456c03e5d52372c628995f392bfc36f607a28

[ConstraintSystem] NFC: Remove obsolete `getPotentialBindings` declaration It has been related with `inferBindingsFor` but declaration was left in the header.

view details

Michael Gottesman

commit sha 9163277d228e0e20dc33f71fdc9c52720b897cd0

Merge pull request #34202 from gottesmm/pr-a0fd6cbd3a716a3d0da4a2673fee297132b16b8d [lldb-toolbox] Add the ability to disassemble-to-file a specific function from a target without running the target.

view details

Artem Chikin

commit sha a09ae489994d1d3f9e7879fc1493d97e28e3de5d

[Dependency Scanner] Always add NonPathCommandLine arguments from Clang scan-deps result When building a set of command-line options required to build a Clang module, also add `NonPathCommandLine` from Clang's `ModuleDeps`. These flags are mandatory in order to build modules discovered by the scanner. Resolves rdar://70212660

view details

Rintaro Ishizaki

commit sha 4ab3cb15323e1a01fe45496109c6fd506fd6d6b7

Revert "Implements SR-11580" This reverts commit c311e451951b28afacebae69107cef28e4af9e44.

view details

Nathan Hawes

commit sha abd460817cfad6e6acc274752daadefa34747a39

Merge pull request #34287 from nathawes/reuse-completion-context-finder-for-fallback-completion [CodeCompletion] Reuse CompletionContextFinder for fallback completion when no typeCheckExpression call is made

view details

Pavel Yaskevich

commit sha fde1af756d336cb4c22067c99fe2c83a3b026012

[unittest/Sema] Use default target triple to fix Windows build

view details

Robert Widmann

commit sha 4351bd374af84b997525078c723dd05971ae9cd5

Use The Location of the Pattern Binding in Codable Fixit The code here used to use the location of the nearest place to insert attributes, which makes no sense. Use the pattern binding's location instead to ensure that we actually replace the 'let' part of the pattern every time. rdar://69971194

view details

Alexis Laferrière

commit sha 8307a8d58e7ec6c5396b8e27ee4170a2f9fb844e

[Sema] Don't require availability for implicit decls Suppress warnings in synthesized code. The parent decls should already show a warning. require_explicit_availability.StructWithImplicitMembers:2:16: warning: public declarations should have an availability attribute when building with -require-explicit-availability public var hashValue: Int { get } ^

view details

Doug Gregor

commit sha f089ba9464fc164f6dc4ce01dafb1ec2f545912c

[Concurrency] Propagation of actor constraints. Implement propagation rules for global actor constraints, which can come from: * Enclosing extension or type * Superclass of a class * Overridden declaration * Requirement witnessed by a declaration * Storage declaration for an accessor

view details

Robert Widmann

commit sha d793878923e04ffddf68de3ff8bbbeff5318f1f1

Schedule merge-modules When modulewrap Job is in the Queue In order to unblock the SwiftWASM project, which relies on an incremental build of the Swift driver that relies on the merge-modules job always being run. The situation appears to be something like this: 1) An incremental build is run 2) Temporary swiftmodule outputs are laid down 3) merge-modules is skipped 4) modulewrap is run anyways and reads the empty temp file We should fix this by skipping modulewrap if we can skip merge-modules. But for now, be conservative and fall back to the status quo behavior of always running merge-modules whenever we encounter a modulewrap job.

view details

Rintaro Ishizaki

commit sha 6f7235deaa501573c1f9bacd718077b39bb1e6da

Merge pull request #34292 from rintaro/revert-pr33948 Revert "Implements SR-11580"

view details

push time in 7 days

push eventhamishknight/swift

Alexey Komnin

commit sha 4fa17bf59774ae6543a33b1a29f01320705f4dfe

SR-12022: refactor LiteralExpr to combine common initializer code

view details

Anthony Latsis

commit sha 8f43d888b8fd88540c5ba3d770a857928ac0b3a7

Sema: Disallow usage of settable Self-returning storage requirements on existential base

view details

Alexis Laferrière

commit sha e61ffea42c943044fe4fc8c35d5040bc8815e420

[Sema] Check availability in inlinable code using the explicit version Inlinable functions can be inlined in clients with a lower OS target version than the framework defining the function. For this reason, the availability in inlinable functions should always be checked using the explicit introduction OS version as lower bound and not the minimum deployment version. rdar://problem/67975153

view details

Alexis Laferrière

commit sha 53e04cb39db86d890ff674b775a5dbda47e9d599

[Sema] Test explicit versions in TypeRefinementContext

view details

Alexis Laferrière

commit sha 2f182c2b785f5f7b68ee756d1474f21f3050ba67

[Sema] Consider unavailable functions as being unreachable This has the effect of rejecting unavailable overrides to available methods in a similar way as overrides that are less available than the introduction are rejected.

view details

Alexis Laferrière

commit sha 39ee5916bd656cf56c75ddf45a47e628d0ff1db1

[SIL] Don't print availability for unreachable/unavailable functions

view details

Alexis Laferrière

commit sha c79d5cfbd6952c5dc141a24db10a87d548bc5f4f

[Sema] Still use the current minimum deployment target as fallback

view details

Alexis Laferrière

commit sha 25c9ddd7c817d4dee5a1643cc0fc32f3cf833af2

[Sema] Prioritize unavailability check for protocol witnesses The errors on explicit unavailability are more precise than those on availablity version. Make sure we prioritize the unavailability ones first.

view details

Alexis Laferrière

commit sha f536a581082633e33ea8849b7f1d2f9b0d816c6c

[Sema] Silence an inconsistent availability error for the stdlib Don't raise the error availability_decl_more_than_enclosing in the context is unavailable and if read in a swiftinterface file. This error was present in the stdlib in 5.3 without side effects so we still want to accept it.

view details

Alexis Laferrière

commit sha 429017fc7acc303d70c6251eec7c59c97255fa96

[ClangImporter] Import unavailable decls as unavailable

view details

Alexis Laferrière

commit sha d2343f23a4d14b37f1f603ae13e3421fb5455df4

[Sema] Create a new TypeRefinementContext only for explicit inlinables

view details

Alexis Laferrière

commit sha 1ca852e77a00bf8323494d7445d054ea28466b99

[Sema] Accept unavailable constructors override in unavailable types Preserve the old behavior of accepted unavailable override of constructors as this change would be source breaking.

view details

Alexis Laferrière

commit sha fca7d36cb42b044b1179254d6e38f2b8a263eeed

[Sema] Use the deployment target as minimum OS version in swiftinterfaces Preserve the previous behavior when parsing swiftinterfaces as the Swift stdlib for Swift 5.3 and a few other swiftinterfaces in Xcode 12.0 had issues that would now be reported as errors.

view details

Erik Eckstein

commit sha aced5c74df5804b7c567a1ae9cf68b7e9cb336ee

SILOptimizer: Remove InspectionMode from MemBehehaviorVisitor The InspectionMode was never set to anything else than "IgnoreRetains"

view details

Erik Eckstein

commit sha d4a6bd39b686307028b850d25a2a2fbc337160a3

SILOptimizer: improve MemBehavior for apply instructions. 1. Do a better alias analysis for "function-local" objects, like alloc_stack and inout parameters 2. Fully support try_apply and begin/end/abort_apply So far we fully relied on escape analysis. But escape analysis has some shortcomings with SIL address-types. Therefore, handle two common cases, alloc_stack and inout parameters, with alias analysis. This gives better results. The biggest change here is to do a quick check if the address escapes via an address_to_pointer instructions.

view details

Erik Eckstein

commit sha 9f85cb8576becac281397e967e67ec44e5aabc5b

TempRValueElimination: handle potential modifications of the copy-source in a called functions correctly. This fixes a miscompile in case the source of the optimized copy_addr is modified in a called function with to a not visible alias. This can happen with class properties or global variables. This fix removes the special handling of function parameters, which was just wrong. Instead it simply uses the alias analysis API to check for modifications of the source object. The fix makes TempRValueElimination more conservative and this can cause some performance regressions, but this is unavoidable. rdar://problem/69605657

view details

Erik Eckstein

commit sha 68f485424c2b655075c77877acc9ed05756c5d08

SILOptimizer: add an additional TempRValueOpt pass later in the pipeline. This can compensate the performance regression of the more conservative handling of function calls in TempRValueOpt (see previous commit). The pass runs after the inlining passes and can therefore optimize in some cases where it's not possible before inlining.

view details

Rintaro Ishizaki

commit sha 411751218c82f22ac4d9193be3a28dc2eaf56701

[Syntax] Parse attributed types in expr position as TypeExprSyntax rdar://problem/70101520 https://bugs.swift.org/browse/SR-13711

view details

Brent Royal-Gordon

commit sha b440ab73315b4d4bb288078e241d974ae8a6e7d4

[NFC] Move several types/functions to Import.h To help consolidate our various types describing imports, this commit moves the following types and methods to Import.h: * ImplicitImports * ImplicitStdlibKind * ImplicitImportInfo * ModuleDecl::ImportedModule * ModuleDecl::OrderImportedModules (as ImportedModule::Order) * ModuleDecl::removeDuplicateImports() (as ImportedModule::removeDuplicates()) * SourceFile::ImportFlags * SourceFile::ImportOptions * SourceFile::ImportedModuleDesc This commit is large and intentionally kept mechanical—nothing interesting to see here.

view details

Brent Royal-Gordon

commit sha f3d99cefbb63960fdcd2b177b418d2a9a43930df

[NFC] Turn ImportedModuleDesc into AttributedImport Rename ImportedModuleDesc to AttributedImport and make it a template that’s parameterized on the representation of the module. This will allow us to reduce duplicated representations of “abstract” ImportDecls.

view details

push time in 8 days

delete branch apple/llvm-project

delete branch : swig

delete time in 9 days

create barnchapple/llvm-project

branch : swig

created branch time in 9 days

create barnchhamishknight/raivo-ios

branch : exportal

created branch time in 10 days

pull request commentapple/llvm-project

[lldb] Update to match apple/swift#33935

Do we still need manual cherry-picks to swift/next?

brentdax

comment created time in 10 days

Pull request review commentapple/swift

Add -testable-import-module frontend flag (+ refactoring)

 void ImportResolver::addImport(const UnboundImport &I, ModuleDecl *M) { // MARK: Import module loading //===----------------------------------------------------------------------===// -ModuleDecl *-ImportResolver::getModule(ImportPath::Module modulePath) {+static ModuleDecl *+getModuleImpl(ImportPath::Module modulePath, ModuleDecl *loadingModule,+              bool canImportBuiltin) {

Fair enough!

brentdax

comment created time in 10 days

PullRequestReviewEvent

fork hamishknight/ios-application

A native, lightweight and secure one-time-password (OTP) client built for iOS; Raivo OTP!

fork in 10 days

Pull request review commentapple/swift

[NFC] [SIL] [Parser] Move SILParserTUState into SILParserState.h

+//===--- SILParserState.h - SILParserState declaraion -------------------===//

Small typo: declaraion

zoecarver

comment created time in 11 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentapple/swift

Add -testable-import-module frontend flag (+ refactoring)

 void ImportResolver::addImport(const UnboundImport &I, ModuleDecl *M) { // MARK: Import module loading //===----------------------------------------------------------------------===// -ModuleDecl *-ImportResolver::getModule(ImportPath::Module modulePath) {+static ModuleDecl *+getModuleImpl(ImportPath::Module modulePath, ModuleDecl *loadingModule,+              bool canImportBuiltin) {

With the removal of forceImplicitImportLoading, do we still need the separation between getModuleImpl and getModule?

brentdax

comment created time in 11 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventhamishknight/swift

Artem Chikin

commit sha 939f547d517a2f9f6906d739dbb9da5a231be8aa

[Build Script] Pass Foundation and Dispatch build directories to the swift-driver build This is required in order to build swift-driver using CMake on Linux

view details

Pavel Yaskevich

commit sha 767c1a0ed6377470c2afdcd2a53281d13e88a099

[ConstraintSystem] NFC: Move `SolutionResult.h` to `include/swift/Sema`

view details

Pavel Yaskevich

commit sha 087906a013ad278deae80c2a64dcfe7a49f41b90

[ConstraintSystem] NFC: Move `OverloadChoice.h` to `include/swift/Sema`

view details

Pavel Yaskevich

commit sha f2614dec4a2fecef64de73e3e6c50df5effc25d3

[ConstraintSystem] NFC: Move `ConstraintLocator.h` to `include/swift/Sema`

view details

Pavel Yaskevich

commit sha ab951c208ab0f9bf8127ee1049dfd7c1174bfa2d

[ConstraintSystem] NFC: Move `ConstraintGraph{Scope}.h` to `include/swift/Sema`

view details

Pavel Yaskevich

commit sha 4954763524b92fcac638efdee3f84233c4dbc9bf

[ConstraintSystem] NFC: Move `CSFix.h` to `include/swift/Sema`

view details

Pavel Yaskevich

commit sha 6ba7ecb7c2d525f1f84dace06336669e37c5556d

[ConstraintSystem] NFC: Move `Constraint.h` to `include/swift/Sema`

view details

Pavel Yaskevich

commit sha 461eafff54b44a59ac4a1f8e1c3ee536b94ff895

[ConstraintSystem] NFC: Move `ConstraintSystem.h` to `include/swift/Sema`

view details

Daniel Rodríguez Troitiño

commit sha 8470a6624f08283719af2cbc6fdc10a2163d4888

[windows] Avoid %r for quoting module-cache-path in Windows. %r returns a representation of the object that is valid Python syntax. For numbers and strings this representation is very compatible with Unix shells, but for Windows, the quoting performed by Python will not be compatible. For example the Windows path separator `\` will be escaped as `\\`, which is not necessary for Windows and might make some tests that try to match path fail. Python 3.3 has `shlex.quote`, which was previously available as `pipes.quote` in earlier Python versions. `pipes.quote` was indeed used in several points of the `lit.cfg` file. For Windows, one need to do their own quoting. This change introduces `shell_quote` which uses `shlex.quote` or `pipes.quote` in Unix depending on the Python version, and provides an implementation of `shell_quote` for Windows. It replaces every usage of `pipes.quotes` for `shell_quote`, and modifies the value of `mcp_opt` to use `shell_quote` and not `%r`. This should fix the test `Driver\working-directory.swift` in the Windows Visual Studio 2017 builder.

view details

Slava Pestov

commit sha c5e138824544531fdf55935061afea1e999cc4b1

ASTScope: Remove cull()

view details

Slava Pestov

commit sha 89ea51e90ce69e62cd169b453db2e2d4d63b6728

ASTScope: Remove isLocalizable()

view details

Slava Pestov

commit sha ea9f84f66ee9f010cbedb2eff17e956ffe5db450

ASTScope: Remove addSiblingsToScopeTree()

view details

Slava Pestov

commit sha 885f6ebba3c39fe2b097631769b2ac8451e01e82

ASTScope: Rename addChildrenForAllLocalizableAccessorsInSourceOrder()

view details

Slava Pestov

commit sha b720c04f4b8f03dc93a00943ca9c3048f6305d42

ASTScope: Simplify a couple of getSourceRangeOfThisASTNode() methods

view details

Slava Pestov

commit sha 4b0d39c49d96c32f1ec0a1bdc8b54c9ef5c7365f

AST: Clean up and write better comments for source range assertions in addMember()

view details

John McCall

commit sha d8f46ddc3c983511d0f7f6f3972636771b2820fd

Fix a ptrauth test that I broke in #34213. Still not sure how the test run didn't catch this. rdar://70104537

view details

Slava Pestov

commit sha ef26ecfb13754ca9d641bc2081410564ec4d0935

ASTScope: Allocate list of local bindings for BraceStmt in the ASTContext Scopes need to register cleanups for non-trivial ivars in the ASTContext. Instead of doing that here, let's just change the SmallVectors into ArrayRefs. Fixes <rdar://problem/69908937>.

view details

Slava Pestov

commit sha 9bcec37db326bda80d698cc7b74f550c10a3d0ae

Add testcase for rdar://problem/17503169 / https://bugs.swift.org/browse/SR-10069 This now works thanks to ASTScope lookup. Also add a release note.

view details

Nathan Hawes

commit sha be231208f36e91d9b20d8bc52fb8d5012ce1277b

[CodeCompletion][CSGen] Treat ErrorExprs as holes when generating constraints for code completion This lets us still provide member completions when the base expression contains parse errors or unresolved decls e.g. returnsAString(undefined).<complete here>

view details

Doug Gregor

commit sha 98903b7cd2671e9147002b46b391a97885551202

[Concurrency] Add globalActor attribute. The globalActor attribute indicates that a particular type describes a global actor. Global actors allow the notion of actor state isolation to be spread across various declarations throughout a program, rather than being centered around a single actor class. There are useful primarily for existing notions such as "main thread" or subsystems accessed through global/singleton state.

view details

push time in 11 days

push eventhamishknight/swift

Mike Ash

commit sha ece0399d601eec1069131f465bdbe7e16f4c6a50

[Runtime] Have ConcurrentReadableHashMap use 1-byte or 2-byte indices when possible.

view details

Robert Widmann

commit sha 703eece10df887222fd081574e8b4d4f6d93d365

[NFC] Extract ModuleInputs as a Separate Utility The driver will eventually use this to compute the input status of a merge-modules job.

view details

Robert Widmann

commit sha 25978e1ac955a7de888b405c7bf72e85b425f81d

[NFC] Add InputInfo::makeNeedsCascadingRebuild

view details

Robert Widmann

commit sha 83f5162f9ed3867fdb352612ad9930de3fa239fc

[NFC] Reorder InputInfo::Status In Terms of Impact on the Incremental Build

view details

Robert Widmann

commit sha d29dcf89011b8e94fbb841d6a1f2a2709df9bd87

[NFC] Upgrade CompileJobAction::InputInfo::Status to an enum class

view details

Robert Widmann

commit sha 84f9ba300420d5fc44c46dce675dea77942e80ab

Use ModuleInputs instead of a Vector to build MergeModules

view details

Robert Widmann

commit sha a81cf936ee1a0d77faf3881d17bf87eb683820b0

[NFC] Promote MergeModuleJobAction to an IncrementalJobAction

view details

Robert Widmann

commit sha cecb7c8313bea26583bed64b621871d4d3d20dc4

Schedule MergeModules Incrementally Plumb the logic necessary to schedule merge-modules incrementally. This means that if any inputs jobs to merge-modules run, merge-modules is run. But, if they are all skipped, merge-modules will be skipped as well. This requires some light special-casing of the legacy driver's incremental job handling because it assumes in a few places it can always extract a swiftdeps file. This invariant will be further broken when the precompile step for bridging headers is skipped as well. rdar://65893400

view details

Slava Pestov

commit sha 5e892b3dc950761697a5f2672dbb47c6e8bd1ce3

Sema: Eagerly expand scopes in TypeCheckASTNodeAtLocRequest

view details

Slava Pestov

commit sha 0c11fad5bd8018e18124f3e3cd4333cf99040c5b

ASTScope: Don't silently drop duplicate AST nodes Instead, let's rely on the existing source range assertions. They will fire if we add two nodes with overlapping or equal source ranges.

view details

Slava Pestov

commit sha ee0d008178d6046e12acaeaa9aad4f5d8647814c

Parse: Preserve source order when code completion adds delayed declarations

view details

Slava Pestov

commit sha 14620a34db8a92020daec4e09748e491bbfd0eca

ASTScope: Remove source range sorting

view details

Mike Ash

commit sha d369ce1bb542646ea5934370efb129eb614eacfe

Merge pull request #34063 from mikeash/concurrenthashmap-indices-shrink [Runtime] Use 1-byte or 2-byte indices in ConcurrentReadableHashMap when possible.

view details

Pavel Yaskevich

commit sha e6b140e32bc2c3af07804ce0755723f5a619863c

[Runtime] NFC: Fix `swift_runtime_unreachable` to `swift_unreachable`

view details

Mishal Shah

commit sha a373e8573400d2613625c09c364fb979cbab8a06

Merge pull request #34237 from xedin/fix-rename-of-unreachable [Runtime] NFC: Fix `swift_runtime_unreachable` to `swift_unreachable`

view details

Slava Pestov

commit sha cb70220fe4743fc762aefffac045d05ea3474799

Merge pull request #34226 from slavapestov/astscope-source-range-sorting ASTScope: Stop sorting declarations by source range

view details

Robert Widmann

commit sha 4f49b6ab81b7dcbc1f49f2011bc3e1f946801c51

Merge pull request #34231 from CodaFi/skippy Skip Merge-Modules When We Can

view details

Argyrios Kyrtzidis

commit sha 771738c1eb7f55196ad4443eaa24abce85de11f2

[utils/build-parser-lib] Add '--no-install' option to skip installing.

view details

Argyrios Kyrtzidis

commit sha a665ba632a21bc4479c8410433c5b6af713d0def

Merge pull request #34248 from akyrtzi/build-parser-lib-no-install [utils/build-parser-lib] Add '--no-install' option to skip installing.

view details

push time in 12 days

push eventhamishknight/swift

Simon Evans

commit sha 960d0e30ee2b70ba3bb7ec076c16045afab01589

Linux: Fix -static-executable and remove swiftImageInspectionShared - Remove references to swiftImageInspectionShared on Linux and dont have split libraries between static/non-static linked executables. - -static-executable now links correctly Linux. Note: swift::lookupSymbol() will not work on statically linked executables but this can be worked around by using the https://github.com/swift-server/swift-backtrace package.

view details

Pavel Yaskevich

commit sha f26bce350d41ec1ffefa8cae61f759985244b055

[Sema] NFC: Move `ContextualTypePurpose` to constraint system header

view details

Pavel Yaskevich

commit sha 588d42c56440db5e6166c1e979c13c8ae3343a60

[Sema] NFC: Move `FreeTypeVariableBinding` to constraint system header

view details

Alexis Laferrière

commit sha c6fc53e844ac4fd542adb0669ac7038c2919d283

[Sema] Define availability via compiler flag Introduce availability macros defined by a frontend flag. This feature makes it possible to set the availability versions at the moment of compilation instead of having it hard coded in the sources. It can be used by projects with a need to change the availability depending on the compilation context while using the same sources. The availability macro is defined with the `-define-availability` flag: swift MyLib.swift -define-availability "_iOS8Aligned:macOS 10.10, iOS 8.0" .. The macro can be used in code instead of a platform name and version: @available(_iOS8Aligned, *) public func foo() {} rdar://problem/65612624

view details

Alexis Laferrière

commit sha 5ed261683d5973ef4dd45922b5ac77ba7cefcf43

[Sema] Report availability macros in inlinable code Availability macros can’t be used in inlinable code as inlinable is copied textually in the generated swiftinterface files. Further would could lift this limitation.

view details

Nate Chandler

commit sha b90cab6f1b5e7cb2ccb8b123e7fa5a00d022182c

[NFC] Made indexing on AsyncContextLayout private. Previously the methods for getting the index into the layout were public and were being used to directly access the underlying buffer. Here, that abstraction leakage is fixed and field access is forced to go through the appropriate methods.

view details

Nate Chandler

commit sha f6bfd416aba04a75da4ea7ab017e7a07665d4102

[NFC] Use TypeInfo for indirect return storage. Previously a raw CreateLoad was used, which happened to be fine. Here, a TI is used, explicitly clarifying that the indirect return is taken.

view details

Nate Chandler

commit sha d5d65b0dff6a5a027653a84a846baae33c123f55

[NFC] Removed unused method.

view details

Pavel Yaskevich

commit sha 05b223aa0ba9a48fd787606fb54fd4597bcd15f8

[Sema] Switch `typeCheckExpression` to use `ContextualTypeInfo`

view details

Pavel Yaskevich

commit sha 68d72780f11046d5a6eed5818f8fe4d19506fa9e

[ConstraintSystem] NFC: Move implementation of `isReadOnlyKeyPathComponent` to .cpp

view details

Pavel Yaskevich

commit sha f94be56468d10ff9d93d8ba3a34263bc958c936c

[Sema] Decouple ConstraintSystem and TypeChecker headers

view details

Josh Learn

commit sha 5c3814e4dd0f3d0cd0a4776dbaebd3751bc8e985

[OSSignpost] Update apinotes to allow usage of os_signpost ABI entrypoint Currently, the `_os_signpost_emit_with_name_impl` function is not available to be called from Swift. This is the main ABI entrypoint for making os_signpost calls. In order to facilitate more efficient calls to os_signpost in future iterations of the Swift os_signpost API, we need to allow calling this function from Swift. rdar://70015938

view details

Pavel Yaskevich

commit sha 0b648fb455057eb8c51bff34fc7d87447cd9b62e

[TypeChecker] NFC: Include constraint system into TypeChecker header Avoids having to include ConstraintSystem.h in TypeCheck*.cpp files to gain access to ContextualInfo and related classes.

view details

Nate Chandler

commit sha eba39cffe6ee2ad3602ac209359c4ffb5065a5b0

[Concurrency] Corrected ordering of indirect results. Previously, the indirect results were claimed from the explosion after the arguments were claimed. That failed to match the order in which arguments actually appear in the explosion. Here the order is reversed.

view details

Nate Chandler

commit sha 7d74a8614db13b3821f85d77c4fdcf511c8cbf15

[Concurrency] Async CC supports witness methods. Previously, the AsyncContextLayout did not make space for the trailing witness fields (self metadata and self witness table) and the AsyncNativeCCEntryPointArgumentEmission could consequently not vend these fields. Here, the fields are added to the layout.

view details

Nate Chandler

commit sha 0a5df673edce66633e41215cc0d2a44891d3d29d

[NFC] Deduped async entry point emission code. Previously the same code was used for loading values from the async context. Here, that same code is extracted into a private method.

view details

Nate Chandler

commit sha 6e0d89432533b29311d7f1afcdae360aa81b1f61

[NFC] Deduped async call emission code. Previously the same code was used for saving values into the async context. Here, that code is extracted into a private method.

view details

Nate Chandler

commit sha 4c298db5297f88f3eba35d03063847494befa41b

[NFC] Extracted async call emission loading. Previously the code for loading indirect returns was inline in the member function where it was performed. Here it is pulled out into a private method.

view details

John McCall

commit sha 2546c2d78d1d7c14958c9f66819796240ae6ca72

Fetch associated types abstractly when fetching an associated conformance. By default, emitTypeMetadataRef does a blocking request for complete metadata, which is the right thing to do for most purposes in IRGen. Unfortunately, it's actively dangerous in code that can be called during metadata completion, like an associated conformance accessor, because it can cause artificial dependency cycles that the runtime isn't equipped to detect, much less solve. This is a partial fix for rdar://69901318, which also exposes a bad metadata access path that seems to be causing an artificial problem.

view details

Egor Zhdan

commit sha 3708e7bbd5f1161121189de7cb201693e2357c8c

WinSDK: extract Security submodule with winscard.h Currently this header gets included into `WinSDK.WinSock2` via windows.h

view details

push time in 13 days

Pull request review commentapple/swift

[NFC] [SIL] [Parser] Move SILParserTUState into SILParserState.h

+//===--- SILParserState.h - SILParserTUState declaraion -------------------===//+//+// This source file is part of the Swift.org open source project+//+// Copyright (c) 2014 - 2019 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+//+//===----------------------------------------------------------------------===//++#ifndef SWIFT_SIL_SILPARSERSTATE_H+#define SWIFT_SIL_SILPARSERSTATE_H++#include "swift/Basic/LLVM.h"+#include "swift/Parse/ParseSILSupport.h"+#include "swift/Parse/Parser.h"+#include "swift/SIL/SILModule.h"++//===----------------------------------------------------------------------===//+// SILParserState+//===----------------------------------------------------------------------===//++namespace swift {++// This has to be in the 'swift' namespace because it's forward-declared for+// SILParserState.+class SILParserState : public SILParserStateBase {

Given the class has now been renamed to SILParserState, should the file be renamed back to SILParserState.h?

zoecarver

comment created time in 15 days

Pull request review commentapple/swift

[NFC] [SIL] [Parser] Move SILParserTUState into SILParserState.h

+//===--- SILParserState.h - SILParserTUState declaraion -------------------===//+//+// This source file is part of the Swift.org open source project+//+// Copyright (c) 2014 - 2019 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+//+//===----------------------------------------------------------------------===//++#ifndef SWIFT_SIL_SILPARSERSTATE_H+#define SWIFT_SIL_SILPARSERSTATE_H++#include "swift/Basic/LLVM.h"+#include "swift/Parse/ParseSILSupport.h"+#include "swift/Parse/Parser.h"+#include "swift/SIL/SILModule.h"++//===----------------------------------------------------------------------===//+// SILParserState+//===----------------------------------------------------------------------===//++namespace swift {++// This has to be in the 'swift' namespace because it's forward-declared for+// SILParserState.

I believe this comment is now outdated and can be removed

zoecarver

comment created time in 15 days

Pull request review commentapple/swift

[NFC] [SIL] [Parser] Move SILParserTUState into SILParserState.h

+//===--- SILParserState.h - SILParserTUState declaraion -------------------===//+//+// This source file is part of the Swift.org open source project+//+// Copyright (c) 2014 - 2019 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+//+//===----------------------------------------------------------------------===//++#ifndef SWIFT_SIL_SILPARSERSTATE_H+#define SWIFT_SIL_SILPARSERSTATE_H++#include "swift/Basic/LLVM.h"+#include "swift/Parse/ParseSILSupport.h"+#include "swift/Parse/Parser.h"+#include "swift/SIL/SILModule.h"

Can the Parser and SILModule dependencies be forward declared?

zoecarver

comment created time in 15 days

Pull request review commentapple/swift

[NFC] [SIL] [Parser] Move SILParserTUState into SILParserState.h

+//===--- SILParserState.h - SILParserTUState declaraion -------------------===//
//===--- SILParserState.h - SILParserState declaration --------------------===//
zoecarver

comment created time in 15 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventhamishknight/swift

Antoine Cœur

commit sha 4c30f8bd6de5487603ed645cc4dd2a2983f4f0ba

appendingPathComponent(:isDirectory:) should account for isDirectory

view details

Xiaodi Wu

commit sha 26cda274ca78b1df246521ba1eeea33285b57d5f

[stdlib] Simplify 'BinaryFloatingPoint.init?<T: BinaryFloatingPoint>(exactly: T)'

view details

Alexis Laferrière

commit sha 14e6772dc04cf778ba393bebc21a0a8b8ada3603

Consider inherited platform unavailability to silence diagnostics rdar://68597591

view details

Arnold Schwaighofer

commit sha 8e8c57caf59f043b4046ad0df6e7c358bcac9903

SIL type lowering: Compute IsTypeExpansionSensitive and use it instead of TypeBase's hasOpaqueArchetypePropertiesOrCases A type is IsTypeExpansionSensitive if it contains an opaque result type that influences how the type is lowered. This could be because the type mentions an opaque archetype and therefore we would look through to the underlying type depending on the type expansion and could get a different SIL type. For example '() -> out some P' could lower to '() -> @out Int'. Or this could be because when we lower an aggregate type some of its fields are opaque types that could be looked through and therefore the aggregate has different lowering (e.g address vs. loadable) in different type expansion contexts. By replacing it this change also fixes an infinite recursion in hasOpaqueArchetypePropertiesOrCases. rdar://68798822

view details

Cassie Jones

commit sha e01893cb56f989b20ba4309286450105211f031e

[build-script] Add a flag for sccache This adds a flag to enable sccache in order to simplify the build-script invocation, particularly for new contributors.

view details

Cassie Jones

commit sha 6d92486c9a6ddc8b71f7c842d546ae3599be5c30

[build-script] Add SWIFT_ prefix to USE_SCCACHE env var

view details

Nate Chandler

commit sha 4cfadfae00f31fc66581ad270176e4916682bf51

[NFC] Documented IRGenFunction::IndirectReturn.

view details

Nate Chandler

commit sha 607772aaa21ce58db04236cb817b5958c72b2123

[Runtime] Stubbed entry points for task de/alloc.

view details

Cassie Jones

commit sha 7ef9b3287ab097ce2bdd1ab70f9ed9df20d39ff1

[build-script] Fix CMake sccache test

view details

Fero

commit sha 28f3e442135d7ae60c1522e8da41322350f84171

Fix typo

view details

Fero

commit sha b0b546873ca8c47b99cdae99110f94d2cbaa5283

Fix typo

view details

Erik Eckstein

commit sha 903786f5ab88056e2abc5b5db99b0107d6d06461

tests: correct availability checks in Interpreter/runtime_name_local_class_opaque_type.swift The test checks a fix, which also affects the runtime. Therefore, the test requires a minimum OS version to run without a crash.

view details

Cassie Jones

commit sha b5247d2c8f9c4133ba165370d92370600cf67ece

Fix formatting issue

view details

Egor Zhdan

commit sha ae9715ac0311e1d65dc4fed957e067ee2654d8ea

WinSDK: extract System submodule with winioctl.h Currently this header gets included into `WinSDK.WinSock2` via windows.h & winscard.h

view details

Nate Chandler

commit sha 59bb1fc23592bcc4eb18bca32dcbff9de4b7e751

[Concurrency] Pass "async" into SILFunctionTypes. This reverts commit 3a48396110d2639d7b90970bc0369a559adbc0c1.

view details

Xi Ge

commit sha 11b2251ac18de4fa7e78a132afb9ff0e7457af63

Driver: forwarding driver invocations to the new driver when SWIFT_USE_NEW_DRIVER is defined This allows us to experiment with the new swift-driver without changing build systems.

view details

Xi Ge

commit sha a8c48d1d170e24ef5edc58d2b9ecbadd1daf6ab0

Merge pull request #34154 from nkcsgexi/forward-call-new-driver Driver: forwarding driver invocations to the new driver when SWIFT_USE_NEW_DRIVER is defined

view details

Slava Pestov

commit sha 04c21c18c935bc9a4101c2e5d49609c5d360e4b8

Parse: Disable circular definition check when parser lookup is off

view details

Slava Pestov

commit sha 4648587326532a5e1ee672014cce4b1381607d3a

ASTScope: Move sortBySourceRange() and cull() calls out of addSiblingsToScopeTree()

view details

Slava Pestov

commit sha 8b2cf55b705e5e6cf5d316ed8af75990017f8571

ASTScope: Push isLocalBinding down from AbstractPatternEntryScope to PatternEntryDeclScope

view details

push time in 15 days

PR closed apple/swift

[WIP][Sema] Permit implicit casting from an archetype to an enum case in pattern matching

When pattern matching on a value of archetype type, allow implicit casts to enum cases. Previously we allowed this only for existential patterns, but it's reasonable to allow it for archetypes too.

Resolves SR-6955.

+81 -2

18 comments

3 changed files

hamishknight

pr closed time in 17 days

pull request commentapple/swift

[WIP][Sema] Permit implicit casting from an archetype to an enum case in pattern matching

Still hoping to get back to this, but going to close for the time being

hamishknight

comment created time in 17 days

push eventhamishknight/swift

Owen Voorhees

commit sha 6b6b640e133ca547139c6586eb0dcbf7933b46ec

[Driver] Don't test for null source locations in driver diagnostics swift-driver doesn't emit these, and there's no reason to check that they're present when using the integrated driver.

view details

Joe Groff

commit sha 023066c1966c63ab3b7a4baee31ac24d29b7de36

SILGen: Relax assertion that incorrectly tripped on lowered opaque capture types. When lowering the SILConstantInfo for a closure implementation type with captures, we are more conservative about substituting opaque types in the capture, since the underlying types may only be available in the local context. This means the SILConstantInfo type may not in fact be exactly what you get from `SILFunction::getFunctionTypeInContext` referencing the implementation function from its originating context, since those opaque types will be substituted in the local context. Fixes SR-13480 | rdar://problem/68159831.

view details

Anthony Latsis

commit sha 103a8218380c9d72160f9ca3aa7d1e0ba4d8f1bc

Sema: Allow non-final classes to satisfy properties and subscripts with covariant Self

view details

Meghana Gupta

commit sha 010c1cd91f26f7f8ec1dea1a06f26cf94972debf

Convert OME into a function transform

view details

Meghana Gupta

commit sha 81a2157a7253197319bd429c4749ca5b2ca5ecd8

Handle conversion of unchecked_value_cast to non-ossa in SILCloner

view details

Meghana Gupta

commit sha 9c9a8ef2241d2be4a9d47bd2a4bbdd8b2da344b3

Allow OME to run mandatorily

view details

Anthony Latsis

commit sha 33401ae147a04ce628cf246504b67729063358e5

CS: Use the curried opened type when building a VarDecl member ref This ensures that we erase opened archetypes before closing an existential result

view details

Anthony Latsis

commit sha 9f58968fa394444115a3bef9e72a4b7a146fa0d0

Add silgen and run-time tests

view details

Jonas Devlieghere

commit sha 7a128470bd281b254525008131e5cf639ccedaeb

[test] Re-enable linux-fatal-backtrace.swift This was fixed by #33235 rdar://66389949

view details

Slava Pestov

commit sha 81fc342852c29051b70bb99307afbdab2b4fd6cb

ASTScope: Ignore PatternEntryDeclScope when searching for statement labels

view details

Slava Pestov

commit sha cecbf212d3359481b59dea6030b5008b0909b7d2

ASTScope: PatternEntryInitializerScope needs a custom lookup parent Bindings are not visible from inside their own initializer, eg this is invalid: var (x, y) = (y, x) The PatternEntryDeclScope which starts after the 'var' introduces x and y, and it contains the PatternEntryInitializerScope which starts after the '='. To model this properly in ASTScope, the PatternEntryInitializerScope overrides getLookupParent() to skip the PatternEntryDeclScope that contains it. I believe this is simpler than having PatternEntryDeclScope begin at the source location following the initializer, because it is hard to compute this source location in a way that works with invalid code, for example the 'var' might be nested inside of a BraceStmt with the closing '}' missing.

view details

Slava Pestov

commit sha c5edc4574df4c230c7e0f08b6ac690b02d7e1065

ASTScope: PatternEntryDeclScope changes the insertion point for local bindings This gives us the desired behavior, where local bindings are in scope after their definition. Note that BraceStmt still introduces all bindings at the beginning, but now we change BraceStmt to only introduce local functions and types, allowing us to disable parse-time lookup.

view details

Slava Pestov

commit sha 5461508cd78c3887ba709d3d1f3b213767f84ec3

ASTScope: Remove isATypeDeclScope()

view details

Egor Zhdan

commit sha 30f7b9ecef834a6ca0fa1fb8f1ae37815569a126

WinSDK: extract Performance submodule Currently some of the headers get included into `WinSDK.WinSock2` via windows.h

view details

Doug Gregor

commit sha 9b808c67faf951c08e28626432188cf68c4a1024

[Concurrency] Import "did" delegate methods as @asyncHandler. Infer @asyncHandler on a protocol methods that follow the delegate convention of reporting that something happened via a "did" method, so long as they also meet the constraints for an @asyncHandler method in Swift. This enables inference of @asyncHandler for witnesses of these methods.

view details

Doug Gregor

commit sha a000375881ce37668c136fdaed71c997b194cebe

Remove unused new diagnostic

view details

Meghana Gupta

commit sha a415d87a28d48345760ea47c3550a6f3da1c9834

Register deserialization notification handlers in ome only once

view details

Meghana Gupta

commit sha f5baf7a8f175659b0bb4b458a1a5e29c103c59aa

Update CHECK lines in tests after moving ossa to a function pass

view details

Brent Royal-Gordon

commit sha 0a94737ff1496e048bbda720f9d8b2184b7d4aa8

Emit -enable-experimental-concurrency into module interfaces …when the module is built with that flag. Fixes rdar://69322538.

view details

Pavel Yaskevich

commit sha 8c6098a3de956ca058d55a0d4875b29e3ce38498

[CSFix] Add a fix to detect when type of couldn't be inferred

view details

push time in 19 days

PR closed apple/swift

[Experiment] Per-request caching
+322 -40

3 comments

7 changed files

hamishknight

pr closed time in 21 days

Pull request review commentapple/swift

Add -testable-import-module frontend flag (+ refactoring)

 class ImportPath : public detail::ImportPathBase<ImportPath> {   /// including submodules, assuming the \c ImportDecl has the indicated   /// \c importKind.   Module getModulePath(ImportKind importKind) const {-    return getModulePath(importKind != ImportKind::Module);+    return getModulePath(isScopedImportKind(importKind));   }    /// Extracts the portion of the \c ImportPath which represents a scope for the   /// import, assuming the \c ImportDecl has the indicated \c importKind.   Access getAccessPath(ImportKind importKind) const {-    return getAccessPath(importKind != ImportKind::Module);+    return getAccessPath(isScopedImportKind(importKind));+  }+};++// MARK: - Abstractions of imports++/// Convenience struct to keep track of an import path and whether or not it+/// is scoped.+class UnloadedImportedModule {+  // This is basically an ArrayRef with a bit stolen from the size.+  ImportPath::Raw::iterator data;+  ImportPath::Raw::size_type isScoped : 1;+  ImportPath::Raw::size_type length : sizeof(ImportPath::Raw::size_type)*CHAR_BIT - 1;

Wouldn't it be sufficient to use a PointerIntPair for the data field?

brentdax

comment created time in 23 days

PullRequestReviewEvent

Pull request review commentapple/swift

Add -testable-import-module frontend flag (+ refactoring)

 class ImportPath : public detail::ImportPathBase<ImportPath> {   /// including submodules, assuming the \c ImportDecl has the indicated   /// \c importKind.   Module getModulePath(ImportKind importKind) const {-    return getModulePath(importKind != ImportKind::Module);+    return getModulePath(isScopedImportKind(importKind));   }    /// Extracts the portion of the \c ImportPath which represents a scope for the   /// import, assuming the \c ImportDecl has the indicated \c importKind.   Access getAccessPath(ImportKind importKind) const {-    return getAccessPath(importKind != ImportKind::Module);+    return getAccessPath(isScopedImportKind(importKind));   } };  // MARK: - Abstractions of imports +/// Convenience struct to keep track of an import path and whether or not it+/// is scoped.+class UnloadedImportedModule {

I don't mind the name UnloadedImportedModule, though perhaps another suggestion could be ImportedModuleToLoad?

brentdax

comment created time in 24 days

PullRequestReviewEvent

Pull request review commentapple/swift

Add -testable-import-module frontend flag (+ refactoring)

 bool CompilerInstance::loadPartialModulesAndImplicitImports(   assert(DefaultSerializedLoader && "Expected module loader in Compiler Instance");   FrontendStatsTracer tracer(getStatsReporter(),                              "load-partial-modules-and-implicit-imports");-  // Force loading implicit imports. This is currently needed to allow-  // deserialization to resolve cross references into bridging headers.-  // FIXME: Once deserialization loads all the modules it needs for cross-  // references, this can be removed.

Could we keep this comment?

Edit: Ah, I see it was moved into the body of forceImplicitImportLoading – IMO it makes more sense at the call-site, what do you think?

brentdax

comment created time in 24 days

Pull request review commentapple/swift

Add -testable-import-module frontend flag (+ refactoring)

 void ImportResolver::addImport(const UnboundImport &I, ModuleDecl *M) { // MARK: Import module loading //===----------------------------------------------------------------------===// -ModuleDecl *-ImportResolver::getModule(ImportPath::Module modulePath) {+static ModuleDecl *+getModuleImpl(ImportPath::Module modulePath, ModuleDecl *loadingModule,+              SourceFileKind sourceFileKind = SourceFileKind::SIL) {+  // Default is SourceFileKind::SIL to make the behavior during implicit import+  // loading as permissive as possible.

IMO this would be better as a bool canImportBuiltinModule parameter to avoid misusing sourceFileKind in the body.

brentdax

comment created time in 24 days

Pull request review commentapple/swift

Add -testable-import-module frontend flag (+ refactoring)

 doCodeCompletion(SourceFile &SF, StringRef EnteredCode, unsigned *BufferID,   auto *lastModule = SF.getParentModule();    ImplicitImportInfo implicitImports;-  implicitImports.AdditionalModules.emplace_back(lastModule,-                                                 /*exported*/ false);+  {+    implicitImports.AdditionalImports.emplace_back(ImportedModule(lastModule));+  }

Nit: This no longer needs a new scope

brentdax

comment created time in 24 days

Pull request review commentapple/swift

Add -testable-import-module frontend flag (+ refactoring)

 TypeCheckFunctionBodyRequest::readDependencySource( //----------------------------------------------------------------------------//  void swift::simple_display(llvm::raw_ostream &out,-                           const ImplicitImport &import) {-  out << "implicit import of ";-  simple_display(out, import.Module);+                           const AttributedImport<ImportedModule> &import) {+  out << "import of ";++  simple_display(out, import.module.importedModule);++  out << " [";+  if (!import.module.accessPath.empty()) {+    out << " scoped(";+    import.module.accessPath.print(out);+    out << ")";+  }+  if (import.options.contains(ImportFlags::Exported))+    out << " exported";+  if (import.options.contains(ImportFlags::Testable))+    out << " testable";+  if (import.options.contains(ImportFlags::ImplementationOnly))+    out << " implementation-only";+  if (import.options.contains(ImportFlags::PrivateImport))+    out << " private(" << import.sourceFileArg << ")";++  if (import.options.contains(ImportFlags::SPIAccessControl)) {+    out << " spi(";+    llvm::interleaveComma(import.spiGroups, out, [&out](Identifier name) {+                                                   simple_display(out, name);+                                                 });+    out << ")";+  }++  out << " ]";+}++void swift::simple_display(llvm::raw_ostream &out,+                       const AttributedImport<UnloadedImportedModule> &import) {+  out << "import of unloaded ";++  import.module.getModulePath().print(out);++  out << " [";+  if (!import.module.getAccessPath().empty()) {+    out << " scoped(";+    import.module.getAccessPath().print(out);+    out << ")";+  }+  if (import.options.contains(ImportFlags::Exported))+    out << " exported";+  if (import.options.contains(ImportFlags::Testable))+    out << " testable";+  if (import.options.contains(ImportFlags::ImplementationOnly))+    out << " implementation-only";+  if (import.options.contains(ImportFlags::PrivateImport))+    out << " private(" << import.sourceFileArg << ")";++  if (import.options.contains(ImportFlags::SPIAccessControl)) {+    out << " spi(";+    llvm::interleaveComma(import.spiGroups, out, [&out](Identifier name) {+                                                   simple_display(out, name);+                                                 });+    out << ")";+  }++  out << " ]";

Could this logic be extracted so it can be shared with the other AttributedImport simple_display?

brentdax

comment created time in 24 days

Pull request review commentapple/swift

Add -testable-import-module frontend flag (+ refactoring)

 bool CompilerInstance::loadPartialModulesAndImplicitImports(   assert(DefaultSerializedLoader && "Expected module loader in Compiler Instance");   FrontendStatsTracer tracer(getStatsReporter(),                              "load-partial-modules-and-implicit-imports");-  // Force loading implicit imports. This is currently needed to allow-  // deserialization to resolve cross references into bridging headers.-  // FIXME: Once deserialization loads all the modules it needs for cross-  // references, this can be removed.-  (void)mod->getImplicitImports();++  swift::forceImplicitImportLoading(mod);

IIRC this hack was only required to load in the bridging header before deserialization, as all the other imports will be loaded when evaluating the module file's dependencies. Is (void)mod->getImplicitImports(); no longer sufficient for this hack?

brentdax

comment created time in 24 days

Pull request review commentapple/swift

Add -testable-import-module frontend flag (+ refactoring)

 class ImportPath : public detail::ImportPathBase<ImportPath> {   /// including submodules, assuming the \c ImportDecl has the indicated   /// \c importKind.   Module getModulePath(ImportKind importKind) const {-    return getModulePath(importKind != ImportKind::Module);+    return getModulePath(isScopedImportKind(importKind));   }    /// Extracts the portion of the \c ImportPath which represents a scope for the   /// import, assuming the \c ImportDecl has the indicated \c importKind.   Access getAccessPath(ImportKind importKind) const {-    return getAccessPath(importKind != ImportKind::Module);+    return getAccessPath(isScopedImportKind(importKind));+  }+};++// MARK: - Abstractions of imports++/// Convenience struct to keep track of an import path and whether or not it+/// is scoped.+class UnloadedImportedModule {+  // This is basically an ArrayRef with a bit stolen from the size.+  ImportPath::Raw::iterator data;+  ImportPath::Raw::size_type isScoped : 1;+  ImportPath::Raw::size_type length : sizeof(ImportPath::Raw::size_type)*CHAR_BIT - 1;

IMO it would be better to stash the bit on the pointer – that way we can guarantee round-tripping the ArrayRef. What do you think?

brentdax

comment created time in 24 days

Pull request review commentapple/swift

Add -testable-import-module frontend flag (+ refactoring)

 class ImportPath : public detail::ImportPathBase<ImportPath> {   /// including submodules, assuming the \c ImportDecl has the indicated   /// \c importKind.   Module getModulePath(ImportKind importKind) const {-    return getModulePath(importKind != ImportKind::Module);+    return getModulePath(isScopedImportKind(importKind));   }    /// Extracts the portion of the \c ImportPath which represents a scope for the   /// import, assuming the \c ImportDecl has the indicated \c importKind.   Access getAccessPath(ImportKind importKind) const {-    return getAccessPath(importKind != ImportKind::Module);+    return getAccessPath(isScopedImportKind(importKind));+  }+};++// MARK: - Abstractions of imports++/// Convenience struct to keep track of an import path and whether or not it+/// is scoped.+class UnloadedImportedModule {+  // This is basically an ArrayRef with a bit stolen from the size.+  ImportPath::Raw::iterator data;+  ImportPath::Raw::size_type isScoped : 1;+  ImportPath::Raw::size_type length : sizeof(ImportPath::Raw::size_type)*CHAR_BIT - 1;++  ImportPath::Raw getRaw() const {+    return ImportPath::Raw(data, length);+  }++  UnloadedImportedModule(ImportPath::Raw raw, bool isScoped)+    : data(raw.data()), isScoped(isScoped), length(raw.size()) { }++public:+  UnloadedImportedModule(ImportPath importPath, bool isScoped)+    : UnloadedImportedModule(importPath.getRaw(), isScoped) { }++  UnloadedImportedModule(ImportPath importPath, ImportKind importKind)+    : UnloadedImportedModule(importPath, isScopedImportKind(importKind)) { }++  ImportPath getImportPath() const {+    return ImportPath(getRaw());+  }++  ImportPath::Module getModulePath() const {+    return getImportPath().getModulePath(isScoped);+  }++  ImportPath::Access getAccessPath() const {+    return getImportPath().getAccessPath(isScoped);+  }++  friend bool operator==(const UnloadedImportedModule &lhs,+                         const UnloadedImportedModule &rhs) {+    return (lhs.getRaw() == rhs.getRaw()) &&+           (lhs.isScoped == rhs.isScoped);+  }+};++/// Convenience struct to keep track of a module along with its access path.+struct alignas(uint64_t) ImportedModule {+  /// The access path from an import: `import Foo.Bar` -> `Foo.Bar`.+  ImportPath::Access accessPath;+  /// The actual module corresponding to the import.+  ///+  /// Invariant: The pointer is non-null.+  ModuleDecl *importedModule;++  ImportedModule(ImportPath::Access accessPath,+                 ModuleDecl *importedModule)+      : accessPath(accessPath), importedModule(importedModule) {+    assert(this->importedModule);+  }++  explicit ImportedModule(ModuleDecl *importedModule)+      : ImportedModule(ImportPath::Access(), importedModule) { }++  bool operator==(const ImportedModule &other) const {+    return (this->importedModule == other.importedModule) &&+           (this->accessPath == other.accessPath);+  }++  /// Uniques the items in \p imports, ignoring the source locations of the+  /// access paths.+  ///+  /// The order of items in \p imports is \e not preserved.+  static void removeDuplicates(SmallVectorImpl<ImportedModule> &imports);++  // Purely here to allow ImportedModule and UnloadedImportedModule to+  // substitute into the same templates.+  ImportPath::Access getAccessPath() const { return accessPath; }++  /// Arbitrarily orders ImportedModule records, for inclusion in sets and such.+  class Order {+  public:+    bool operator()(const ImportedModule &lhs,+                    const ImportedModule &rhs) const {+      if (lhs.importedModule != rhs.importedModule)+        return std::less<const ModuleDecl *>()(lhs.importedModule,+                                               rhs.importedModule);+      if (lhs.accessPath.getRaw().data() != rhs.accessPath.getRaw().data())+        return std::less<ImportPath::Raw::iterator>()(lhs.accessPath.begin(),+                                                   rhs.accessPath.begin());+      return lhs.accessPath.size() < rhs.accessPath.size();+    }+  };+};++/// Augments a type representing an import to also include information about the+/// import's attributes. This is usually used with either \c ImportedModule or+/// \c UnloadedImportedModule.+template<class ModuleInfo>+struct AttributedImport {+  /// Information about the module and access path being imported.+  ModuleInfo module;++  /// Flags indicating which attributes of this import are present.+  ImportOptions options;++  /// If this is a @_private import, the value of its 'sourceFile:' argument;+  /// otherwise, empty string.+  StringRef sourceFileArg;++  /// Names of explicitly imported SPI groups.+  ArrayRef<Identifier> spiGroups;++  AttributedImport(ModuleInfo module, ImportOptions options = ImportOptions(),+                   StringRef filename = {}, ArrayRef<Identifier> spiGroups = {})+      : module(module), options(options), sourceFileArg(filename),+        spiGroups(spiGroups) {+    assert(!(options.contains(ImportFlags::Exported) &&+             options.contains(ImportFlags::ImplementationOnly)) ||+           options.contains(ImportFlags::Reserved));+  }++  friend bool operator==(const AttributedImport<ModuleInfo> &lhs,+                         const AttributedImport<ModuleInfo> &rhs) {+    return lhs.module == rhs.module &&+           lhs.options.toRaw() == rhs.options.toRaw() &&+           lhs.sourceFileArg == rhs.sourceFileArg &&+           lhs.spiGroups == rhs.spiGroups;+  }++  AttributedImport<ImportedModule> getLoaded(ModuleDecl *loadedModule) const {+    return { ImportedModule(module.getAccessPath(), loadedModule),+             options, sourceFileArg, spiGroups };+  }+};++/// A module which has been implicitly imported.+void simple_display(llvm::raw_ostream &out,+                    const AttributedImport<ImportedModule> &import);++/// A module which will be implicitly imported.+void simple_display(llvm::raw_ostream &out,+                    const AttributedImport<UnloadedImportedModule> &import);

Nit: These doc comments don't seem to match the functions

brentdax

comment created time in 24 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventhamishknight/swift

Xiaodi Wu

commit sha 94887747a4e2746163e85438934a78a8c165fa8f

[benchmark] Add another test to floating point conversion benchmark

view details

Xiaodi Wu

commit sha 26f3c81e44d9cb53abdf51ed2f6a637bae5a3a77

[benchmark] Add another floating point conversion benchmark

view details

Xiaodi Wu

commit sha cb96bfbfdf0045383f11ed4c87e8142aafddf538

[benchmark] Tweak naming and workload for two new tests

view details

Joe Groff

commit sha 57215cb17f9312187d59b7c2465a10f4682bf8f3

SIL.rst: Add documentation for async function representation. Unlike our existing coroutines, async functions run independently within an async coroutine context, and don't directly yield values back and forth. They therefore mostly behave like normal functions with only an `@async` annotation to indicate the presence of async suspend points. The `withUnsafeContinuation` primitive requires some instructions to represent the operation that prepares the continuation to be resumed, which will be represented by `begin_async_continuation`...`await_async_continuation` regions.

view details

3405691582

commit sha 62a13e9ecd31da5ef335f245b66be826d6b5b4ff

[test] Erase SDKROOT since env -u is not portable. The `env -u` flag is not portable and not available on all platforms, so this unit test will fail when the feature is unavailable. Instead of trying to unset the field, just erase it instead, since trying to copy the entire invoked environment is difficult.

view details

3405691582

commit sha 42a3da29d77810fed0374ea7efe2faff02f0aef2

[test] Mark failing reflection tests XFAIL. See SR-12893. swift-reflection-dump does not properly handle offsets in ELF executable images that, when interpreted as vaddrs, belong in segments part of the image. This just empirically XFAIL's the unit tests that are crashing or failing, even though the other tests are just happening to pass anyway. There's no clear workaround; disable the expected failures for the moment.

view details

Joe Groff

commit sha 29587ac766e596a4f154ce5c0889c43978e19f77

Revise with feedback from John and Andy

view details

Joe Groff

commit sha e2dfe3a334333b742af60bd513bdfca89c2c5bf1

Add example of `withUnsafeContinuation` lowering to SIL

view details

Arnold Schwaighofer

commit sha 383d47fd0061dcd01f4801eda5ba6b66148f4358

IRGen: Scalar type layouts need to profile the SIL type It might contain archetypes whose type metadata is required. rdar://68972976 SR-13555

view details

Alexey Komnin

commit sha 6a4c5cf0612e43caf10a4f27bd6255c1b66a4ec7

Fix SR-13520: return string instead of address of local temporary

view details

Egor Zhdan

commit sha 7ba7d9b5c1749df62cdde2d5b3184fb23d27382b

WinSDK: extract Printing submodule Currently winspool.h gets included into `WinSDK.WinSock2` via windows.h

view details

Egor Zhdan

commit sha 42dcb6948ba2332f30b833bef4913885725148ff

WinSDK: extract Multimedia submodule Some of the headers in the Multimedia subsystem were not included in any other submodule of WinSDK. This change adds them to WinSDK.

view details

Joe Groff

commit sha e4b6f8bccabcc9262597265d1ee650d3789f3232

More feedback: ownership of bbargs, begin -> get_async_continuation

view details

Pavel Yaskevich

commit sha bdfa8d9099cd7529e64a314b3fda270acdf182bb

[AST] Allow hole types to originate from declarations Associating holes directly with declarations is useful in cases when declarations are invalid e.g. directly `ErrorType` or have error types inside.

view details

Pavel Yaskevich

commit sha 17cb2d215257aba4b5f121eada24faefe9cd47d0

[ConstraintSystem] Add a new flag which specifies that solver is used for code completion

view details

Pavel Yaskevich

commit sha bf58b0c08db7641582ed650ae739a3fa15e21444

[CSGen] Use special accessor to get a type of `VarDecl` for solver use Solver needs to handle invalid declarations but only in "code completion" mode since declaration in question might not be associated with code completion, otherwise (if constraint generation fails) there is going to be no completion results.

view details

Slava Pestov

commit sha d664f5d905c602687bc1bfd6b7cc200e2679d112

ASTScope: IterableDeclContext bodies are always current

view details

Slava Pestov

commit sha 8f586d011c71cc597ebe13de5c6a3c2527c5cf5e

ASTScope: TopLevelCodeDecl scopes are always current

view details

Slava Pestov

commit sha d3d1ceec589d97a3422e81e1e04e2bc0f910ca34

ASTScope: AbstractFunctionBodyScope scopes are always current

view details

Slava Pestov

commit sha b670453bd896e4bef512a5df07ccebf2059a0ca6

ASTScope: PatternBindingEntry scopes are always current

view details

push time in a month

create barnchhamishknight/swift

branch : main

created branch time in a month

push eventhamishknight/swift

Varun Gandhi

commit sha e48469d03c87f8c1b87a2462fa3cd8c27c4d685f

[NFC] Add missing invariant checks for ExtInfoBuilders.

view details

Holly Borla

commit sha 1f426773eed1bbed59dfdbbcc4288e92454b2b07

[Property Wrappers] Lower assign_by_wrapper to re-assignment of the backing property wrapper before all of self is initialized if the wrapper has already been initialized.

view details

Varun Gandhi

commit sha 5e9bf1f7c69395db4a99c6e749acc07b81ade90e

[SIL] Store ClangTypeInfo in SILFunctionType. This patch includes a large number of changes to make sure that: 1. When ExtInfo values are created, we store a ClangTypeInfo if applicable. 2. We reduce dependence on storing SIL representations in ASTExtInfo values. 3. Reduce places where we sloppily create ASTExtInfo values which should store a Clang type but don't. In certain places, this is unavoidable; see [NOTE: ExtInfo-Clang-type-invariant]. Ideally, we would check that the appropriate SILExtInfo does always store a ClangTypeInfo. However, the presence of the HasClangFunctionTypes option means that we would need to condition that assertion based on a dynamic check. Plumbing the setting down to SILExtInfoBuilder's checkInvariants would be too much work. So we weaken the check for now; we should strengthen it once we "turn on" HasClangFunctionTypes and remove the dynamic feature switch.

view details

Varun Gandhi

commit sha 983399c1e780c490be51fbf82edd029a584258b9

[Printer] Conditionally print Clang types in emitted SIL.

view details

Doug Gregor

commit sha ab4c58482e16d4ff8dc876564f57f376ed0b738f

[Concurrency] Centralize rejection of concurrency-only attributes. Reject concurrency-only attributes in the parser if the experimental concurrency mode is not enabled.

view details

Doug Gregor

commit sha 27624053906c49ac28e96071c6135ac14db654d5

[Concurrency] Introduce `@actorIndependent` attribute. Introduce a new attribute `@actorIndependent` that specifies that a given declaration is considered to be independent of any actor. Actor-independent declarations do not have access to actor-isolated state, even when they are declared as instance members of the actor. On the other hand, actor-independent declarations can be used to conform to (synchronous) requirements in protocols.

view details

Egor Zhdan

commit sha c1e43c7768ea4e5ae716173089ea79cf79630bd6

WinSDK: add console API headers `WinSDK.core.console` only specified `consoleapi.h` header, while `consoleapi2.h` & `consoleapi3.h` were included in the WinSock2 submodule since these headers are included by `windows.h`

view details

Saleem Abdulrasool

commit sha 27aad5335f4b74e519cc55d4664396c79712aa12

Merge pull request #34004 from egorzhdan/winsdk-console WinSDK: add console API headers

view details

Erik Eckstein

commit sha 66d62ff144c3b3f4b9cb77189d1d5b2c98409d7d

stdlib: fix a back-deployment issue for array COW checks with a stdlib assert-build And rename COWSanityChecks -> COWChecks. rdar://problem/68181747

view details

Xiaodi Wu

commit sha 45299909bca5439c234ac3bd342c96a9ee87b843

[runtime] Silence unreachable code warning (#33912)

view details

swift-ci

commit sha 3921871b77c74e814646cbfae737460314a9ea9a

Merge pull request #34009 from eeckstein/fix-cow-checks

view details

Michael Gottesman

commit sha 0591fa0d6b7626725bee4eff029ac67d183c14b5

[leaks-checker] Add verbose flag to dump out raw output from runtime to help debug failures on bots. Just a quick hack to ease debugging on the bots.

view details

Robert Widmann

commit sha c0375dbe82294087c23f6a8e8bbd68cc67f98684

Remove TypeResolutionFlags::KnownNonCascadingDependency

view details

Doug Gregor

commit sha 7b1a6e4171a860ee98b5b1a11b1bbfafb3ee00c1

Merge pull request #33998 from DougGregor/concurrency-actor-independent [Concurrency] Introduce `@actorIndependent` attribute.

view details

Robert Widmann

commit sha 259e1a94c98240da8a04c47fed576f409fd34e5c

Remove UnqualifiedLookupFlags::KnownPrivate

view details

Robert Widmann

commit sha ee35a4fe18c5c9bf6f51019c09bc3bd69f451471

Remove NameLookupFlags::KnownPrivate

view details

Robert Widmann

commit sha 7bee5ffc0c9b2e57f4c9edcd3eb5af5185feeebb

Remove NLOptions::NL_Known*

view details

Robert Widmann

commit sha 934f994b462986db3929c97b324b3a11c7e31691

Remove DeclContext::isCascadingContextForLookup

view details

Robert Widmann

commit sha 3dd74c1c074d56a1f1b34122767900e0a8f72f63

Remove evaluator::getScopeForAccessLevel

view details

Robert Widmann

commit sha 7fb448071c9e58e5e85c06481632d5937083a67f

Remove DependencyScope

view details

push time in a month

PullRequestReviewEvent

Pull request review commentapple/swift

[NFC] Clarify import filtering logic and naming.

 class ModuleDecl : public DeclContext, public TypeDecl {   /// \sa getImportedModules   enum class ImportFilterKind {     /// Include imports declared with `@_exported`.-    Public = 1 << 0,+    Exported = 1 << 0,     /// Include "regular" imports with no special annotation.     Private = 1 << 1,

Would it be worth also renaming this case while we're here, to avoid confusion with @_private and SourceFile::ImportFlags::PrivateImport? Perhaps Regular?

varungandhi-apple

comment created time in a month

PullRequestReviewEvent

push eventhamishknight/swift

Yuta Saito

commit sha d6cddaabb59958737e048ff1a5dd4d283c555661

[LTO] Support LLVM LTO for driver This commit adds LTO support for handling linker options and LLVM BC emission. Even for ELF, swift-autolink-extract is unnecessary because linker options are embeded in LLVM BC content when LTO.

view details

Varun Gandhi

commit sha 384edd1f2b9c64d96dec169460b232f4ce14223f

[docs] Link 'The Swift Runtime' blog posts in ExternalResources.md.

view details

Erik Eckstein

commit sha 063929b3f022190bb578e3888215788e2e090bcf

Demangler: fix a crash when re-mangling retroactive conformances If there are multiple retroactive conformances in the mangling tree, they are put under a TypeList node. This case was not handled by the re-mangler. The crash shows up in an assert-build of the compiler, because the re-mangler is used for mangling verification. rdar://problem/68467435

view details

stevapple

commit sha fa6a8eceff308402420c3d3b559f9cdf2160b4cc

[test] Fix line-directive on Windows

view details

Saleem Abdulrasool

commit sha bdb3da805cdafd3276b08ac6201668ef427ca63d

Frontend: allow directory layout for Swift on non-Darwin platforms Adjust the serialized module loader to allow directory layouts for the Swift module on non-Darwin targets, unifying the layout across all the platforms. It also eases cross-architecture and cross-platform development by having the same layout, which can enable more similar flag usage.

view details

Egor Zhdan

commit sha b63dbbc3f04184f78218fe74d7968bf22e7d4e1d

WinSDK: extract Internationalization submodule Currently winnls.h & imm.h get included into `WinSDK.WinSock2`, however their usages might not be related to sockets

view details

Saleem Abdulrasool

commit sha af868e5c8fc2ed5728618a7a8ab53cf463c0b49b

build: migrate towards the unified directory layout for modules This changes the install layout to be similar across Darwin and non-Darwin platforms. This will enable simplifying the user experience, build infrastructure, and the driver as the SDK layout converges towards a single layout on all the platforms.

view details

Dave Lee

commit sha 157505196ada10528d2f6a221f1fed25ddfe50d8

[build-script] Disable pkg-config for Darwin hosts

view details

Egor Zhdan

commit sha 62b56f3adcaf046e4447eccdd1af156cfa94e020

WinSDK: extract Controls submodule Currently commdlg.h gets included into `WinSDK.WinSock2`, however its usages might not be related to sockets

view details

vermont42

commit sha c311e451951b28afacebae69107cef28e4af9e44

Implements SR-11580

view details

Michael Gottesman

commit sha 5717d8713a6735370ae6e6269ea1305c2f39e4d4

[build-script-impl] Add a comment explaining why an option isn't truly dead as per reviewers suggestion. In the original revert, this option was used in two places and I added a comment only on the first one. This copies the comment onto the second usage of the option. Thanks to @edymtt and @compnerd for catching my careless error!

view details

Dave Lee

commit sha 7168d18e1447e627c42242b82f9f3b6a82321ab7

s/true/false/

view details

Xiaodi Wu

commit sha 41d0e2937b4d423db1c071a93ed6e5b6aa609f51

[benchmark] Add benchmark for generic floating-point to integer conversion (#33895) * [benchmark] Add a benchmark for generic floating-point to integer conversion * [benchmark] Increase workload on new benchmark before merging

view details

3405691582

commit sha a51db090fb3ae32ec8f9735f09291ced48feb3c2

[docs] Build instructions for OpenBSD. (#33934) Swift now builds cleanly out of the box as of OpenBSD 6.8-beta. While there are still more unit test tweaks to be made, document the preparation and other quirk flags necessary to get a clean build on this system.

view details

Android Dev Notes

commit sha b137ddee128a0abea4b21965431aef01a82c69f7

Fix grammatical errors (#33940)

view details

Saleem Abdulrasool

commit sha 507ffe68323e6788558b1cfac84b53fe2d9e593b

Merge pull request #32690 from compnerd/grand-unified-module-theory Unified Swift Module Layout

view details

Saleem Abdulrasool

commit sha b5416a91ff00e2dff5ff78e36285226b2b056bd5

Merge pull request #33933 from egorzhdan/winsdk-i18n WinSDK: extract Internationalization submodule

view details

Robert Widmann

commit sha 399b190ea911fdee8df31f8e141ffbb3320b5d43

Merge pull request #33908 from stevapple/check-windows [test] Fix line-directive on Windows

view details

swift-ci

commit sha 9d4062ab122d10170e39f9635195eb90b6b75f5f

Merge pull request #33939 from apple/dl/build-script-Disable-pkg-config-for-Darwin-hosts

view details

Slava Pestov

commit sha 05b872014b589be6afa7f477241ae8660e59b48b

AST: Change isInvalid() on an accessor to delegate to the storage This helps avoid a request cycle from the isInvalid() call inside performAbstractFuncDeclDiagnostics().

view details

push time in a month

push eventhamishknight/swift

Max Desiatov

commit sha 0c8b86601c9ac23a0e7f9e09c8371601b508542c

test: Replace _silgen_name w/ _cdecl in CommandLineStressTest This test abuses @_silgen_name unnecessarily according to https://forums.swift.org/t/how-can-my-c-main-function-call-swift/40244/2

view details

Meghana Gupta

commit sha 581f6111951a3be65a8a4fdb1433362729e55f07

ARCSequenceOpts: Add LoopSummary verifier (#33810) ARCSequenceOpts with loop support works on regions inside out. While processing an outer region, it uses summary from the inner loop region to compute RefCountState transitions used for CodeMotionSafe optimization. We do not compute the loop summary by iterating over it twice or iterating until a fixed point is reached. Instead loop summary is just a list of refcount effecting instructions. And BottomUpRefCountState::updateForDifferentLoopInst and TopDownRefCountState::updateForDifferentLoopInst are used to compute the RefCountState transition when processing the inner loop region. These functions are very conservative and the flow sensitive nature of the summarized instructions do no matter. This PR adds a verifying assert to confirm this.

view details

Vedant Kumar

commit sha 43935527f20d4d30f30e329a552a36859b4499a4

[Profiler] Increment closure body count prior to the prolog (#33946) This fixes a 'SILBuilder has no valid insertion point' assertion failure seen when compiling various projects from the source compat suite. rdar://68759819

view details

Robert Widmann

commit sha 6d3ee1aae365415a5e96f60ff01c0dde1659bdef

Merge pull request #33936 from apple/cdecl-CommandLineStressTest test: Replace _silgen_name w/ _cdecl in CommandLineStressTest

view details

Vedant Kumar

commit sha ab817e83e02c733164ef833d44fee3642ad78edd

[Profiler] Increment function body count prior to the prolog This fixes another 'SILBuilder has no valid insertion point' assertion failure seen when compiling Carthage. rdar://68759819

view details

Hamish Knight

commit sha add22194fd90cd2d2f1ca47520d0571dc72a5a85

[SILGen] Allow lazy type-checking Remove the type-checking call from OptimizedIRRequest, and sink it down into SILGen and IRGen when we come to emit the source files.

view details

Hamish Knight

commit sha 44a8b56168711f5650ce2848842de7c57c137bf2

Rename getFiles to getFilesToEmit Rename the member on ASTLoweringDescriptor and IRGenDescriptor to make it more explicit it returns the files that need emitting, rather than just the files that happen to be present. This distinction will become important once we start emitting code only for a specific set of symbols.

view details

Hamish Knight

commit sha cb099454d64d878fee791bb676cc4ca0c9dba4a7

Allow SILGen to emit only a specific set of SILDeclRefs Extend ASTLoweringDescriptor to store a set of SILDeclRefs to emit through `emitFunctionDefinition`.

view details

Hamish Knight

commit sha 088a86eccb80ceb402a95027b2848724523d40e8

Introduce SymbolObjectCodeRequest Add SymbolObjectCodeRequest, which emits object code for a specific set of symbols by querying TBDGen for the source of the symbols, and asking SILGen (and eventually IRGen) to emit them.

view details

Ben Rimmington

commit sha 0c6129daf2da1b45e36f588fcd4727f7c4674dd1

[docs] Fix broken links in the documentation index (#33829)

view details

Xiaodi Wu

commit sha 7898f0b7ad429652b2c35bccb2164df25f35e847

[stdlib] Silence signaling NaN in generic conversions (#33902)

view details

swift-ci

commit sha a97e47a43190d908d96ec88639844b07e1f339cd

Merge pull request #33955 from vedantk/eng/PR-68759819

view details

Hamish Knight

commit sha a0c529a0a8ed2dd83788e4d5668b422cfad9bdb1

Merge pull request #33954 from hamishknight/sym-city-two

view details

push time in a month

push eventapple/swift

Hamish Knight

commit sha add22194fd90cd2d2f1ca47520d0571dc72a5a85

[SILGen] Allow lazy type-checking Remove the type-checking call from OptimizedIRRequest, and sink it down into SILGen and IRGen when we come to emit the source files.

view details

Hamish Knight

commit sha 44a8b56168711f5650ce2848842de7c57c137bf2

Rename getFiles to getFilesToEmit Rename the member on ASTLoweringDescriptor and IRGenDescriptor to make it more explicit it returns the files that need emitting, rather than just the files that happen to be present. This distinction will become important once we start emitting code only for a specific set of symbols.

view details

Hamish Knight

commit sha cb099454d64d878fee791bb676cc4ca0c9dba4a7

Allow SILGen to emit only a specific set of SILDeclRefs Extend ASTLoweringDescriptor to store a set of SILDeclRefs to emit through `emitFunctionDefinition`.

view details

Hamish Knight

commit sha 088a86eccb80ceb402a95027b2848724523d40e8

Introduce SymbolObjectCodeRequest Add SymbolObjectCodeRequest, which emits object code for a specific set of symbols by querying TBDGen for the source of the symbols, and asking SILGen (and eventually IRGen) to emit them.

view details

Hamish Knight

commit sha a0c529a0a8ed2dd83788e4d5668b422cfad9bdb1

Merge pull request #33954 from hamishknight/sym-city-two

view details

push time in a month

delete branch hamishknight/swift

delete branch : sym-city-two

delete time in a month

PR merged apple/swift

Reviewers
Introduce SymbolObjectCodeRequest

Add SymbolObjectCodeRequest, which emits object code for a specific set of symbols by querying TBDGen for the source of the symbols, and asking SILGen (and eventually IRGen) to emit them.

+198 -48

2 comments

11 changed files

hamishknight

pr closed time in a month

pull request commentapple/swift

Introduce SymbolObjectCodeRequest

@swift-ci please smoke test

hamishknight

comment created time in a month

pull request commentapple/swift

Introduce SymbolObjectCodeRequest

@swift-ci please smoke test

hamishknight

comment created time in a month

Pull request review commentapple/swift

Introduce SymbolObjectCodeRequest

 #include "llvm/Transforms/Instrumentation/SanitizerCoverage.h" #include "llvm/Transforms/Instrumentation/ThreadSanitizer.h" #include "llvm/Transforms/ObjCARC.h"+#include "llvm/Transforms/Utils/Cloning.h"

Ah that's a holdover from https://github.com/apple/swift/pull/32964 when we cloned the module with the requested symbols – good spot!

hamishknight

comment created time in a month

PullRequestReviewEvent

push eventhamishknight/swift

Hamish Knight

commit sha add22194fd90cd2d2f1ca47520d0571dc72a5a85

[SILGen] Allow lazy type-checking Remove the type-checking call from OptimizedIRRequest, and sink it down into SILGen and IRGen when we come to emit the source files.

view details

Hamish Knight

commit sha 44a8b56168711f5650ce2848842de7c57c137bf2

Rename getFiles to getFilesToEmit Rename the member on ASTLoweringDescriptor and IRGenDescriptor to make it more explicit it returns the files that need emitting, rather than just the files that happen to be present. This distinction will become important once we start emitting code only for a specific set of symbols.

view details

Hamish Knight

commit sha cb099454d64d878fee791bb676cc4ca0c9dba4a7

Allow SILGen to emit only a specific set of SILDeclRefs Extend ASTLoweringDescriptor to store a set of SILDeclRefs to emit through `emitFunctionDefinition`.

view details

Hamish Knight

commit sha 088a86eccb80ceb402a95027b2848724523d40e8

Introduce SymbolObjectCodeRequest Add SymbolObjectCodeRequest, which emits object code for a specific set of symbols by querying TBDGen for the source of the symbols, and asking SILGen (and eventually IRGen) to emit them.

view details

push time in a month

pull request commentapple/swift

Introduce SymbolObjectCodeRequest

@swift-ci please test

hamishknight

comment created time in a month

pull request commentapple/swift

[IRGen] Introduce SymbolObjectCodeRequest

Superseded by https://github.com/apple/swift/pull/33954

hamishknight

comment created time in a month

PR closed apple/swift

Reviewers
[IRGen] Introduce SymbolObjectCodeRequest

Introduce a request that returns the object code for a specific set of symbols in a file or module.

+144 -0

2 comments

7 changed files

hamishknight

pr closed time in a month

PR opened apple/swift

Introduce SymbolObjectCodeRequest

Add SymbolObjectCodeRequest, which emits object code for a specific set of symbols by querying TBDGen for the source of the symbols, and asking SILGen (and eventually IRGen) to emit them.

+199 -48

0 comment

11 changed files

pr created time in a month

push eventhamishknight/swift

Michael Gottesman

commit sha c8d4d168f7981fc0b6cadedd71c2e340c622bcb3

Revert "build-script: remove dead CMake options for Swift" This reverts commit 95102bc258a6b30ba2349d561ef56ea48c601cae. This is actually a dead option that is relied upon for some configurations. I am going to add a note to not touch the option. I talked with compnerd about this and they are cool with this. I think that we can redo this in a nicer way when we are further into the build-script-impl refactoring. I added a note to the code to explain that it isn't dead.

view details

Richard Wei

commit sha 4fe8dda893fd8ad5daedb9da1cf81ff61f6a2add

[AutoDiff] [Docs] Clarify 'Differentiable' derived conformances conditions. Clarify `Differentiable` derived conformances synthesis conditions.

view details

3405691582

commit sha 88167e74d1b8e1714ac2f108764ce265cae0ead5

[test] diff --strip-trailing-cr is non-standard. This flag is a GNU extension, and would cause misleading test failures on other platforms where this extension is not available. However, the necessity to switch line endings is only required on Windows when testing. We could use sed to canonicalize line endings before comparing, but that may cause higher amounts of filesystem traffic on Windows which would slow down testing. Instead, move the substitution for diff in SourceKit's lit.local.cfg up to the top level, and conditionalize the substitution which has the flag on Windows, but not on other platforms (where it should not be required).

view details

Saleem Abdulrasool

commit sha 76a716008eeb604dc58bf527243e301434539a76

Merge pull request #33931 from 3405691582/SedThenDiff [test] diff --strip-trailing-cr is non-standard.

view details

Jordan Rose

commit sha fc6b14faf73abb84bf8d6019ccb654dc94ba134b

stdlib: Remove unused, unsafe helper function _withUninitializedString (#33704) No functionality change.

view details

Xi Ge

commit sha 00577acacd3bf257f46d3091f6282dd21a0f39cc

ABI checker: when invoking via build system, explicitly mention ABI breakge in diagnostics The error messages emitted from the ABI checker are mostly explanations of breakages. We should explicitly mention why they are emitted to differentiate them from other compiler diagnostics. rdar://68864860

view details

Richard Wei

commit sha 8df2d34603b737b00af323118c1017789db1c8e5

Address review comment.

view details

Xi Ge

commit sha 36fe81141f18b573072308eabf6a17ef65edecd0

Merge pull request #33942 from nkcsgexi/add-abi-breakage ABI checker: when invoking via build system, explicitly mention ABI breakge in diagnostics

view details

Michael Gottesman

commit sha 9010c1b6f338b23e62b69464105634e55df40d17

Merge pull request #33760 from gottesmm/pr-1d2143f460a9d74a60af3be92d03f404a9cde805 Revert "build-script: remove dead CMake options for Swift"

view details

Dave Lee

commit sha 0c79763b332c720869122c4bea1e767356e8024f

[build-script] Cleanup source directory layout help

view details

swift-ci

commit sha eccf9b3f759aee3239947b3a9e28dbd863d6a811

Merge pull request #33927 from rxwei/clarify-derived-conformances-conditions

view details

swift-ci

commit sha b96eb1d6a424161b1eafe4ae3dd16faa32549d8b

Merge pull request #33905 from apple/dl/build-script-Cleanup-source-directory-layout-help

view details

Hamish Knight

commit sha 010b0d74a0d0c426d3c5ef86c02aad6c5948a3ea

[SILGen] Allow lazy type-checking Remove the type-checking call from OptimizedIRRequest, and sink it down into SILGen and IRGen when we come to emit the source files.

view details

Hamish Knight

commit sha 02ce439b71f27f3fa869e5c0103d42b67aa5a9f9

Rename getFiles to getFilesToEmit Rename the member on ASTLoweringDescriptor and IRGenDescriptor to make it more explicit it returns the files that need emitting, rather than just the files that happen to be present. This distinction will become important once we start emitting code only for a specific set of symbols.

view details

Hamish Knight

commit sha 3fcc7ee8cb6aa07a4aa68c70cfba83b4f0a44fd5

Allow SILGen to emit only a specific set of SILDeclRefs Extend ASTLoweringDescriptor to store a set of SILDeclRefs to emit through `emitFunctionDefinition`.

view details

Hamish Knight

commit sha ddb76f072174abf5579f20aeef93c24236614f03

Introduce SymbolObjectCodeRequest Add SymbolObjectCodeRequest, which emits object code for a specific set of symbols by querying TBDGen for the source of the symbols, and asking SILGen (and eventually IRGen) to emit them.

view details

push time in a month

push eventhamishknight/swift

Michael Gottesman

commit sha c8d4d168f7981fc0b6cadedd71c2e340c622bcb3

Revert "build-script: remove dead CMake options for Swift" This reverts commit 95102bc258a6b30ba2349d561ef56ea48c601cae. This is actually a dead option that is relied upon for some configurations. I am going to add a note to not touch the option. I talked with compnerd about this and they are cool with this. I think that we can redo this in a nicer way when we are further into the build-script-impl refactoring. I added a note to the code to explain that it isn't dead.

view details

Richard Wei

commit sha 4fe8dda893fd8ad5daedb9da1cf81ff61f6a2add

[AutoDiff] [Docs] Clarify 'Differentiable' derived conformances conditions. Clarify `Differentiable` derived conformances synthesis conditions.

view details

3405691582

commit sha 88167e74d1b8e1714ac2f108764ce265cae0ead5

[test] diff --strip-trailing-cr is non-standard. This flag is a GNU extension, and would cause misleading test failures on other platforms where this extension is not available. However, the necessity to switch line endings is only required on Windows when testing. We could use sed to canonicalize line endings before comparing, but that may cause higher amounts of filesystem traffic on Windows which would slow down testing. Instead, move the substitution for diff in SourceKit's lit.local.cfg up to the top level, and conditionalize the substitution which has the flag on Windows, but not on other platforms (where it should not be required).

view details

Saleem Abdulrasool

commit sha 76a716008eeb604dc58bf527243e301434539a76

Merge pull request #33931 from 3405691582/SedThenDiff [test] diff --strip-trailing-cr is non-standard.

view details

Jordan Rose

commit sha fc6b14faf73abb84bf8d6019ccb654dc94ba134b

stdlib: Remove unused, unsafe helper function _withUninitializedString (#33704) No functionality change.

view details

Xi Ge

commit sha 00577acacd3bf257f46d3091f6282dd21a0f39cc

ABI checker: when invoking via build system, explicitly mention ABI breakge in diagnostics The error messages emitted from the ABI checker are mostly explanations of breakages. We should explicitly mention why they are emitted to differentiate them from other compiler diagnostics. rdar://68864860

view details

Richard Wei

commit sha 8df2d34603b737b00af323118c1017789db1c8e5

Address review comment.

view details

Xi Ge

commit sha 36fe81141f18b573072308eabf6a17ef65edecd0

Merge pull request #33942 from nkcsgexi/add-abi-breakage ABI checker: when invoking via build system, explicitly mention ABI breakge in diagnostics

view details

Michael Gottesman

commit sha 9010c1b6f338b23e62b69464105634e55df40d17

Merge pull request #33760 from gottesmm/pr-1d2143f460a9d74a60af3be92d03f404a9cde805 Revert "build-script: remove dead CMake options for Swift"

view details

Dave Lee

commit sha 0c79763b332c720869122c4bea1e767356e8024f

[build-script] Cleanup source directory layout help

view details

swift-ci

commit sha eccf9b3f759aee3239947b3a9e28dbd863d6a811

Merge pull request #33927 from rxwei/clarify-derived-conformances-conditions

view details

swift-ci

commit sha b96eb1d6a424161b1eafe4ae3dd16faa32549d8b

Merge pull request #33905 from apple/dl/build-script-Cleanup-source-directory-layout-help

view details

push time in a month

push eventhamishknight/swift

Hamish Knight

commit sha 4a480a042442f3e7210ba8d6b044b78a1ea24b28

[SILGen] Allow lazy type-checking Remove the eager type-checking call from OptimizedIRRequest, and sink it down into SILGen and IRGen when we come to emit the source files.

view details

Hamish Knight

commit sha 186acaa9d5a0f4ca259379ae20db1635f398a2dd

Rename getFiles to getFilesToEmit Rename the member on ASTLoweringDescriptor and IRGenDescriptor to make it more explicit it returns the files that need emitting, rather than just the files that happen to be present. This distinction will become important once we start emitting code only for a specific set of symbols.

view details

Hamish Knight

commit sha 2932e18cf8619c19c51b0fb04df3b44f3bcd31ad

Allow SILGen to emit only a specific set of SILDeclRefs Extend ASTLoweringDescriptor to store a set of SILDeclRefs to emit through `emitFunctionDefinition`.

view details

Hamish Knight

commit sha 56356e2697c491265c2bdb406c6f575466a95698

Introduce SymbolObjectCodeRequest Add SymbolObjectCodeRequest, which emits object code for a specific set of symbols by querying TBDGen for the source of the symbols, and asking SILGen (and eventually IRGen) to emit them.

view details

push time in a month

create barnchhamishknight/swift

branch : sym-city-two

created branch time in a month

push eventhamishknight/swift

freddi

commit sha 495087f26f4a0288a8cf66be1829304ac403c43b

[sil-opt] Fix to satisfy all trapping instruction case at SILInstruction::mayTrap

view details

freddi

commit sha 2676839087baebf11d8f5b996249f61240bce411

[sil-opt] added test for unconditional_checked_cast_addr and unconditional_checked_cast_value at side-effect.sil

view details

Xi Ge

commit sha 950eb74e67fd6240b58e6c4dc73187a36e3fb57a

ABI Checker: use lower-cased decl keywords to be consistent with source. NFC

view details

Pavel Yaskevich

commit sha c56ae1e33640efc15cc6ebfcb7bf67297f1b12a3

Merge pull request #33851 from freddi-kit/fix/may-trap-condition [sil-opt] Fix covering all-case of trapping instruction of SILInstruction::mayTrap

view details

Xi Ge

commit sha c11cb4463decaefba56780e3cb0a016c5950ef27

Merge pull request #33928 from nkcsgexi/lower-case-keyword ABI Checker: use lower-cased decl keywords to be consistent with source. NFC

view details

push time in a month

push eventhamishknight/swift

Robert Widmann

commit sha 513d108a0e93c845bdc45b504b58e8553ad37852

[NFC] Drop SourceFileKind from getMainSourceFile The parameter here was derived from the CompilerInvocation-level parsing bits, which doesn't make any sense. This state is going away soon, so drop the parameter.

view details

Robert Widmann

commit sha 8b725d8713f96a2bb7599f92b2f64856aa9aaed3

[NFC] Inline inputFileKindCanHaveTBDValidated

view details

Robert Widmann

commit sha c3e33bec7a81619c7b0cd0cd0e471a6b91c5632b

[NFC] Drop getSourceFileKind

view details

Robert Widmann

commit sha 75116e9f86c8e676b302b7b8fda4939ca316502f

[NFC] Inline CompilerInstance::setUpForInput

view details

Robert Widmann

commit sha 66ad0c1c40411d85d48f6724daf1a1913e1f0204

[Gardening] Document InputFile

view details

Robert Widmann

commit sha c7f0f24f47dbe817e0846d8ce4a47ffe6092e56f

[NFC] Refactor InputFile Construction Add a new constructor that takes an explicit file_type::ID to allow for the eventual deletion of InputFileKind.

view details

Robert Widmann

commit sha f103405bb3cbba5a260159831411e5370a0c5317

Use the new InputFile Constructor

view details

Robert Widmann

commit sha ac0814e4c8a94dd46ac05020e58feacb04cb5b9d

[Gardening] Drop some unused accessors

view details

Robert Widmann

commit sha 9fd591878677753e460e88e2a038eda597480426

Swap InputFileKind for ParseInputMode Tying InputFile to this option meant that every input that was not one of the explictly-blessed kinds was modeled as a Swift file. With the new InputFile that infers file kinds, we no longer need CompilerInvocation::setInputKind

view details

Robert Widmann

commit sha 0a5a6f17c8d443377ee9e2b4987805eb9d52e19d

[NFC] Drop InputFileKind

view details

Robert Widmann

commit sha a8766cce5b443de088b73b0248ab1ab6220b4d37

[NFC] Refactor InputFile's Accessors

view details

Robert Widmann

commit sha 9b89c0ca52d6c8a63fc90e59b2eb5d86d0f77e64

[NFC] Consolidate SIL LangOpts Parsing

view details

Robert Widmann

commit sha c5a6cd6abe1955d30796e776ec2562dc8b7bdbbc

[NFC] Refactor getPrimaryOrMainSourceFile

view details

Robert Widmann

commit sha 3287c4b271d52a0d27046cddc40d446f5767af1c

[NFC] Refactor Main File Computation

view details

Robert Widmann

commit sha f9e02946efb0ae103e78740cc4b79ca2deb7a2fb

Restore InputMode For Module Interface

view details

Robert Widmann

commit sha e6f7b9dc8e88b053c50325385de29d1326b55d3b

Merge pull request #33926 from CodaFi/just-my-kind [NFC] Refactor InputFile

view details

push time in a month

push eventhamishknight/swift

Brian Gontowski

commit sha 3425a6dbb16e5fa7ad4b735eff4533c279d61442

Added protocol to support CVarArg objects that need to be retained

view details

Brian Gontowski

commit sha 0e7749bcde5eb1bc9fec82ef0eb3896ec8d6de6f

Fixed comment

view details

Saleem Abdulrasool

commit sha 85d6f51743edf4fbd7470400ace2a90ee3ed4831

build: add additional search paths for Foundation artifacts This allows us to homogenise the foundation build artifacts with swift-tools-support-core, swift-driver, swift-package-manager, swift-numerics, swift-argument-parser.

view details

Brian Gontowski

commit sha 17c77ba703b32c11e127573d414d31c9ec635188

Only use _CVarArgObject on non-ObjC platforms

view details

Brian Gontowski

commit sha 515c371be434ff49debfd145ebd9047bd148d47f

Avoid a warning when not modifying arg

view details

Owen Voorhees

commit sha 970824706513f8a62c5f8ca01837ddc499f8583e

[SE-0284] Lift the 1-vararg-per-function restriction [SE-0284] Add round_trip_parse_gen tests [SE-0284] Add missing test cases

view details

Adrian Prantl

commit sha 4b9cf31ba0dd8cc00aa9385507f6269e65230fe6

Add a callback to swift::reflection::MemoryReader that allows LLDB to provide swift::reflection::TypeInfo for (Clang-)imported non-Objective-C types. This is needed to reflect on the size mixed Swift / Clang types, when no type metadata is available for the C types. This is a necessary ingredient for the TypeRef-based Swift context in LLDB. Because we do not have reflection metadata for pure C types in Swift, reflection cannot compute TypeInfo for NominalTypeRefs for those types. By providing this callback, LLDB can supply this information for DWARF, and reflection can compute TypeInfos for mixed Swift/C types.

view details

Adrian Prantl

commit sha 961dc59cf5ff026ab3de174a44c915daf7dc9941

Thread Labels through TupleTypeRef.

view details

Adrian Prantl

commit sha 9287707520b1266b23bc625a18e6075204f81e90

Support generic parent contexts in DemanglingForTypeRef.

view details

Adrian Prantl

commit sha 9b5b265306a90cf1f3809c729b3ce803318d77f9

Take TypeInfoProvider into account when caching TypeInfos.

view details

Adrian Prantl

commit sha 56b2e906da8c844b5746bbfd752f3504fd936290

Support MetatypeTypeRefs in DemanglingForTypeRef.

view details

Yuta Saito

commit sha 43fb346b6795b0885b82d7c943e33566bb4923f6

[Frontend] Set up output file .swiftmodule.summary This patch focus on teaching frontend and driver to emit this file. The actual serialization and deserialization implementation will come later.

view details

Nathan Hawes

commit sha cf60b2fe610616dd8f3dd7838a0cee7f0090eee7

[CodeCompletion] Pass the CodeCompletionExpr rather than just the base expression to the DotExpr completion callback.

view details

Nathan Hawes

commit sha fe9df72d554aa15d2d0ccc933c213938953c1c79

[CodeCompletion] Add initial implementation of solver-based member completion. This hooks up member completion to the new typeCheckForCodeCompletion API to generate completions from all solutions the constraint solver produces (include ones requiring fixes) rather than relying purely the single solution being applied to the AST (if any). This lets us still give completion results in ambiguous and invalid code.

view details

Pavel Yaskevich

commit sha a49404d593c36056158cded398f97aeb3b37c8e6

[CodeCompletion] Adjust `DotExprLookup::sawSolution` to use new `Solution` APIs

view details

Pavel Yaskevich

commit sha 5bd19d28ac82b137d266909cdf90946fa02ae738

[CSSolver] add debug logging to `solveForCodeCompletion`

view details

Pavel Yaskevich

commit sha 53de10fd3cb7d10eb7d2845e922029867b24da60

[CSSolver] Update expression after constraint generation while solving for code completion

view details

Nathan Hawes

commit sha 3d8561502bee5644c23f7fa2fe26143c50f72b3f

[CodeCompletion] Move CompletionCollector to ASTContext + bug fixes.

view details

Pavel Yaskevich

commit sha 5872cef2ff8a096612b0e5cccd1ebfbc69967236

[CSSolver/CodeCompletion] If pre-check fails extract code completion expression and use it If there was an invalid reference which was caught by pre-check, let's remove all context besides code completion itself and use it to produce code completion results.

view details

Pavel Yaskevich

commit sha 97de1781519a58022429224089f09dea47a5baeb

[CSSolver] Solution: Resolve holes as underlying generic parameters for code completion To aid code completion, we need to attempt to convert type holes back into underlying generic parameters if possible, since type of the code completion expression is used as "expected" (or contextual) type so it's helpful to know what requirements it has to filter the list of possible member candidates e.g. ```swift func test<T: P>(_: [T]) {} test(42.#^MEMBERS^#) ``` It's impossible to resolve `T` in this case but code completion expression should still have a type of `[T]` instead of `[<<hole>>]` because it helps to produce correct contextual member list based on a conformance requirement associated with generic parameter `T`.

view details

push time in a month

push eventapple/swift

Hamish Knight

commit sha a7a8d9fd260bd2d5d1a213100c4000f5618e39bf

[AST] Remove NewBodyKind default A bunch of callers were accidentally misusing it.

view details

Hamish Knight

commit sha 9b8b2068d2931a60cd495fab59e3204c16db2d0f

Add AbstractFunctionDecl::getTypecheckedBody Refactor TypeCheckFunctionBodyRequest to return the type-checked body, and remove `typeCheckAbstractFunctionBody` in favor of a method on AbstractFunctionDecl. In addition, start returning an ErrorExpr body instead of a partially type-checked body if type-checking fails.

view details

Hamish Knight

commit sha 8fd6d7e19a9d8acf58cdd1182015df76ac88ea97

Add some missing calls to setThrows We no longer run error checking for already type-checked synthesized functions, so add a couple of `setThrows` calls where they were previously missing.

view details

Hamish Knight

commit sha 28246a7596dcc565b827b3666b9e4bed9adf6911

[SILGen] Use getTypecheckedBody Use `getTypecheckedBody` to allow lazy type-checking when emitting function definitions.

view details

Hamish Knight

commit sha efdc358eb4a3a53f80195bb11369da3abd3ea6f4

Merge pull request #33806 from hamishknight/typed-def

view details

push time in a month

delete branch hamishknight/swift

delete branch : typed-def

delete time in a month

delete branch hamishknight/llvm-project

delete branch : typed-next

delete time in a month

push eventapple/llvm-project

Hamish Knight

commit sha b672137c8cca69af1d7567367aaf37bf9df417c2

[lldb] Update call to AbstractFunctionDecl::setBody

view details

Hamish Knight

commit sha f6470396da4dd5f5e9f4ac1333776d5f8f356325

Merge pull request #1784 from hamishknight/typed-next [master-next] Update for apple/swift#33806

view details

push time in a month

PR merged apple/llvm-project

[master-next] Update for apple/swift#33806

Cherry-pick of https://github.com/apple/llvm-project/pull/1753.

+7 -4

0 comment

1 changed file

hamishknight

pr closed time in a month

delete branch hamishknight/llvm-project

delete branch : typed-def

delete time in a month

PR merged apple/swift

Reviewers
Add and use AbstractFunctionDecl::getTypecheckedBody

Refactor TypeCheckFunctionBodyRequest to return the type-checked body, and remove typeCheckAbstractFunctionBody in favor of a method on AbstractFunctionDecl. In addition, start returning an ErrorExpr body instead of a partially type-checked body if type-checking fails.

Then, start using getTypecheckedBody in SILGen to allow lazy type-checking when emitting function definitions.

+105 -53

3 comments

17 changed files

hamishknight

pr closed time in a month

push eventapple/llvm-project

Hamish Knight

commit sha 8618667cb427b8fb014b40a0e5f3ad2bf4df62b0

[lldb] Update call to AbstractFunctionDecl::setBody

view details

Hamish Knight

commit sha 1a186ed8482467c05276de3b26ab55dd5646569d

Merge pull request #1753 from hamishknight/typed-def Update for apple/swift#33806

view details

push time in a month

PR opened apple/llvm-project

[master-next] Update for apple/swift#33806

Cherry-pick of https://github.com/apple/llvm-project/pull/1753.

+7 -4

0 comment

1 changed file

pr created time in a month

create barnchhamishknight/llvm-project

branch : typed-next

created branch time in a month

push eventhamishknight/llvm-project

git apple-llvm automerger

commit sha f18d8b5d5baf874b2f52dab752e23fcc0523b0df

Merge commit '826f730f3f1e' from llvm.org/release/11.x into apple/stable/20200714

view details

Nikita Popov

commit sha 826f730f3f1e2722059fe9d7f271a27a0d980a0f

[InstCombine] Add test for PR46680 (NFC) (cherry picked from commit 13ae440de4a408cf9d1a448def09769ecbecfdf7)

view details

git apple-llvm automerger

commit sha 26cd52696da1b1936ca06a757cc679786204cb74

Merge commit 'eb3c5db40a14' from llvm.org/release/11.x into apple/stable/20200714

view details

Nikita Popov

commit sha eb3c5db40a1450d50c387f3a42f4c095001220cb

[InstCombine] Fix store merge worklist management (PR46680) Fixes https://bugs.llvm.org/show_bug.cgi?id=46680. Just like insertions through IRBuilder, InsertNewInstBefore() should be using the deferred worklist mechanism, so that processing of newly added instructions is prioritized. There's one side-effect of the worklist order change which could be classified as a regression. An add op gets pushed through a select that at the time is not a umax. We could add a reverse transform that tries to push adds in the reverse direction to restore a min/max, but that seems like a sure way of getting infinite loops... Seems like something that should best wait on min/max intrinsics. Differential Revision: https://reviews.llvm.org/D84109 (cherry picked from commit d12ec0f752e7f2c7f7252539da2d124264ec33f7)

view details

git apple-llvm automerger

commit sha 6783822c85a40b15c5ec004377d437038c4f13f7

Merge commit '5b3881c88bb2' from apple/stable/20200714 into swift/master-rebranch

view details

git apple-llvm automerger

commit sha 5b3881c88bb21dcd4c82ff077e8540a080e5fff5

Merge commit '8a2bc9431193' from llvm.org/release/11.x into apple/stable/20200714

view details

Simon Pilgrim

commit sha 8a2bc9431193026454745d538cf7e5a5a6b6d5be

[X86][AVX] getTargetShuffleMask - don't decode VBROADCAST(EXTRACT_SUBVECTOR(X,0)) patterns. getTargetShuffleMask is used by the various "SimplifyDemanded" folds so we can't assume that the bypassed extract_subvector can be safely simplified - getFauxShuffleMask performs a more general decode that allows us to more safely catch many of these cases so the impact is minimal. (cherry picked from commit 5b5dc2442ac7a574a3b7d17c15ebeeb9eb3bec26)

view details

Ktwu

commit sha be29b6fc0dd62fdcd8bee5a6e5c8ebb2692a307e

[lldb] Fix swift/master-next by using non-global recognizer semantics https://reviews.llvm.org/D83757 refactored how frame recognizers are handled. Fix Swift-centric code to take this into account. (cherry picked from commit c7ca7cd5b86f10cde7ddcedb500291e7c4edff33)

view details

Jonas Devlieghere

commit sha 32cf9ace405d1410bbadf80a7ed5e18702520207

[lldb] Re-enable TestSwiftExprAllocator

view details

Jonas Devlieghere

commit sha 374ee0e94f6c97b2af518cbb5bf89e9e28bab6b6

[lldb] Re-enable TestSwiftStaticArchiveTwoSwiftmodules

view details

Steven Wu

commit sha 97c829a5f3cc46419479c90be7526d26c90e9aff

[Bitcode] Drop invalid branch_weight in BitcodeReader Summary: If bitcode reader gets an invalid branch weight, drop that from the inputs. This allows us to read the broken modules we generated before the verifier was able to catch this. rdar://64870641 Reviewers: yrouban, t.p.northover, dexonsmith, arphaman, aprantl Reviewed By: aprantl Subscribers: aprantl, hiraditya, jkorous, ributzka, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83699 (cherry picked from commit 78709345fb343123020a8615325f3943bd1cb420)

view details

Steven Wu

commit sha 5ebdb250eaf21419c5b702e5f07ccb6deada2373

[Bitcode] Avoid duplicating linker option when upgrading Summary: The upgrading path from old ModuleFlag based linker options to the new NamedMetadata based linker option in in materializeMetadata() which gets called once for the module and once for every GV. The linker options are getting dup'ed every time and it can create massive amount of the linker options in the object file that gets created from old bitcode. Fix the problem by checking if the new option exists or not before upgrade again. rdar://64543389 Reviewers: pcc, t.p.northover, dexonsmith, arphaman Reviewed By: arphaman Subscribers: hiraditya, jkorous, ributzka, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83688 (cherry picked from commit ac375c2fe316dae6eb770b38f90d6b67fadd22ec)

view details

Florian Hahn

commit sha 9fe8b478a935b91e3ad15f8b06a48fe819f0162b

[ScheduleDAGRRList] Limit number of candidates to explore. Currently popFromQueueImpl iterates over all candidates to find the best one. While the candidate queue is small, this is not a problem. But it becomes a problem once the queue gets larger. For example, the snippet below takes 330s to compile with llc -O0, but completes in 3s with this patch. define void @test(i4000000* %ptr) { entry: store i4000000 0, i4000000* %ptr, align 4 ret void } This patch limits the number of candidates to check to 1000. This limit ensures that it never triggers for test-suite/SPEC2000/SPEC2006 on X86 and AArch64 with -O3, while still drastically limiting the compile-time in case of very large queues. It would be even better to use a binary heap to manage to queue (D83335), but some heuristics change the score of a node in the queue after another node has been scheduled. I plan to address this for backends that use the MachineScheduler in the future, but that requires a more careful evaluation. In the meantime, the limit should help users impacted by this issue. The patch includes a slightly smaller version of the motivating example as test case, to guard against the issue. Reviewers: efriedma, paquette, niravd Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D84328

view details

Florian Hahn

commit sha dbcb9ca6b285286d5f9f3655b41171ce5acd89bc

[ScheduleDAGRRList] Pacify overload mismatch in std::min. On systems where size() doesn't return unsigned long, this leads to an overloading mismatch. Convert the constant to whatever type is used for Q.size() on the system.

view details

git apple-llvm automerger

commit sha 1c99560c7f704e9dd5bcd2d15c7ff3d6241df79a

Merge commit '833f8c958601' from llvm.org/release/11.x into apple/stable/20200714

view details

Tobias Hieta

commit sha 833f8c958601bb640ba6a25d627c1dc58dad14d2

[clang] Fix libdl linking for libclang in standalone mode Differential Revision: https://reviews.llvm.org/D81385 (cherry picked from commit a41af6e41e6fcf3e7030feaf24057cbe8291b748)

view details

git apple-llvm automerger

commit sha 179b804c6f707c93bfc736ae34a060773659f4a8

Merge commit '1c99560c7f70' from apple/stable/20200714 into swift/master-rebranch

view details

Adrian Prantl

commit sha feda926439c88e2e40e688a3e543feb61a47d179

debugserver: Support ios simulator load command disambiguation in qProcessInfo This patch basically moves the disambiguation code from a place where it was complicated to implement straight to where the load command is parsed, which has the neat side affect of actually supporting all call sites! rdar://problem/66011909 Differential Revision: https://reviews.llvm.org/D84480 (cherry picked from commit 58d84eb534252747115b358c890a1b79c65d4ad4)

view details

Adrian Prantl

commit sha 3ce3171a30cff67c10d449dd4df643fcec8cca63

debugserver: Support ios simulator load command disambiguation in qProcessInfo This patch basically moves the disambiguation code from a place where it was complicated to implement straight to where the load command is parsed, which has the neat side affect of actually supporting all call sites! rdar://problem/66011909 Differential Revision: https://reviews.llvm.org/D84480 (cherry picked from commit 58d84eb534252747115b358c890a1b79c65d4ad4) Conflicts: lldb/tools/debugserver/source/MacOSX/MachProcess.mm

view details

shafik

commit sha e7ad1f8bf25db3b19da513ce6b2c31f012b0b905

Fix how we handle bit-fields for Objective-C when creating an AST Currently expressions dealing with bit-fields in Objective-C objects is pretty broken. When generating debug-info for Objective-C bit-fields DW_AT_data_bit_offset has a different meaning than it does to C and C++. When we parse the DWARF we validate bit offsets for C and C++ correctly but not for ObjC. For ObjC in some cases we end up incorrectly flagging an error and we don't generate further bit-fields in the AST. Later on when we do a name lookup we don't find the ObjCIvarDecl in the ObjCInterfaceDecl in some cases since we never added it and then we don't go to the runtime to obtain the offset. This will fix how we handle bit-fields for the Objective-C case and add tests to verify this fix but also to documents areas that still don't work and will be addressed in follow-up PRs. Note: we can never correctly calculate offsets statically because of how Objective-C deals with the fragile base class issue. Which means the runtime may need to shift fields over. Differential Revision: https://reviews.llvm.org/D83433 (cherry picked from commit a54c42df9a7261eafc9291128be4ff5217302dd3)

view details

push time in a month

pull request commentapple/swift

Add and use AbstractFunctionDecl::getTypecheckedBody

https://github.com/apple/llvm-project/pull/1753

@swift-ci please test

hamishknight

comment created time in a month

pull request commentapple/swift

Add and use AbstractFunctionDecl::getTypecheckedBody

https://github.com/apple/llvm-project/pull/1753

@swift-ci please test

hamishknight

comment created time in 2 months

pull request commentapple/llvm-project

Update for apple/swift#33806

https://github.com/apple/swift/pull/33806

@swift-ci please test

hamishknight

comment created time in 2 months

push eventhamishknight/llvm-project

Hamish Knight

commit sha 8618667cb427b8fb014b40a0e5f3ad2bf4df62b0

[lldb] Update call to AbstractFunctionDecl::setBody

view details

push time in 2 months

push eventhamishknight/swift

3405691582

commit sha 38dd7d81922ff764b0f83e501ab748dcbd6694bc

[IRGen] Fix asserting local extern declarations. emitClangDecl interacts with clang and LLVM to achieve C interop. On the LLVM side, CodeGenModule::EmitGlobal asserts if the decl eventually passed to it is not a "file scoped" via VarDecl::isFileVarDecl. LLVM currently asserts on local extern variables in C headers passed to Swift when the definition exists outside that header. To fix this, we need to ensure that we are only passing Decls that do not trip the assertion but not unduly limit local extern variables when the corresponding definition exists inside that header. We can do that fairly simply by checking for isFileVarDecl just before we hand-off to clang. When the definition for the local extern variable exists inside the header, isFileVarDecl is true, and if it exists elsewhere, it is false. This matches up with the assert expectation on the LLVM side exactly. This indirectly addresses #28968, since that contains the only part of the Swift stdlib that uses a local extern variable, but any header that is used with Swift that contains a local extern variable will cause the compiler to assert when built with assertions enabled.

view details

3405691582

commit sha 33bb4837dab5ca0397d52c0e302c3e97b3081773

[test][IRGen] Loosen check in test unused.sil. In #33246 among other changes, a CHECK referring to the size of _swift1_autolink_entries was changed from a regex-based expectation to a static value. This means on platforms with different link flags, this expectation fails but does not signify any real failure. Revert back to using a regex check for the length of this constant.

view details

Saleem Abdulrasool

commit sha 66059a493588b2bbb157b802f47e5b6fa2dd10a1

utils: add a timeout to the integration tests This will allow us to add test cases which may hang. The timeout here is taken from the value we use in the regular test suite (along with the check for the timeout requirements).

view details

Saleem Abdulrasool

commit sha 8125f772a0155c24eb80f6806ef4a77d1ed52a10

Update build-script-impl Reduce timeout to 20m

view details

Saleem Abdulrasool

commit sha 9f01742d944df1f6a53653c046a7a597893dbe63

Update build-script-impl Fix quoting

view details

Xiaodi Wu

commit sha 65a547c4e62da29af82a661dbd2930728618e050

[benchmark] Add new benchmark for floating-point conversion

view details

Xi Ge

commit sha 028a75572c72904ec4a89845182dd86ef5ca5086

ModuleInterface: remark potential version differences between SDK and prebuilt modules Prebuilt-module directory now contains a SystemVersion.plist file copied from the SDK it's built from. This patch teaches the compiler to remark this version and the SDK version when -Rmodule-interface-rebuild is specified. The difference between these versions could help us debug unusable prebuilt modules.

view details

Xiaodi Wu

commit sha 514dce144ff44b9ea18abea1477873d66eacac1b

Update copyright year on benchmark and its template

view details

John McCall

commit sha b8f4e6aec3ee3e22dccb73d62c12abe706e4739c

Merge pull request #33773 from 3405691582/LoosenIRGenUnusedTest [test][IRGen] Loosen check in test unused.sil.

view details

John McCall

commit sha ddb43e36ed7dd67f38f46efa5629a662043f57db

Merge pull request #33306 from 3405691582/FixAssertingLocalExtern [IRGen] Use the lexical decl context for VarDecls.

view details

Slava Pestov

commit sha 0310a701d91ed34d8b3a50a915b16e9eb4117fb8

AST: Remove EnableASTScope flag and force it to always be on

view details

Slava Pestov

commit sha 4a6280074d1f82ac211d24e18c76d90000432d55

Sema: Remove old pre-ASTScope logic from TypeCheckStmt.cpp

view details

Doug Gregor

commit sha 6489e1aaacf85ff0fafc53b2b30d03519f5875e9

[Concurrency] Fix nested await/try parsing and effects checking. Fix the parsing of await/try/try?/try! so that the two can be nested (e.g., `await try f()` or `try await f()`). Then, fix the effects checking logic to preserve all throws-related information under an `await`, and preserve all async/await-related information under `try`/`try?`/`try!`. Add a number of tests, and fix 'await' handling for string interpolations as well.

view details

Saleem Abdulrasool

commit sha 2b67a9de7dee63624417f70f3a934dce2d8e305b

Merge pull request #33774 from compnerd/timeout utils: add a timeout to the integration tests

view details

Xi Ge

commit sha 903a06fda59b2dbacaf61cfbf382ac102b613fbe

Merge pull request #33802 from nkcsgexi/remark-sdk-build-versions ModuleInterface: remark potential version differences between SDK and prebuilt modules

view details

Slava Pestov

commit sha 193cf0de87947d99a0625b9032552b0303adaba2

Code review feedback from @davidungar

view details

Mishal Shah

commit sha 6fbbc498e5e019f425ef8cb3af66e9e6f6e0867f

Delete build-windows-rebranch.bat

view details

Doug Gregor

commit sha 11154b1398c3cc2606d81ba9e7bad542c133a13f

Merge pull request #33807 from DougGregor/concurrency-nested-await-try [Concurrency] Fix nested await/try parsing and effects checking.

view details

Xiaodi Wu

commit sha 3f84fe47e7c758de2449efe0575c67a4b2497c01

Merge pull request #33801 from xwu/generic-conversion-performance [benchmark] Add new benchmark for floating-point conversion

view details

Mishal Shah

commit sha a7e8dbf4696370b16ca7cc9531921fabfd921b32

Merge pull request #33814 from apple/shahmishal/remove-build-windows-rebranch Delete build-windows-rebranch.bat

view details

push time in 2 months

pull request commentapple/llvm-project

Update for apple/swift#33806

https://github.com/apple/swift/pull/33806

@swift-ci please test

hamishknight

comment created time in 2 months

pull request commentapple/swift

Add and use AbstractFunctionDecl::getTypecheckedBody

https://github.com/apple/llvm-project/pull/1753

@swift-ci please test

hamishknight

comment created time in 2 months

PR opened apple/llvm-project

Update for apple/swift#33806
+9 -4

0 comment

1 changed file

pr created time in 2 months

push eventhamishknight/llvm-project

Hamish Knight

commit sha 1d9533bc85b510f88a5aa11e1b6506c17312fd03

[lldb] Update call to AbstractFunctionDecl::setBody

view details

push time in 2 months

push eventhamishknight/swift

Hamish Knight

commit sha 05be9c36d27070f01bd782a8f3d4c2cd5f81c7b3

Introduce SymbolObjectCodeRequest

view details

Hamish Knight

commit sha c136a542445ea37427a5e02e48b364c347fb1fbf

[SILGen] Allow lazy type-checking

view details

Hamish Knight

commit sha 0175f0ed94c014fe4bd7432c62d084056454b351

[SILGen] Add SILDeclRef for @main entry-points

view details

push time in 2 months

more