Skip to content

Commit 6e2f0eb

Browse files
author
Nathan Hawes
committed
---
yaml --- r: 210431 b: refs/heads/swift-5.0-branch c: 8fab22f h: refs/heads/master i: 210429: 6ea7da0 210427: f6a71bd 210423: b5f27ce 210415: 79320d1 210399: 1b18a58 210367: 4eaf695 210303: ef1c082 210175: 49eb11d 209919: dbea221
1 parent c9b8234 commit 6e2f0eb

File tree

131 files changed

+1170
-2483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+1170
-2483
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2017-12-23-a: b7c074342459a645779f106c42bf4
644644
refs/heads/master-llvm-swift5-transition: 8ace18c8953afb3d7d94cf04cacc0b51a7e5f1e3
645645
"refs/heads/revert-12883-disable_modelio_test_ios": a77ae373b809a0d8cb460cf3d1585d618510d242
646646
refs/heads/revert-13597-master: cccee1df039d072215f9bddc2cbc1e32a8d5d5ee
647-
refs/heads/swift-5.0-branch: 1b90ef7b6b59c8c1cf7405b324545a4c82c958e8
647+
refs/heads/swift-5.0-branch: 8fab22f124de71583e39cc7fa5cc6219bb66cf82
648648
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2017-12-23-a: b32214f7e04339dfada623b6b76dbebfb41e4541
649649
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2017-12-24-a: 1eb0be506c0744c7eff0550a10240286046e181d
650650
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2017-12-25-a: f35a91502bad0065c83d8760407c23be7b899f48

branches/swift-5.0-branch/cmake/modules/AddSwift.cmake

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,10 @@ function(_add_variant_c_compile_link_flags)
123123
list(APPEND result "-target" "${SWIFT_SDK_${CFLAGS_SDK}_ARCH_${CFLAGS_ARCH}_TRIPLE}${DEPLOYMENT_VERSION}")
124124
endif()
125125

126-
set(_sysroot "${SWIFT_SDK_${CFLAGS_SDK}_ARCH_${CFLAGS_ARCH}_PATH}")
127126
if(IS_DARWIN)
128-
list(APPEND result "-isysroot" "${_sysroot}")
129-
elseif(NOT SWIFT_COMPILER_IS_MSVC_LIKE AND NOT "${_sysroot}" STREQUAL "/")
130-
list(APPEND result "--sysroot=${_sysroot}")
127+
list(APPEND result "-isysroot" "${SWIFT_SDK_${CFLAGS_SDK}_PATH}")
128+
elseif(NOT SWIFT_COMPILER_IS_MSVC_LIKE AND NOT "${SWIFT_SDK_${CFLAGS_SDK}_PATH}" STREQUAL "/")
129+
list(APPEND result "--sysroot=${SWIFT_SDK_${CFLAGS_SDK}_PATH}")
131130
endif()
132131

133132
if("${CFLAGS_SDK}" STREQUAL "ANDROID")
@@ -295,9 +294,9 @@ function(_add_variant_swift_compile_flags
295294
sdk arch build_type enable_assertions result_var_name)
296295
set(result ${${result_var_name}})
297296

298-
# On Windows, we don't set SWIFT_SDK_WINDOWS_PATH_ARCH_{ARCH}_PATH, so don't include it.
297+
# On Windows, we don't set SWIFT_SDK_WINDOWS_PATH, so don't include it.
299298
if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
300-
list(APPEND result "-sdk" "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}")
299+
list(APPEND result "-sdk" "${SWIFT_SDK_${sdk}_PATH}")
301300
endif()
302301

303302
is_darwin_based_sdk("${sdk}" IS_DARWIN)
@@ -315,7 +314,7 @@ function(_add_variant_swift_compile_flags
315314

316315
if(IS_DARWIN)
317316
list(APPEND result
318-
"-F" "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}/../../../Developer/Library/Frameworks")
317+
"-F" "${SWIFT_SDK_${sdk}_PATH}/../../../Developer/Library/Frameworks")
319318
endif()
320319

321320
is_build_type_optimized("${build_type}" optimized)
@@ -1620,7 +1619,7 @@ function(add_swift_library name)
16201619
# Add PrivateFrameworks, rdar://28466433
16211620
set(swiftlib_link_flags_all ${SWIFTLIB_LINK_FLAGS})
16221621
if(SWIFTLIB_IS_SDK_OVERLAY)
1623-
list(APPEND swiftlib_swift_compile_flags_all "-Fsystem" "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}/System/Library/PrivateFrameworks/")
1622+
list(APPEND swiftlib_swift_compile_flags_all "-Fsystem" "${SWIFT_SDK_${sdk}_PATH}/System/Library/PrivateFrameworks/")
16241623
endif()
16251624

16261625
if("${sdk}" STREQUAL "IOS_SIMULATOR")

branches/swift-5.0-branch/cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function(_report_sdk prefix)
2222
message(STATUS " ${arch} LIB: ${${arch}_LIB}")
2323
endforeach()
2424
else()
25+
message(STATUS " Path: ${SWIFT_SDK_${prefix}_PATH}")
2526
foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
2627
message(STATUS " ${arch} Path: ${SWIFT_SDK_${prefix}_ARCH_${arch}_PATH}")
2728
endforeach()
@@ -144,6 +145,7 @@ macro(configure_sdk_unix
144145

145146
# Todo: this only supports building an SDK for one target arch only.
146147
set(SWIFT_SDK_${prefix}_NAME "${name}")
148+
set(SWIFT_SDK_${prefix}_PATH "${sdkpath}")
147149
set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "${sdkpath}")
148150
set(SWIFT_SDK_${prefix}_VERSION "don't use")
149151
set(SWIFT_SDK_${prefix}_BUILD_NUMBER "don't use")
@@ -171,6 +173,10 @@ macro(configure_sdk_windows prefix sdk_name environment architectures)
171173
# variables.
172174

173175
set(SWIFT_SDK_${prefix}_NAME "${sdk_name}")
176+
# NOTE: set the path to / to avoid a spurious `--sysroot` from being passed
177+
# to the driver -- rely on the `INCLUDE` AND `LIB` environment variables
178+
# instead.
179+
set(SWIFT_SDK_${prefix}_PATH "/")
174180
set(SWIFT_SDK_${prefix}_VERSION "NOTFOUND")
175181
set(SWIFT_SDK_${prefix}_BUILD_NUMBER "NOTFOUND")
176182
set(SWIFT_SDK_${prefix}_DEPLOYMENT_VERSION "")
@@ -188,9 +194,6 @@ macro(configure_sdk_windows prefix sdk_name environment architectures)
188194
set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE
189195
"${arch}-unknown-windows-${environment}")
190196
endif()
191-
# NOTE: set the path to / to avoid a spurious `--sysroot` from being passed
192-
# to the driver -- rely on the `INCLUDE` AND `LIB` environment variables
193-
# instead.
194197
set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "/")
195198
endforeach()
196199

branches/swift-5.0-branch/docs/ABI/Mangling.rst

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,9 @@ Globals
6363
global ::= context 'MXX' // anonymous context descriptor
6464
global ::= context identifier 'MXY' // anonymous context descriptor
6565
global ::= type assoc_type_path 'MXA' // generic parameter ref
66-
global ::= protocol 'Mp' // protocol descriptor
67-
global ::= protocol 'WR' // protocol requirement table
68-
6966
global ::= nominal-type 'Mo' // class metadata immediate member base offset
70-
67+
global ::= protocol 'Mp' // protocol descriptor
68+
global ::= protocol-conformance 'Mc' // protocol conformance descriptor
7169
global ::= type 'MF' // metadata for remote mirrors: field descriptor
7270
global ::= type 'MB' // metadata for remote mirrors: builtin type descriptor
7371
global ::= protocol-conformance 'MA' // metadata for remote mirrors: associated type descriptor
@@ -78,27 +76,35 @@ Globals
7876
global ::= mangled-name 'Ta' // ObjC partial application forwarder
7977

8078
global ::= type 'w' VALUE-WITNESS-KIND // value witness
81-
82-
global ::= protocol-conformance 'Mc' // protocol conformance descriptor
83-
global ::= protocol-conformance 'WP' // protocol witness table
8479
global ::= protocol-conformance 'Wa' // protocol witness table accessor
85-
8680
global ::= protocol-conformance 'WG' // generic protocol witness table
87-
global ::= protocol-conformance 'Wp' // protocol witness table pattern
88-
global ::= protocol-conformance 'Wr' // resilient witness table
8981
global ::= protocol-conformance 'WI' // generic protocol witness table instantiation function
9082
global ::= type protocol-conformance 'WL' // lazy protocol witness table cache variable
83+
global ::= entity 'Wo' // witness table offset
84+
global ::= protocol-conformance 'WP' // protocol witness table
9185

9286
global ::= protocol-conformance identifier 'Wt' // associated type metadata accessor
9387
global ::= protocol-conformance assoc_type_path nominal-type 'WT' // associated type witness table accessor
9488
global ::= type protocol-conformance 'Wl' // lazy protocol witness table accessor
95-
9689
global ::= type 'WV' // value witness table
97-
global ::= entity 'Wvd' // field offset
98-
global ::= entity 'WC' // resilient enum tag index
90+
global ::= entity 'Wv' DIRECTNESS // field offset
91+
global ::= entity 'WC' // resilient enum tag index
92+
93+
global ::= type 'Wy' // Outlined Copy Function Type
94+
global ::= type 'We' // Outlined Consume Function Type
95+
global ::= type 'Wr' // Outlined Retain Function Type
96+
global ::= type 'Ws' // Outlined Release Function Type
97+
global ::= type 'Wb' INDEX // Outlined InitializeWithTake Function Type
98+
global ::= type 'Wc' INDEX // Outlined InitializeWithCopy Function Type
99+
global ::= type 'Wd' INDEX // Outlined AssignWithTake Function Type
100+
global ::= type 'Wf' INDEX // Outlined AssignWithCopy Function Type
101+
global ::= type 'Wh' INDEX // Outlined Destroy Function Type
99102

100103
assoc_type_path ::= identifier '_' identifier*
101104

105+
DIRECTNESS ::= 'd' // direct
106+
DIRECTNESS ::= 'i' // indirect
107+
102108
A direct symbol resolves directly to the address of an object. An
103109
indirect symbol resolves to the address of a pointer to the object.
104110
They are distinct manglings to make a certain class of bugs
@@ -169,18 +175,6 @@ The types in a reabstraction thunk helper function are always non-polymorphic
169175
``<VALUE-WITNESS-KIND>`` differentiates the kinds of value
170176
witness functions for a type.
171177

172-
::
173-
174-
global ::= generic-signature? type 'WOy' // Outlined copy
175-
global ::= generic-signature? type 'WOe' // Outlined consume
176-
global ::= generic-signature? type 'WOr' // Outlined retain
177-
global ::= generic-signature? type 'WOs' // Outlined release
178-
global ::= generic-signature? type 'WOb' // Outlined initializeWithTake
179-
global ::= generic-signature? type 'WOc' // Outlined initializeWithCopy
180-
global ::= generic-signature? type 'WOd' // Outlined assignWithTake
181-
global ::= generic-signature? type 'WOf' // Outlined assignWithCopy
182-
global ::= generic-signature? type 'WOh' // Outlined destroy
183-
184178
Entities
185179
~~~~~~~~
186180

branches/swift-5.0-branch/docs/DebuggingTheCompiler.rst

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -377,46 +377,6 @@ Then by running ``lldb test -s test.lldb``, lldb will:
377377
Using LLDB scripts can enable one to use complex debugger workflows without
378378
needing to retype the various commands perfectly every time.
379379

380-
Custom LLDB Commands
381-
~~~~~~~~~~~~~~~~~~~~
382-
383-
If you've ever found yourself repeatedly entering a complex sequence of
384-
commands within a debug session, consider using custom lldb commands. Custom
385-
commands are a handy way to automate debugging tasks.
386-
387-
For example, say we need a command that prints the contents of the register
388-
``rax`` and then steps to the next instruction. Here's how to define that
389-
command within a debug session::
390-
391-
(lldb) script
392-
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
393-
>>> def custom_step():
394-
... print "rax =", lldb.frame.FindRegister("rax")
395-
... lldb.thread.StepInstruction(True)
396-
...
397-
>>> ^D
398-
399-
You can call this function using the ``script`` command, or via an alias::
400-
401-
(lldb) script custom_step()
402-
rax = ...
403-
<debugger steps to the next instruction>
404-
405-
(lldb) command alias cs script custom_step()
406-
(lldb) cs
407-
rax = ...
408-
<debugger steps to the next instruction>
409-
410-
Printing registers and single-stepping are by no means the only things you can
411-
do with custom commands. The LLDB Python API surfaces a lot of useful
412-
functionality, such as arbitrary expression evaluation.
413-
414-
There are some pre-defined custom commands which can be especially useful while
415-
debugging the swift compiler. These commands live in
416-
``swift/utils/lldb/lldbToolBox.py``. There is a wrapper script available in
417-
``SWIFT_BINARY_DIR/bin/lldb-with-tools`` which launches lldb with those
418-
commands loaded.
419-
420380
Reducing SIL test cases using bug_reducer
421381
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
422382

branches/swift-5.0-branch/include/swift/ABI/MetadataValues.h

Lines changed: 19 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,74 +1385,28 @@ class GenericMetadataPatternFlags : public FlagSet<uint32_t> {
13851385

13861386
/// The public state of a metadata.
13871387
enum class MetadataState : size_t {
1388-
// The values of this enum are set up to give us some future flexibility
1389-
// in adding states. The compiler emits unsigned comparisons against
1390-
// these values, so adding states that aren't totally ordered with at
1391-
// least the existing values will pose a problem; but we also use a
1392-
// gradually-shrinking bitset in case it's useful to track states as
1393-
// separate capabilities. Specific values have been chosen so that a
1394-
// MetadataRequest of 0 represents a blocking complete request, which
1395-
// is the most likely request from ordinary code. The total size of a
1396-
// state is kept to 8 bits so that a full request, even with additional
1397-
// flags, can be materialized as a single immediate on common ISAs, and
1398-
// so that the state can be extracted with a byte truncation.
1399-
// The spacing between states reflects guesswork about where new
1400-
// states/capabilities are most likely to be added.
1401-
1402-
/// The metadata is fully complete. By definition, this is the
1403-
/// end-state of all metadata. Generally, metadata is expected to be
1404-
/// complete before it can be passed to arbitrary code, e.g. as
1405-
/// a generic argument to a function or as a metatype value.
1388+
/// A request for fully-completed metadata. The metadata must be
1389+
/// prepared for all supported type operations. This is a superset
1390+
/// of the requirements of LayoutComplete.
14061391
///
1407-
/// In addition to the requirements of NonTransitiveComplete, certain
1408-
/// transitive completeness guarantees must hold. Most importantly,
1409-
/// complete nominal type metadata transitively guarantee the completion
1410-
/// of their stored generic type arguments and superclass metadata.
1411-
Complete = 0x00,
1412-
1413-
/// The metadata is fully complete except for any transitive completeness
1414-
/// guarantees.
1415-
///
1416-
/// In addition to the requirements of LayoutComplete, metadata in this
1417-
/// state must be prepared for all basic type operations. This includes:
1418-
///
1419-
/// - any sort of internal layout necessary to allocate and work
1420-
/// with concrete values of the type, such as the instance layout
1421-
/// of a class;
1422-
///
1423-
/// - any sort of external dynamic registration that might be required
1424-
/// for the type, such as the realization of a class by the Objective-C
1425-
/// runtime; and
1426-
///
1427-
/// - the initialization of any other information kept in the metadata
1428-
/// object, such as a class's v-table.
1429-
NonTransitiveComplete = 0x01,
1430-
1431-
/// The metadata is ready for the layout of other types that store values
1432-
/// of this type.
1433-
///
1434-
/// In addition to the requirements of Abstract, metadata in this state
1435-
/// must have a valid value witness table, meaning that its size,
1436-
/// alignment, and basic type properties (such as POD-ness) have been
1437-
/// computed.
1438-
LayoutComplete = 0x3F,
1439-
1440-
/// The metadata has its basic identity established. It is possible to
1441-
/// determine what formal type it corresponds to. Among other things, it
1442-
/// is possible to use the runtime mangling facilities with the type.
1443-
///
1444-
/// For example, a metadata for a generic struct has a metadata kind,
1445-
/// a type descriptor, and all of its type arguments. However, it does not
1446-
/// necessarily have a meaningful value-witness table.
1447-
///
1448-
/// References to other types that are not part of the type's basic identity
1449-
/// may not yet have been established. Most crucially, this includes the
1450-
/// superclass pointer.
1451-
Abstract = 0xFF,
1392+
/// For example, a class must be ready for subclassing and instantiation:
1393+
/// it must have a completed instance layout and (under ObjCInterop)
1394+
/// must have been realized by the Objective-C runtime.
1395+
Complete,
1396+
1397+
/// A request for metadata that can be used for type layout; that is,
1398+
/// the type's value witness table must be completely initialized.
1399+
LayoutComplete,
1400+
1401+
/// A request for a metadata pointer that fully identifies the type.
1402+
/// Basic type structure, such as the type context descriptor and the
1403+
/// list of generic arguments, should have been installed, but there is
1404+
/// no requirement for a valid value witness table.
1405+
Abstract,
14521406
};
14531407

1454-
/// Something that can be static_asserted in all the places where we do
1455-
/// comparisons on metadata states.
1408+
/// Something that can be static_asserted in all the places where we depend
1409+
/// on metadata state ordering.
14561410
constexpr const bool MetadataStateIsReverseOrdered = true;
14571411

14581412
/// Return true if the first metadata state is at least as advanced as the

branches/swift-5.0-branch/include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2930,9 +2930,6 @@ ERROR(fallthrough_into_case_with_var_binding,none,
29302930
ERROR(unnecessary_cast_over_optionset,none,
29312931
"unnecessary cast over raw value of %0", (Type))
29322932

2933-
ERROR(mutability_mismatch_multiple_pattern_list,none,
2934-
"'%select{var|let}0' pattern binding must match previous "
2935-
"'%select{var|let}1' pattern binding", (bool, bool))
29362933
ERROR(type_mismatch_multiple_pattern_list,none,
29372934
"pattern variable bound to type %0, expected type %1", (Type, Type))
29382935
ERROR(type_mismatch_fallthrough_pattern_list,none,
@@ -3166,9 +3163,6 @@ ERROR(tuple_ellipsis,none,
31663163
WARNING(implicitly_unwrapped_optional_in_illegal_position_interpreted_as_optional,none,
31673164
"using '!' is not allowed here; treating this as '?' instead", ())
31683165

3169-
WARNING(implicitly_unwrapped_optional_deprecated_in_this_position,none,
3170-
"using '!' here is deprecated and will be removed in a future release", ())
3171-
31723166
ERROR(implicitly_unwrapped_optional_in_illegal_position,none,
31733167
"using '!' is not allowed here; perhaps '?' was intended?", ())
31743168

branches/swift-5.0-branch/include/swift/Demangling/Demangle.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ struct DemangleOptions {
7575
};
7676

7777
class Node;
78-
using NodePointer = Node *;
78+
typedef Node *NodePointer;
7979

8080
enum class FunctionSigSpecializationParamKind : unsigned {
8181
// Option Flags use bits 0-5. This give us 6 bits implying 64 entries to
@@ -133,7 +133,7 @@ class Node {
133133
#include "swift/Demangling/DemangleNodes.def"
134134
};
135135

136-
using IndexType = uint64_t;
136+
typedef uint64_t IndexType;
137137

138138
friend class NodeFactory;
139139

@@ -182,10 +182,10 @@ class Node {
182182
assert(hasIndex());
183183
return IndexPayload;
184184
}
185-
186-
using iterator = NodePointer *;
187-
using const_iterator = const NodePointer *;
188-
using size_type = size_t;
185+
186+
typedef NodePointer *iterator;
187+
typedef const NodePointer *const_iterator;
188+
typedef size_t size_type;
189189

190190
bool hasChildren() const { return NumChildren != 0; }
191191
size_t getNumChildren() const { return NumChildren; }

branches/swift-5.0-branch/include/swift/Demangling/DemangleNodes.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ NODE(GenericPartialSpecialization)
8181
NODE(GenericPartialSpecializationNotReAbstracted)
8282
NODE(GenericProtocolWitnessTable)
8383
NODE(GenericProtocolWitnessTableInstantiationFunction)
84-
NODE(ResilientProtocolWitnessTable)
8584
NODE(GenericSpecialization)
8685
NODE(GenericSpecializationNotReAbstracted)
8786
NODE(GenericSpecializationParam)

branches/swift-5.0-branch/include/swift/Demangling/Demangler.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ template<typename T> class Vector {
207207
size_t Capacity = 0;
208208

209209
public:
210-
using iterator = T *;
210+
211+
typedef T *iterator;
211212

212213
Vector() { }
213214

0 commit comments

Comments
 (0)