Commit Graph

24025 Commits

Author SHA1 Message Date
swift-ci 678ce48b26 Merge pull request #15222 from gottesmm/pr-5c8f0a2fd2ed60b2b53e8a88e01104d3c5940b21 2018-03-13 20:19:14 -07:00
Michael Gottesman b00966e247 [+0-all-args] Add more module_names to tests to enable running their plus_zero variants.
rdar://34222540
2018-03-13 19:47:50 -07:00
Michael Ilseman c3d9a22548 [test] Split CString API tests into other file; NFC 2018-03-13 15:32:20 -07:00
Huon Wilson 0e337acae0 Revert "[AST] Ensure requirements are correctly identified as conditional." 2018-03-14 08:12:37 +11:00
Karoy Lorentey b0108336f7 Merge pull request #15207 from lorentey/seedless-hashes
[runtime] Add better control over the random hashing seed
2018-03-13 19:46:51 +00:00
Pavel Yaskevich 274c1097bb Merge pull request #15187 from xedin/rdar-37790062-followup
[SILGen] NFC: Add test-cases for rdar://problem/37790062
2018-03-13 12:15:14 -07:00
Nathan Hawes 9746a284cd Merge pull request #15135 from nathawes/rdar38314383-ignore-llvm-args-for-sourcekit-ast-manager-invocation
Clear any LLVMArgs when initializing the CompilerInvocation for SourceKit's ASTManager
2018-03-13 12:07:12 -07:00
Karoy Lorentey 3e90284883 [test] Disable hash randomization using environment variables
The hash seed is not settable at runtime anymore; update lit config to set the SWIFT_DETERMINISTIC_HASHING environment variable instead.
2018-03-13 16:15:09 +00:00
Jordan Rose 144d78c2da [test] Make sure directory exists before putting a module cache in it (#15197)
This test uses %swiftc_driver_plain instead of %swiftc_driver or
%target-build-swift because it's testing what the driver does when
invoked with no -swift-version argument, but that means we have to
manually set up things like a module cache path. This will then fail
if it's the first Driver test run in a clean build directory (because
of where lit.py decides to put temporary files).

rdar://problem/38354843
2018-03-13 08:44:19 -07:00
Huon Wilson a5268f8d19 Merge pull request #15189 from huonw/one-unnamed-owned-argument
[AST] ParenType needs enough bits to store ValueOwnership::Owned.
2018-03-13 13:56:22 +11:00
Graydon Hoare 23d65887c5 Merge pull request #15191 from graydon/nonportable-batch-seed-test-shuffle-specific
[BatchMode] Fix non-portable test that relies on std::shuffle implementation.
2018-03-12 18:06:04 -07:00
Ben Cohen f9b3e14137 [stdlib] Use Swift-native Character iteration for hasPrefix/Suffix (#14390)
* Use Swift-native Character iteration for hasPrefix/Suffix

* Remove old tests for removed C shims
2018-03-12 17:41:55 -07:00
Slava Pestov a5db08643f Merge pull request #15195 from slavapestov/test-19978257
Add test that we correctly serialize SIL functions whose bodies are emitted by Clang
2018-03-12 17:36:04 -07:00
Slava Pestov ed40787e31 Add test that we correctly serialize SIL functions whose bodies are emitted by Clang
This closes out <rdar://problem/19978257>, which was implemented
a while ago in c2b8bb22ba, but that
commit did not add any tests.
2018-03-12 16:38:11 -07:00
Davide Italiano 04ea4cca6e Merge pull request #15126 from dcci/typereconstr-fixup-private
[IDE] Fix type reconstructions for PrivateDeclName.
2018-03-12 16:34:20 -07:00
Huon Wilson e7002b6413 [AST] ParenType needs enough bits to store ValueOwnership::Owned.
The truncation here meant func foo(_: __owned X) {} was the same as
foo(_: X), so @guaranteed when that's the default.

Fixes rdar://problem/38390524.
2018-03-13 10:18:40 +11:00
Xi Ge ee36dbeda3 [WIP] SwiftSyntax: Implement APIs for Syntax nodes to calculate absolute positions. (#15097)
Syntax nodes are designed as reusable blocks to construct Swift source
code. For this reason, we don't track absolute position in each node;
instead, the absolute position should be calculated on the fly when
needed. We recently found absolute positions are useful to bridge with
sourcekitd, which typically speaks in the language of line, column and
offset. Therefore, this patch tries to add a computed
property on SyntaxNode to get its absolute position.

To compute the absolute position of a SyntaxNode from scratch requires tree traversal.
However, getting the absolute position from these added APIs doesn't necessarily
mean we'll traverse since SyntaxData will actively cache the computed position.
Also, since we recursively compute the absolute position, all the position caches
for a SyntaxNode's previous siblings and ancestors will be populated as well during
the calculation of this SyntaxNode.
2018-03-12 15:42:46 -07:00
Vedant Kumar f9372fdb62 [DebugInfo] Improve stepping behavior for switch case stmts
Assign the location of a switch statement's subject expression to all of
its case statements.

This improves the debugger's stepping behavior in switch statements.
Stepping into a switch now goes directly to the first matching case
(possibly one with a `where` clause that may or may not match). It's
still possible to set breakpoints within `where` clauses.

rdar://35628672
2018-03-12 15:21:46 -07:00
swift-ci a0d9c2371a Merge pull request #15184 from adrian-prantl/38324861 2018-03-12 14:53:15 -07:00
Graydon Hoare 0cfb0b9c84 [BatchMode] Fix non-portable test that relies on std::shuffle implementation. 2018-03-12 14:53:07 -07:00
Harlan aa1059c9a3 [Syntax] Parse WhileStmtSyntax nodes (#15186) 2018-03-12 17:50:07 -04:00
Pavel Yaskevich b95635ca13 [SILGen] NFC: Add test-cases for rdar://problem/37790062
Port multiple test-cases from `test/Constraints/closures.swift`
to SILGen to verify that closures are inferred as having `Void`
result type, and there is no function conversion thunk emitted
to convert from `() -> T` to `() -> Void` for literal closures.
2018-03-12 14:20:00 -07:00
Davide Italiano 74618cbe96 [IDE] Fix type reconstructions for PrivateDeclName.
Without this fix, the type reconstruction logic chokes on
demangled subtree of the kind:

kind=DeclContext
  kind=Function
    kind=Module, text="swift_ide_test"
    kind=PrivateDeclName
      kind=Identifier, text="_0830B395847924C73A6666B87EFD2ADF"
      kind=Identifier, text="patatino"

Fixes the compiler part of <rdar://problem/38248403>
2018-03-12 13:45:15 -07:00
Adrian Prantl 6663462c53 Debug Info: Fix the emission of vector types.
Thanks to an improved IR verifier upstream we found that support for
vector types has been incomplete.

<rdar://problem/38324861>
2018-03-12 12:25:22 -07:00
Pavel Yaskevich 94dbbd7974 Merge pull request #15134 from xedin/rdar-37790062-v3
[CSBindings] Try `Void` as a binding for `closure result` type variable
2018-03-12 11:40:10 -07:00
Jordan Rose c5dcf01aca Merge pull request #14814 from jrose-apple/dump-truck
Dump (some) filelists in the PrettyStackTrace
2018-03-12 09:13:20 -07:00
Joe Groff 3fd2d2165e Merge pull request #15145 from jckarter/trimming-metadata
Trimming metadata
2018-03-12 06:55:59 -07:00
swift-ci 7d16d131e7 Merge pull request #15091 from graydon/batch-mode-formation-minor-fixes 2018-03-12 04:40:02 -07:00
Michael Gottesman e071fd502e [+0-all-args] Update plus zero tests.
rdar://34222540
2018-03-12 01:29:03 -07:00
Michael Gottesman d8f1736724 Merge pull request #15171 from gottesmm/pr-b0d81bf9ad3ca823d4fa9409fcf17fae87aa1595
[+0-all-args] Update plus zero tests.
2018-03-12 01:01:14 -07:00
Andrew Trick 9703d56e03 [exclusivity] Remove dead access markers after optimization.
Generalized to handle scope markers which will become common with future
ownership and lifetime dependence markers.
2018-03-11 23:13:30 -07:00
Michael Gottesman 16484c9be5 [+0-all-args] Update plus zero tests.
rdar://34222540
2018-03-11 22:34:47 -07:00
swift-ci fbab421b6a Merge pull request #15165 from gottesmm/pr-f2900d946f9ba56e68c3c5431d6341f688321e30 2018-03-11 22:25:49 -07:00
Michael Gottesman 6f4e87ad3f [+0-all-args] Be explicit about the module-name for tests that have plus_zero_* counterparts.
Otherwise, the plus_zero_* tests will have plus_zero_* as a module name, causing
massive FileCheck problems.

The reason why I am doing it with the main tests is so that I can use it when
syncing branches/etc.

radar://34222540
2018-03-11 21:55:24 -07:00
swift-ci a77bdf20cb Merge pull request #15166 from gottesmm/pr-d1d477be06593663a34c0100aebdb000babe3a04 2018-03-11 17:29:08 -07:00
Michael Gottesman 8dd5ea9b60 [+0-all-args] Add a space after REQUIRES: plus_one_runtime to eliminate avoidable merge conflicts when editing other parts of the file.
This helps my tooling for enabling +0.
2018-03-11 16:19:09 -07:00
Huon Wilson be28f6830c Merge pull request #15094 from huonw/conditional-requirement-order
[AST] Ensure requirements are correctly identified as conditional.
2018-03-12 09:53:02 +11:00
Robert Widmann bcc82d200a Merge pull request #15153 from ikesyo/public-static
[gardening] Change `static public` to `public static` for consistency
2018-03-11 17:59:09 -04:00
Andrew Trick defc710f8b [exclusivity] Teach LetPropertiesOpt how to handle begin_access. 2018-03-11 14:20:39 -07:00
swift-ci d8840d8888 Merge pull request #15163 from eeckstein/disable-oslogtest 2018-03-11 13:06:58 -07:00
Erik Eckstein 677fcad92a tests: temporarily disable stdlib/os.swift osAPI.logData test 2018-03-11 12:36:42 -07:00
Michael Gottesman 1f1c2a6b87 [+0-all-args] Update plus zero tests.
rdar://34222540
2018-03-11 12:08:36 -07:00
Joe Groff 53792aa64e IRGen: Make outlined enum copy/destroy lazier and better mangled.
Emit enum copy/destroy methods only when codegen demands them; they previously got emitted immediately when TypeInfo is instantiated, which led to many functions getting emitted that were never used. Also, make it so that the symbol name includes the full type of the enum instance the outlined functions operate on, so it's more obvious what they'e being used for and they can be ODRed across translation units.
2018-03-11 11:04:41 -07:00
Joe Groff 37e3534b42 Runtime: Make generic parameter counts in context descriptors 16-bit.
64K generic parameters ought to be enough for anyone, right?
2018-03-11 11:04:41 -07:00
Joe Groff f01af883fc IRGen: Use known value witness tables for common type layouts.
If a type has the same layout as one of the basic integer types, or has a single refcounted pointer representation, we can use prefab value witness tables from the runtime instead of instantiating new ones. This saves quite a bit of code size, particularly in the Apple SDK overlays, where there are lots of swift_newtype wrappers and option set structs.
2018-03-11 11:04:37 -07:00
Sho Ikeda a08fef219e [gardening] Change static public to public static for consistency 2018-03-11 18:06:01 +09:00
Pavel Yaskevich 18d2c1d8b4 [CSBindings] Try Void as a binding for closure result type variable
If we could find a binding for type variable representing closure result
let's also add implicit `Void` type as another pontential binding to attempt
because there is an implicit conversion from `() -> T` to `() -> Void`
so finding `Void` early is going to help avoid function conversions down
the line.

Resolves: rdar://problem/37790062
2018-03-10 23:59:11 -08:00
Sho Ikeda b68be20e9d [test][gardening] Prefer os(macOS) over os(OSX) 2018-03-11 10:58:58 +09:00
David Zarzycki 9bff13e670 Merge pull request #15147 from davezarzycki/nfc_unbreak_unified_builds
[Testing] Correctly handle unset SWIFT_ENABLE_GUARANTEED_NORMAL_ARGUMENTS
2018-03-10 17:57:44 -05:00
Slava Pestov 760a9a76ff Merge pull request #15140 from slavapestov/materialize-for-set-fixes
Fixes for exotic materializeForSet
2018-03-10 14:53:31 -08:00