Skip to content

Commit 64688f3

Browse files
committed
---
yaml --- r: 261631 b: refs/heads/tensorflow c: fed6145 h: refs/heads/master i: 261629: fb7b18b 261627: 653930f 261623: f0cee36 261615: 00ad6b0 261599: e0f01d6 261567: 56bcec1 261503: 39e894a 261375: 1364cca 261119: 34b1f2a
1 parent 43d634c commit 64688f3

File tree

150 files changed

+2355
-2429
lines changed

Some content is hidden

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

150 files changed

+2355
-2429
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-04-25-a: 22f738a831d43aff2b9c9773bcb65
818818
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-05-08-a: 7d98cc16689baba5c8a3b90a9329bdcc1a12b4e9
819819
refs/heads/cherr42: a566ad54b073c2c56ac0a705d0a5bed9743135a5
820820
"refs/heads/codable_test_comment_fix": fc8f6824f7f347e1e8db55bff62db385c5728b5a
821-
refs/heads/tensorflow: 9315b3a190ddbace14c31ff59492cfbdcb487eb7
821+
refs/heads/tensorflow: fed6145922e0180cb16b62b0524f792a08e608ce
822822
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-11-a: 8126fd7a652e2f70ad6d76505239e34fb2ef3e1a
823823
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-12-a: b3fd3dd84df6717f2e2e9df58c6d7e99fed57086
824824
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-13-a: 71135119579039dc321c5f65d870050fe36efda2

branches/tensorflow/CHANGELOG.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,6 @@ CHANGELOG
2424
Swift 5.0
2525
---------
2626

27-
* [SE-0216][]:
28-
29-
The `@dynamicCallable` attribute enables nominal types to be "callable" via a
30-
simple syntactic sugar. The primary use case is dynamic language
31-
interoperability.
32-
33-
Toy example:
34-
35-
```swift
36-
@dynamicCallable
37-
struct ToyCallable {
38-
func dynamicallyCall(withArguments: [Int]) {}
39-
func dynamicallyCall(withKeywordArguments: KeyValuePairs<String, Int>) {}
40-
}
41-
let x = ToyCallable()
42-
x(1, 2, 3) // desugars to `x.dynamicallyCall(withArguments: [1, 2, 3])`
43-
x(label: 1, 2) // desugars to `x.dynamicallyCall(withKeywordArguments: ["label": 1, "": 2])`
44-
```
45-
4627
* [SR-7251][]:
4728

4829
In Swift 5 mode, attempting to declare a static property with the same name as a

branches/tensorflow/benchmark/single-source/DataBenchmarks.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,49 +17,49 @@ public let DataBenchmarks = [
1717
BenchmarkInfo(name: "DataCreateEmpty", runFunction: run_createEmpty, tags: [.validation, .api, .Data]),
1818
BenchmarkInfo(name: "DataCreateSmall", runFunction: run_createSmall, tags: [.validation, .api, .Data]),
1919
BenchmarkInfo(name: "DataCreateMedium", runFunction: run_createMedium, tags: [.validation, .api, .Data]),
20-
BenchmarkInfo(name: "DataCreateLarge", runFunction: run_createLarge, tags: [.validation, .api, .Data, .skip]),
20+
BenchmarkInfo(name: "DataCreateLarge", runFunction: run_createLarge, tags: [.validation, .api, .Data]),
2121
BenchmarkInfo(name: "DataCreateEmptyArray", runFunction: run_createEmptyArray, tags: [.validation, .api, .Data]),
2222
BenchmarkInfo(name: "DataCreateSmallArray", runFunction: run_createSmallArray, tags: [.validation, .api, .Data]),
2323
BenchmarkInfo(name: "DataCreateMediumArray", runFunction: run_createMediumArray, tags: [.validation, .api, .Data]),
2424
BenchmarkInfo(name: "DataSubscriptSmall", runFunction: run_SubscriptSmall, tags: [.validation, .api, .Data]),
2525
BenchmarkInfo(name: "DataSubscriptMedium", runFunction: run_SubscriptMedium, tags: [.validation, .api, .Data]),
26-
BenchmarkInfo(name: "DataSubscriptLarge", runFunction: run_SubscriptLarge, tags: [.validation, .api, .Data, .skip]),
26+
BenchmarkInfo(name: "DataSubscriptLarge", runFunction: run_SubscriptLarge, tags: [.validation, .api, .Data]),
2727
BenchmarkInfo(name: "DataCountSmall", runFunction: run_CountSmall, tags: [.validation, .api, .Data]),
2828
BenchmarkInfo(name: "DataCountMedium", runFunction: run_CountMedium, tags: [.validation, .api, .Data]),
29-
BenchmarkInfo(name: "DataCountLarge", runFunction: run_CountLarge, tags: [.validation, .api, .Data, .skip]),
29+
BenchmarkInfo(name: "DataCountLarge", runFunction: run_CountLarge, tags: [.validation, .api, .Data]),
3030
BenchmarkInfo(name: "DataSetCountSmall", runFunction: run_SetCountSmall, tags: [.validation, .api, .Data]),
3131
BenchmarkInfo(name: "DataSetCountMedium", runFunction: run_SetCountMedium, tags: [.validation, .api, .Data]),
32-
BenchmarkInfo(name: "DataSetCountLarge", runFunction: run_SetCountLarge, tags: [.validation, .api, .Data, .skip]),
32+
BenchmarkInfo(name: "DataSetCountLarge", runFunction: run_SetCountLarge, tags: [.validation, .api, .Data]),
3333
BenchmarkInfo(name: "DataAccessBytesSmall", runFunction: run_AccessBytesSmall, tags: [.validation, .api, .Data]),
3434
BenchmarkInfo(name: "DataAccessBytesMedium", runFunction: run_AccessBytesMedium, tags: [.validation, .api, .Data]),
35-
BenchmarkInfo(name: "DataAccessBytesLarge", runFunction: run_AccessBytesLarge, tags: [.validation, .api, .Data, .skip]),
35+
BenchmarkInfo(name: "DataAccessBytesLarge", runFunction: run_AccessBytesLarge, tags: [.validation, .api, .Data]),
3636
BenchmarkInfo(name: "DataMutateBytesSmall", runFunction: run_MutateBytesSmall, tags: [.validation, .api, .Data]),
3737
BenchmarkInfo(name: "DataMutateBytesMedium", runFunction: run_MutateBytesMedium, tags: [.validation, .api, .Data]),
38-
BenchmarkInfo(name: "DataMutateBytesLarge", runFunction: run_MutateBytesLarge, tags: [.validation, .api, .Data, .skip]),
38+
BenchmarkInfo(name: "DataMutateBytesLarge", runFunction: run_MutateBytesLarge, tags: [.validation, .api, .Data]),
3939
BenchmarkInfo(name: "DataCopyBytesSmall", runFunction: run_CopyBytesSmall, tags: [.validation, .api, .Data]),
4040
BenchmarkInfo(name: "DataCopyBytesMedium", runFunction: run_CopyBytesMedium, tags: [.validation, .api, .Data]),
41-
BenchmarkInfo(name: "DataCopyBytesLarge", runFunction: run_CopyBytesLarge, tags: [.validation, .api, .Data, .skip]),
41+
BenchmarkInfo(name: "DataCopyBytesLarge", runFunction: run_CopyBytesLarge, tags: [.validation, .api, .Data]),
4242
BenchmarkInfo(name: "DataAppendBytesSmall", runFunction: run_AppendBytesSmall, tags: [.validation, .api, .Data]),
4343
BenchmarkInfo(name: "DataAppendBytesMedium", runFunction: run_AppendBytesMedium, tags: [.validation, .api, .Data]),
44-
BenchmarkInfo(name: "DataAppendBytesLarge", runFunction: run_AppendBytesLarge, tags: [.validation, .api, .Data, .skip]),
44+
BenchmarkInfo(name: "DataAppendBytesLarge", runFunction: run_AppendBytesLarge, tags: [.validation, .api, .Data]),
4545
BenchmarkInfo(name: "DataAppendArray", runFunction: run_AppendArray, tags: [.validation, .api, .Data]),
4646
BenchmarkInfo(name: "DataReset", runFunction: run_Reset, tags: [.validation, .api, .Data]),
4747
BenchmarkInfo(name: "DataReplaceSmall", runFunction: run_ReplaceSmall, tags: [.validation, .api, .Data]),
4848
BenchmarkInfo(name: "DataReplaceMedium", runFunction: run_ReplaceMedium, tags: [.validation, .api, .Data]),
4949
BenchmarkInfo(name: "DataReplaceLarge", runFunction: run_ReplaceLarge, tags: [.validation, .api, .Data]),
5050
BenchmarkInfo(name: "DataReplaceSmallBuffer", runFunction: run_ReplaceSmallBuffer, tags: [.validation, .api, .Data]),
5151
BenchmarkInfo(name: "DataReplaceMediumBuffer", runFunction: run_ReplaceMediumBuffer, tags: [.validation, .api, .Data]),
52-
BenchmarkInfo(name: "DataReplaceLargeBuffer", runFunction: run_ReplaceLargeBuffer, tags: [.validation, .api, .Data, .skip]),
52+
BenchmarkInfo(name: "DataReplaceLargeBuffer", runFunction: run_ReplaceLargeBuffer, tags: [.validation, .api, .Data]),
5353
BenchmarkInfo(name: "DataAppendSequence", runFunction: run_AppendSequence, tags: [.validation, .api, .Data]),
5454
BenchmarkInfo(name: "DataAppendDataSmallToSmall", runFunction: run_AppendDataSmallToSmall, tags: [.validation, .api, .Data]),
5555
BenchmarkInfo(name: "DataAppendDataSmallToMedium", runFunction: run_AppendDataSmallToMedium, tags: [.validation, .api, .Data]),
5656
BenchmarkInfo(name: "DataAppendDataSmallToLarge", runFunction: run_AppendDataSmallToLarge, tags: [.validation, .api, .Data]),
5757
BenchmarkInfo(name: "DataAppendDataMediumToSmall", runFunction: run_AppendDataMediumToSmall, tags: [.validation, .api, .Data]),
5858
BenchmarkInfo(name: "DataAppendDataMediumToMedium", runFunction: run_AppendDataMediumToMedium, tags: [.validation, .api, .Data]),
59-
BenchmarkInfo(name: "DataAppendDataMediumToLarge", runFunction: run_AppendDataMediumToLarge, tags: [.validation, .api, .Data, .skip]),
59+
BenchmarkInfo(name: "DataAppendDataMediumToLarge", runFunction: run_AppendDataMediumToLarge, tags: [.validation, .api, .Data]),
6060
BenchmarkInfo(name: "DataAppendDataLargeToSmall", runFunction: run_AppendDataLargeToSmall, tags: [.validation, .api, .Data]),
6161
BenchmarkInfo(name: "DataAppendDataLargeToMedium", runFunction: run_AppendDataLargeToMedium, tags: [.validation, .api, .Data]),
62-
BenchmarkInfo(name: "DataAppendDataLargeToLarge", runFunction: run_AppendDataLargeToLarge, tags: [.validation, .api, .Data, .skip]),
62+
BenchmarkInfo(name: "DataAppendDataLargeToLarge", runFunction: run_AppendDataLargeToLarge, tags: [.validation, .api, .Data]),
6363
BenchmarkInfo(name: "DataToStringEmpty", runFunction: run_DataToStringEmpty, tags: [.validation, .api, .Data]),
6464
BenchmarkInfo(name: "DataToStringSmall", runFunction: run_DataToStringSmall, tags: [.validation, .api, .Data]),
6565
BenchmarkInfo(name: "DataToStringMedium", runFunction: run_DataToStringMedium, tags: [.validation, .api, .Data]),

branches/tensorflow/docs/ABI/Mangling.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ Entities
289289
ACCESSOR ::= 'p' // pseudo accessor referring to the storage itself
290290

291291
ADDRESSOR-KIND ::= 'u' // unsafe addressor (no owner)
292-
ADDRESSOR-KIND ::= 'O' // owning addressor (non-native owner), not used anymore
293-
ADDRESSOR-KIND ::= 'o' // owning addressor (native owner), not used anymore
292+
ADDRESSOR-KIND ::= 'O' // owning addressor (non-native owner)
293+
ADDRESSOR-KIND ::= 'o' // owning addressor (native owner)
294294
ADDRESSOR-KIND ::= 'p' // pinning addressor (native owner), not used anymore
295295

296296
decl-name ::= identifier

branches/tensorflow/include/swift/ABI/Metadata.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -625,27 +625,11 @@ struct TargetMetadata {
625625
getValueWitnesses()->_asEVWT()->destructiveInjectEnumTag(value, tag, this);
626626
}
627627

628-
size_t vw_size() const {
629-
return getValueWitnesses()->getSize();
630-
}
631-
632-
size_t vw_alignment() const {
633-
return getValueWitnesses()->getAlignment();
634-
}
635-
636-
size_t vw_stride() const {
637-
return getValueWitnesses()->getStride();
638-
}
639-
640628
/// Allocate an out-of-line buffer if values of this type don't fit in the
641629
/// ValueBuffer.
642630
/// NOTE: This is not a box for copy-on-write existentials.
643631
OpaqueValue *allocateBufferIn(ValueBuffer *buffer) const;
644632

645-
/// Get the address of the memory previously allocated in the ValueBuffer.
646-
/// NOTE: This is not a box for copy-on-write existentials.
647-
OpaqueValue *projectBufferFrom(ValueBuffer *buffer) const;
648-
649633
/// Deallocate an out-of-line buffer stored in 'buffer' if values of this type
650634
/// are not stored inline in the ValueBuffer.
651635
void deallocateBufferIn(ValueBuffer *buffer) const;

branches/tensorflow/include/swift/AST/ASTMangler.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class ASTMangler : public Mangler {
9292
bool isDestroyer, SymbolKind SKind);
9393

9494
std::string mangleAccessorEntity(AccessorKind kind,
95+
AddressorKind addressorKind,
9596
const AbstractStorageDecl *decl,
9697
bool isStatic,
9798
SymbolKind SKind);
@@ -161,6 +162,7 @@ class ASTMangler : public Mangler {
161162
std::string mangleDeclAsUSR(const ValueDecl *Decl, StringRef USRPrefix);
162163

163164
std::string mangleAccessorEntityAsUSR(AccessorKind kind,
165+
AddressorKind addressorKind,
164166
const AbstractStorageDecl *decl,
165167
StringRef USRPrefix);
166168

@@ -229,7 +231,7 @@ class ASTMangler : public Mangler {
229231
void appendAnyGenericType(const GenericTypeDecl *decl);
230232

231233
void appendFunction(AnyFunctionType *fn, bool isFunctionMangling = false);
232-
void appendFunctionType(AnyFunctionType *fn, bool isAutoClosure = false);
234+
void appendFunctionType(AnyFunctionType *fn);
233235

234236
void appendFunctionSignature(AnyFunctionType *fn);
235237

branches/tensorflow/include/swift/AST/AccessorKinds.def

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,31 +73,36 @@
7373
#define COROUTINE_ACCESSOR(ID, KEYWORD) OPAQUE_ACCESSOR(ID, KEYWORD)
7474
#endif
7575

76-
/// ANY_ADDRESSOR(ID, KEYWORD)
76+
/// ANY_ADDRESSOR(ACCESSOR_ID, ADDRESSOR_ID, KEYWORD)
7777
/// The given keyword corresponds to an addressor of the given kind.
7878
///
79-
/// Defaults to SINGLETON_ACCESSOR(ID, KEYWORD).
79+
/// Defaults to ACCESSOR_KEYWORD(KEYWORD) if that is defined; otherwise
80+
/// defaults to nothing.
8081
#ifndef ANY_ADDRESSOR
81-
#define ANY_ADDRESSOR(ID, KEYWORD) \
82-
SINGLETON_ACCESSOR(ID, KEYWORD)
82+
#if defined(ACCESSOR_KEYWORD)
83+
#define ANY_ADDRESSOR(ACCESSOR_ID, ADDRESSOR_ID, KEYWORD) \
84+
ACCESSOR_KEYWORD(KEYWORD)
85+
#else
86+
#define ANY_ADDRESSOR(ACCESSOR_ID, ADDRESSOR_ID, KEYWORD)
87+
#endif
8388
#endif
8489

85-
/// IMMUTABLE_ADDRESSOR(ID, KEYWORD)
90+
/// IMMUTABLE_ADDRESSOR(ADDRESSOR_ID, KEYWORD)
8691
/// The given keyword corresponds to an immutable addressor of the given kind.
8792
///
88-
/// DEfaults to ANY_ADDRESSOR(ID, KEYWORD).
93+
/// DEfaults to ANY_ADDRESSOR(Address, ADDRESSOR_ID, KEYWORD).
8994
#ifndef IMMUTABLE_ADDRESSOR
90-
#define IMMUTABLE_ADDRESSOR(ID, KEYWORD) \
91-
ANY_ADDRESSOR(ID, KEYWORD)
95+
#define IMMUTABLE_ADDRESSOR(ADDRESSOR_ID, KEYWORD) \
96+
ANY_ADDRESSOR(Address, ADDRESSOR_ID, KEYWORD)
9297
#endif
9398

94-
/// MUTABLE_ADDRESSOR(ID, KEYWORD)
99+
/// MUTABLE_ADDRESSOR(ADDRESSOR_ID, KEYWORD)
95100
/// The given keyword corresponds to a mutable addressor of the given kind.
96101
///
97-
/// DEfaults to ANY_ADDRESSOR(ID, KEYWORD).
102+
/// DEfaults to ANY_ADDRESSOR(MutableAddress, ADDRESSOR_ID, KEYWORD).
98103
#ifndef MUTABLE_ADDRESSOR
99-
#define MUTABLE_ADDRESSOR(ID, KEYWORD) \
100-
ANY_ADDRESSOR(ID, KEYWORD)
104+
#define MUTABLE_ADDRESSOR(ADDRESSOR_ID, KEYWORD) \
105+
ANY_ADDRESSOR(MutableAddress, ADDRESSOR_ID, KEYWORD)
101106
#endif
102107

103108
// Suppress entries for accessors which can't be written in source code.
@@ -162,7 +167,11 @@ OBSERVING_ACCESSOR(DidSet, didSet)
162167
/// Addressors are a way of proving more efficient access to storage
163168
/// when it is already stored in memory (but not as a stored member
164169
/// of the type).
165-
IMMUTABLE_ADDRESSOR(Address, unsafeAddress)
170+
ACCESSOR(Address)
171+
172+
IMMUTABLE_ADDRESSOR(Unsafe, unsafeAddress)
173+
IMMUTABLE_ADDRESSOR(Owning, addressWithOwner)
174+
IMMUTABLE_ADDRESSOR(NativeOwning, addressWithNativeOwner)
166175

167176
/// This is a mutableAddress-family accessor: a function that is
168177
/// called when the storage is modified and which works by returning
@@ -172,7 +181,11 @@ IMMUTABLE_ADDRESSOR(Address, unsafeAddress)
172181
/// Addressors are a way of proving more efficient access to storage
173182
/// when it is already stored in memory (but not as a stored member
174183
/// of the type).
175-
MUTABLE_ADDRESSOR(MutableAddress, unsafeMutableAddress)
184+
ACCESSOR(MutableAddress)
185+
186+
MUTABLE_ADDRESSOR(Unsafe, unsafeMutableAddress)
187+
MUTABLE_ADDRESSOR(Owning, mutableAddressWithOwner)
188+
MUTABLE_ADDRESSOR(NativeOwning, mutableAddressWithNativeOwner)
176189

177190
#ifdef LAST_ACCESSOR
178191
LAST_ACCESSOR(MutableAddress)

branches/tensorflow/include/swift/AST/Decl.h

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,12 @@ class alignas(1 << DeclAlignInBits) Decl {
431431
SelfAccess : 2
432432
);
433433

434-
SWIFT_INLINE_BITFIELD(AccessorDecl, FuncDecl, 4,
434+
SWIFT_INLINE_BITFIELD(AccessorDecl, FuncDecl, 4+3,
435435
/// The kind of accessor this is.
436-
AccessorKind : 4
436+
AccessorKind : 4,
437+
438+
/// The kind of addressor this is.
439+
AddressorKind : 3
437440
);
438441

439442
SWIFT_INLINE_BITFIELD(ConstructorDecl, AbstractFunctionDecl, 3+2+2+1,
@@ -4849,10 +4852,7 @@ class ParamDecl : public VarDecl {
48494852

48504853
/// The default value, if any, along with whether this is varargs.
48514854
llvm::PointerIntPair<StoredDefaultArgument *, 1> DefaultValueAndIsVariadic;
4852-
4853-
/// `@autoclosure` flag associated with this parameter.
4854-
bool IsAutoClosure = false;
4855-
4855+
48564856
public:
48574857
ParamDecl(VarDecl::Specifier specifier,
48584858
SourceLoc specifierLoc, SourceLoc argumentNameLoc,
@@ -4936,11 +4936,7 @@ class ParamDecl : public VarDecl {
49364936
/// Whether or not this parameter is varargs.
49374937
bool isVariadic() const { return DefaultValueAndIsVariadic.getInt(); }
49384938
void setVariadic(bool value = true) {DefaultValueAndIsVariadic.setInt(value);}
4939-
4940-
/// Whether or not this parameter is marked with `@autoclosure`.
4941-
bool isAutoClosure() const { return IsAutoClosure; }
4942-
void setAutoClosure(bool value = true) { IsAutoClosure = value; }
4943-
4939+
49444940
/// Remove the type of this varargs element designator, without the array
49454941
/// type wrapping it. A parameter like "Int..." will have formal parameter
49464942
/// type of "[Int]" and this returns "Int".
@@ -5698,7 +5694,8 @@ class AccessorDecl final : public FuncDecl {
56985694
AbstractStorageDecl *Storage;
56995695

57005696
AccessorDecl(SourceLoc declLoc, SourceLoc accessorKeywordLoc,
5701-
AccessorKind accessorKind, AbstractStorageDecl *storage,
5697+
AccessorKind accessorKind, AddressorKind addressorKind,
5698+
AbstractStorageDecl *storage,
57025699
SourceLoc staticLoc, StaticSpellingKind staticSpelling,
57035700
bool throws, SourceLoc throwsLoc,
57045701
unsigned numParameterLists, GenericParamList *genericParams,
@@ -5710,12 +5707,14 @@ class AccessorDecl final : public FuncDecl {
57105707
AccessorKeywordLoc(accessorKeywordLoc),
57115708
Storage(storage) {
57125709
Bits.AccessorDecl.AccessorKind = unsigned(accessorKind);
5710+
Bits.AccessorDecl.AddressorKind = unsigned(addressorKind);
57135711
}
57145712

57155713
static AccessorDecl *createImpl(ASTContext &ctx,
57165714
SourceLoc declLoc,
57175715
SourceLoc accessorKeywordLoc,
57185716
AccessorKind accessorKind,
5717+
AddressorKind addressorKind,
57195718
AbstractStorageDecl *storage,
57205719
SourceLoc staticLoc,
57215720
StaticSpellingKind staticSpelling,
@@ -5729,6 +5728,7 @@ class AccessorDecl final : public FuncDecl {
57295728
SourceLoc declLoc,
57305729
SourceLoc accessorKeywordLoc,
57315730
AccessorKind accessorKind,
5731+
AddressorKind addressorKind,
57325732
AbstractStorageDecl *storage,
57335733
SourceLoc staticLoc,
57345734
StaticSpellingKind staticSpelling,
@@ -5739,6 +5739,7 @@ class AccessorDecl final : public FuncDecl {
57395739
static AccessorDecl *create(ASTContext &ctx, SourceLoc declLoc,
57405740
SourceLoc accessorKeywordLoc,
57415741
AccessorKind accessorKind,
5742+
AddressorKind addressorKind,
57425743
AbstractStorageDecl *storage,
57435744
SourceLoc staticLoc,
57445745
StaticSpellingKind staticSpelling,
@@ -5758,6 +5759,10 @@ class AccessorDecl final : public FuncDecl {
57585759
return AccessorKind(Bits.AccessorDecl.AccessorKind);
57595760
}
57605761

5762+
AddressorKind getAddressorKind() const {
5763+
return AddressorKind(Bits.AccessorDecl.AddressorKind);
5764+
}
5765+
57615766
bool isGetter() const { return getAccessorKind() == AccessorKind::Get; }
57625767
bool isSetter() const { return getAccessorKind() == AccessorKind::Set; }
57635768
bool isAnyAddressor() const {
@@ -6842,8 +6847,16 @@ inline EnumElementDecl *EnumDecl::getUniqueElement(bool hasValue) const {
68426847
return result;
68436848
}
68446849

6845-
/// Retrieve parameter declaration from the given source at given index.
6846-
const ParamDecl *getParameterAt(ValueDecl *source, unsigned index);
6850+
/// Determine the default argument kind and type for the given argument index
6851+
/// in this declaration, which must be a function or constructor.
6852+
///
6853+
/// \param Index The index of the argument for which we are querying the
6854+
/// default argument.
6855+
///
6856+
/// \returns the default argument kind and, if there is a default argument,
6857+
/// the type of the corresponding parameter.
6858+
std::pair<DefaultArgumentKind, Type>
6859+
getDefaultArgumentInfo(ValueDecl *source, unsigned Index);
68476860

68486861
/// Display Decl subclasses.
68496862
void simple_display(llvm::raw_ostream &out, const Decl *decl);

branches/tensorflow/include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,6 @@ ERROR(expr_string_interpolation_outside_string,none,
510510
"string interpolation can only appear inside a string literal", ())
511511
ERROR(unsupported_keypath_tuple_element_reference,none,
512512
"key path cannot reference tuple elements", ())
513-
ERROR(expr_keypath_unimplemented_tuple,none,
514-
"key path support for tuples is not implemented", ())
515513
ERROR(expr_keypath_subscript_index_not_hashable, none,
516514
"subscript index of type %0 in a key path must be Hashable", (Type))
517515
ERROR(expr_smart_keypath_application_type_mismatch,none,

0 commit comments

Comments
 (0)