Skip to content

Commit adec865

Browse files
committed
Revert "Update master to build with Xcode 8 beta 3, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs."
This reverts commit 62d1fa7.
1 parent fe93266 commit adec865

File tree

92 files changed

+1254
-1006
lines changed

Some content is hidden

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

92 files changed

+1254
-1006
lines changed

apinotes/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ set(SWIFT_API_NOTES_INPUTS
1717
ExternalAccessory
1818
Foundation
1919
GameKit
20-
GameplayKit
2120
GLKit
2221
HealthKit
2322
HomeKit

apinotes/GameplayKit.apinotes

Lines changed: 0 additions & 8 deletions
This file was deleted.

benchmark/single-source/PopFront.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public func run_PopFrontUnsafePointer(_ N: Int) {
4545
var count = arrayCount
4646
while count != 0 {
4747
result += a[0]
48-
a.assignFrom(a + 1, count: count - 1)
48+
a.assign(from: a + 1, count: count - 1)
4949
count -= 1
5050
}
5151
CheckResults(result == arrayCount, "IncorrectResults in StringInterpolation: \(result) != \(arrayCount)")

docs/SIL.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,6 +2240,20 @@ index_raw_pointer
22402240
Given a ``Builtin.RawPointer`` value ``%0``, returns a pointer value at the
22412241
byte offset ``%1`` relative to ``%0``.
22422242

2243+
bind_memory
2244+
```````````
2245+
2246+
::
2247+
2248+
sil-instruction ::= 'bind_memory' sil-operand ',' sil-operand 'to' sil-type
2249+
2250+
bind_memory %0 : $Builtin.RawPointer, %1 : $Builtin.Word to $T
2251+
// %0 must be of $Builtin.RawPointer type
2252+
// %1 must be of $Builtin.Word type
2253+
2254+
Binds memory at ``Builtin.RawPointer`` value ``%0`` to type ``$T`` with enough
2255+
capacity to hold ``%1`` values. See SE-0107: UnsafeRawPointer.
2256+
22432257
Reference Counting
22442258
~~~~~~~~~~~~~~~~~~
22452259

include/swift/AST/Builtins.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ BUILTIN_SIL_OPERATION(IsUnique_native, "isUnique_native", Special)
311311
BUILTIN_SIL_OPERATION(IsUniqueOrPinned_native, "isUniqueOrPinned_native",
312312
Special)
313313

314+
/// bindMemory : <T> (Builtin.RawPointer, Builtin.Word, T.Type) -> ()
315+
BUILTIN_SIL_OPERATION(BindMemory, "bindMemory", Special)
316+
314317
#undef BUILTIN_SIL_OPERATION
315318

316319
// BUILTIN_RUNTIME_CALL - A call into a runtime function.

include/swift/AST/DiagnosticsFrontend.def

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,6 @@ ERROR(verify_encountered_fatal,none,
152152
ERROR(error_parse_input_file,none,
153153
"error parsing input file '%0' (%1)", (StringRef, StringRef))
154154

155-
ERROR(error_write_index_unit,none,
156-
"writing index unit file: %0", (StringRef))
157-
ERROR(error_create_index_dir,none,
158-
"creating index directory: %0", (StringRef))
159-
ERROR(error_write_index_record,none,
160-
"writing index record file: %0", (StringRef))
161-
162155
#ifndef DIAG_NO_UNDEF
163156
# if defined(DIAG)
164157
# undef DIAG

include/swift/AST/DiagnosticsSema.def

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,8 @@ ERROR(instance_member_use_on_type,none,
775775
ERROR(instance_member_in_initializer,none,
776776
"cannot use instance member %0 within property initializer; "
777777
"property initializers run before 'self' is available", (DeclName))
778+
ERROR(instance_member_in_default_parameter,none,
779+
"cannot use instance member %0 as a default parameter", (DeclName))
778780

779781
ERROR(invalid_initialization_parameter_same_type,none,
780782
"invalid initializer call with same type %0 as parameter", (Type))
@@ -2162,7 +2164,7 @@ NOTE(transitive_capture_through_here,none,
21622164
(Identifier, Identifier))
21632165

21642166
ERROR(closure_implicit_capture_without_noescape,none,
2165-
"closure cannot implicitly capture an inout parameter unless @noescape",
2167+
"escaping closures can only capture inout parameters explicitly by value",
21662168
())
21672169
ERROR(closure_implicit_capture_mutating_self,none,
21682170
"closure cannot implicitly capture a mutating self parameter",

include/swift/IDE/ModuleInterfacePrinting.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ Optional<StringRef>
4949
findGroupNameForUSR(ModuleDecl *M, StringRef USR);
5050

5151
bool printTypeInterface(ModuleDecl *M, Type Ty, ASTPrinter &Printer,
52-
std::string &Error);
52+
std::string &TypeName, std::string &Error);
5353

5454
bool printTypeInterface(ModuleDecl *M, StringRef TypeUSR, ASTPrinter &Printer,
55-
std::string &Error);
55+
std::string &TyepName, std::string &Error);
5656

5757
void printModuleInterface(ModuleDecl *M, Optional<StringRef> Group,
5858
ModuleTraversalOptions TraversalOptions,

include/swift/SIL/SILBuilder.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,12 @@ class SILBuilder {
518518
getSILDebugLocation(Loc), srcAddr, destAddr, isTake, isInitialize));
519519
}
520520

521+
BindMemoryInst *createBindMemory(SILLocation Loc, SILValue base,
522+
SILValue index, SILType boundType) {
523+
return insert(BindMemoryInst::create(getSILDebugLocation(Loc), base, index,
524+
boundType, F, OpenedArchetypes));
525+
}
526+
521527
ConvertFunctionInst *createConvertFunction(SILLocation Loc, SILValue Op,
522528
SILType Ty) {
523529
return insert(new (F.getModule())

include/swift/SIL/SILCloner.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,17 @@ SILCloner<ImplClass>::visitCopyAddrInst(CopyAddrInst *Inst) {
788788
Inst->isInitializationOfDest()));
789789
}
790790

791+
template<typename ImplClass>
792+
void
793+
SILCloner<ImplClass>::visitBindMemoryInst(BindMemoryInst *Inst) {
794+
getBuilder().setCurrentDebugScope(getOpScope(Inst->getDebugScope()));
795+
doPostProcess(Inst,
796+
getBuilder().createBindMemory(getOpLocation(Inst->getLoc()),
797+
getOpValue(Inst->getBase()),
798+
getOpValue(Inst->getIndex()),
799+
Inst->getBoundType()));
800+
}
801+
791802
template<typename ImplClass>
792803
void
793804
SILCloner<ImplClass>::visitConvertFunctionInst(ConvertFunctionInst *Inst) {

0 commit comments

Comments
 (0)