Commit Graph

2929 Commits

Author SHA1 Message Date
Mishal Shah
2e9b6b8582 Merge pull request #27859 from apple/shahmishal/update-branch-info
[Doc] Update the Branches doc with LLVM Project info
2019-10-27 20:47:32 -07:00
Michael Gottesman
7ee5ad7318 [sil] Rename {,Strong}Copy{Unowned,Unmanaged}. 2019-10-26 17:03:47 -07:00
Saleem Abdulrasool
be47c9734c Merge pull request #27869 from apple/compnerd-monorepo-windows
Update WindowsBuild.md
2019-10-26 13:50:14 -07:00
Jordan Rose
618afde2a6 [docs] CToSwift: Add section on methods
There's a lot here, so I might have missed something, but I think this
document is complete!
2019-10-25 15:38:01 -07:00
Mishal Shah
ce62b92949 [Doc] Update the llvm release branch to new llvm branch 2019-10-25 10:28:39 -07:00
Mishal Shah
58479bd552 [Doc] Update the release branch and format for the table 2019-10-24 22:06:53 -07:00
Jordan Rose
d6117a43b7 [docs] CToSwift: document omit-needless-words (#27749)
...and update the dirty lie that property names aren't transformed.

The only thing left to do is methods!
2019-10-24 18:35:33 -07:00
Michael Gottesman
71090c27ee Merge pull request #27375 from gottesmm/pr-37fe7a0a42201ad83ffbe950c9b552addfb01e4d
[sil.rst] Try to make it clearer that copy_unmanaged_value performs a…
2019-10-24 18:32:29 -07:00
Saleem Abdulrasool
1b31094a36 Update WindowsBuild.md
Update for the monorepo.
2019-10-24 15:38:17 -07:00
Jonas Devlieghere
40e5924f60 Merge pull request #27814 from JDevlieghere/use-static-bindings
[CMake] Fix the static bindings workflow.
2019-10-24 09:20:19 -07:00
Mishal Shah
982afa0784 [Doc] Update the Branch doc with LLVM Project info 2019-10-23 23:28:12 -07:00
Saleem Abdulrasool
7ca58accc8 Update WindowsBuild.md
Remove clone commands for curl and libxml2 as they are prebuilt now.
2019-10-23 21:25:10 -07:00
Jonas Devlieghere
ec21125988 [CMake] Fix the static bindings workflow.
Rename LLDB_ALLOW_STATIC_BINDINGS to LLDB_USE_STATIC_BINDINGS and make
LLDB use the static bindings unconditionally when it's set. The current
variable is opaque because it allows LLDB to use the static bindings,
but only if SWIG is not found. If an incompatible version of swig is
found, it reports a fatal error. This serves no purpose other than to
confuse the user.

The corresponding LLDB patch simplifies things and makes the variable do
what you expect. When enabled, LLDB uses the static bindings. When
disabled, we try to generate them with SWIG.

This patch modifies the build scripts to pass the new variable.
2019-10-21 14:39:25 -07:00
Robert Widmann
6942d36f87 Merge pull request #27764 from CodaFi/interface-type-request
Define InterfaceTypeRequest
2019-10-17 20:07:21 -07:00
Robert Widmann
72da97069e Expunge validateDecl from documentation 2019-10-17 16:11:41 -07:00
Puyan Lotfi
08e64f8679 Update WindowsBuild.md
Adding updated instructions for building on windows.
2019-10-17 15:07:55 -07:00
Saleem Abdulrasool
d5b761c0e1 Update WindowsBuild.md
Remove time references, they do not add to the instructions.
2019-10-12 17:37:32 -07:00
Saleem Abdulrasool
1e0d92749f Update WindowsBuild.md
Update instructions for building LLDB
2019-10-02 11:30:11 -07:00
Jordan Rose
1bb666a362 [docs] CToSwiftName: Add the section on ObjC properties
Fairly simple except in the few cases they aren't.
2019-10-01 20:08:08 -07:00
Jordan Rose
dfe0085aea [docs] CToSwift: Finish swift_name section
Struct/union fields, ObjC properties, ObjC methods
2019-10-01 20:08:06 -07:00
Jordan Rose
3afbe31f54 Merge pull request #27448 from owenv/verifier_docs
[Docs] Add a section to Diagnostics.md on -verify mode
2019-10-01 10:58:35 -07:00
Owen Voorhees
f749e8551f [Docs] Add a section to Diagnostics.md on -verify mode 2019-09-30 17:14:32 -07:00
Jordan Rose
40fdae4a8a [docs] CToSwift: remove the import-as-member-subscript discussion
This fits in the model but was never implemented, so take it back out.
2019-09-27 20:14:07 -07:00
Jordan Rose
a6dd630ca3 Eliminate Builtin.UnknownObject as an AST type (#27378)
This removes it from the AST and largely replaces it with AnyObject
at the SIL and IRGen layers. Some notes:

- Reflection still uses the notion of "unknown object" to mean an
  object with unknown refcounting. There's no real reason to make
  this different from AnyObject (an existential containing a
  single object with unknown refcounting), but this way nothing
  changes for clients of Reflection, and it's consistent with how
  native objects are represented.

- The value witness table and reflection descriptor for AnyObject
  use the mangling "BO" instead of "yXl".

- The demangler and remangler continue to support "BO" because it's
  still in use as a type encoding, even if it's not an AST-level
  Type anymore.

- Type-based alias analysis for Builtin.UnknownObject was incorrect,
  so it's a good thing we weren't using it.

- Same with enum layout. (This one assumed UnknownObject never
  referred to an Objective-C tagged pointer. That certainly wasn't how
  we were using it!)
2019-09-26 17:48:04 -07:00
Michael Gottesman
a84497b834 [sil.rst] Try to make it clearer that copy_unmanaged_value performs a "strong copy" of the underlying value. 2019-09-25 18:59:07 -07:00
Doug Gregor
ab5d161c05 [SILGen] Separate the initialization of a wrapped property from a wrapped value
Teach SILGen to emit a separate SIL function to capture the
initialization of the backing storage type for a wrapped property
based on the wrapped value. This eliminates manual code expansion at
every use site.
2019-09-24 09:11:53 -07:00
Jordan Rose
4ade7ae11f [docs] CToSwift: swift_name for all top-level declarations (#27227)
That is: types, globals, C functions, and enumerators, including a
discussion of import-as-member for each. Still more to come:
swift_name for properties, methods, and struct fields.
2019-09-19 16:31:41 -07:00
Varun Gandhi
2255e81ad0 [NFC] Replacing potentially confusing phrase "memory allocation promotion" 2019-09-18 10:30:36 -07:00
Andrew Trick
7b1b0a0077 Add comments to destroy_addr in SIL.rst.
`destroy_addr` is never semantically a "no-op". Just because an
instruction can be safely eliminated does not mean the instruction has
no semantics! That would be like saying we could move an unknown
memory read below an otherwise dead store!
2019-09-12 16:21:39 -07:00
Jordan Rose
ec862c5b4d Merge pull request #27118 from jrose-apple/translation-reflection-but-what-about-rotation
[docs] CToSwift: CF types, protocols, and swift_private
2019-09-12 09:58:07 -07:00
Jordan Rose
2d63ae4133 [docs] CToSwift: Describe swift_private (prepend '__') 2019-09-11 19:45:10 -07:00
Jordan Rose
afecd41904 [docs] CToSwift: Objective-C Protocols ("Protocol" appended) 2019-09-11 09:16:00 -07:00
Jordan Rose
9cc26ef7a2 [docs] CToSwift: CF types (how they're recognized + dropping "Ref") 2019-09-11 09:16:00 -07:00
Jordan Rose
7aeeb0d508 [docs] CToSwift: Move word-splitting into its own section
It's used all over the place in name importing, not just for enums.
2019-09-11 09:16:00 -07:00
Erik Eckstein
3d0b12e7bc MemoryLifetime: fix a problem where DestroyHoisting moved a destroy_addr before a use of a trivial type.
Even if a destroy_addr of a trivial type is a no-op, we must not end up with using such a value after a destroy_addr.
The fix is to also handle aggregate fields of trivial types in MemoryLifetime.

rdar://problem/55125020
2019-09-11 13:49:23 +02:00
Joe Groff
6817c53031 Mangle associated types of opaque types like dependent member types.
The archetype mangling does not have enough information to accurately recover the associated type
at runtime. This fixes rdar://problem/54084733.

Although this changes the mangling in both runtime and symbols, this should not affect ABI, because
there is no way for associated types of opaque types to be surfaced in the types of public
declarations today.
2019-09-04 10:20:10 -07:00
Jordan Rose
682c45ca60 [docs] Start a doc on ClangImporter C->Swift name mapping (#26947)
Includes enums in all their flavors, plus swift_wrapper structs.
Planned future content:

- Methods, initializers, properties
  - "Omit-needless-words" rules
  - NSError
  - Boolean properties
  - Inferred default arguments
  - Factory methods as initializers
- Protocols (mainly just that they check for collision)
- CF types (low-priority since non-Apple people can't make them)
- Custom names, including import-as-member and import-as-accessor
- swift_private
2019-09-03 15:16:29 -07:00
Jordan Rose
7e9e4b5e5b Merge pull request #26836 from owenv/select_modifier_str_support
[Diagnostics][NFC] Add support for using the %select format specifier…
2019-08-26 16:58:54 -07:00
Owen Voorhees
486c7b883d [Diagnostics][NFC] Add support for using the %select format specifier with StringRef args
Get rid of some redundant availability diagnostics as a result.
2019-08-26 11:37:29 -07:00
Michael Gottesman
d05dc8ac31 [SIL.rst] Add docs for copy_unowned_value and copy_unmanaged_value.
This commit adds docs for copy_unmanaged_value to SIL.rst as requested by
@eeckstein in #26839. I noticed while doing the PR that copy_unowned_value was
also not documented, so I added docs for it as well as a bonus. = ).
2019-08-26 09:28:16 -07:00
Alex Langford
61be4d969f [CMake][NFC] Introduce component targets for proper dependency tracking
This commit introduces a CMake target for each component, adds install targets
for them, and switches build-script-impl to use the target `install-components`
for installation. Each of the targets for each component depends on each
of the individual targets and outputs that are associated with the
corresponding swift-component.

This is equivalent to what already exists, because right now install rules are
only generated for components that we want to install. Therefore, this commit
should be an NFC.

This is a resubmission (with modifications) of an earlier change. I originally
committed this but there were problems with some installation rules.
2019-08-22 10:16:50 -07:00
Joe Groff
ca4c2211b9 Merge pull request #26523 from rxwei/clarify-partial-apply-inout-aliasable
[Docs] Clarify partial_apply's ownership of @inout_aliasable arguments.
2019-08-10 11:42:15 -07:00
Harlan Haskins
7f07db5466 Merge pull request #26481 from owenv/print_diag_names
Add -debug-diagnostic-names frontend flag
2019-08-09 15:44:26 -07:00
Erik Eckstein
282907fc0a Fix property wrappers with tuples.
In case of a tuple as value type, the initializer and setter takes the tuple elements as separate arguments. This was just not handled in the assign_by_wrapper instruction lowering.

rdar://problem/53866473
2019-08-08 21:46:08 +02:00
Saleem Abdulrasool
f6f1bf5d01 Merge pull request #26477 from apple/rxwei-patch-6
[Docs] Fix typo in SIL.rst.
2019-08-06 18:31:30 -07:00
Richard Wei
ffa9c40047 [Docs] Clarify partial_apply's ownership of @inout_aliasable arguments.
`partial_apply` does not own `@inout_aliasable` arguments, so the original description "the closure does however take ownership of the partially applied arguments" is not accurate. This patch makes things clear.
2019-08-06 15:50:00 -07:00
lbodner
fa6ae17cd7 Add missing '-parse-as-library' flag 2019-08-06 09:49:23 +02:00
Owen Voorhees
e7a1a1cc3d Add -debug-diagnostic-names frontend flag
This flag adds diagnostic names to the end of their messages, e.g. 'error: cannot convert value of type '[Any]' to specified type '[Int]' [cannot_convert_initializer_value]'. It's intended to be used for debugging purposes when working on the compiler.
2019-08-05 18:54:21 -07:00
Richard Wei
642cc3c074 [Docs] Fix typo in SIL.rst.
"an `@noescape`" -> "a `@noescape`"
2019-08-03 11:38:57 +02:00
Richard Wei
6ddfd1506f [Docs] Conditional conformances are implemented. (#26359)
Update Generics Manifesto to mark conditional conformances implemented.
2019-08-03 11:17:27 +02:00