Skip to content

Commit f2398ba

Browse files
committed
---
yaml --- r: 349300 b: refs/heads/master-next c: 6260b45 h: refs/heads/master
1 parent c40c485 commit f2398ba

27 files changed

+203
-503
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 3571b1dfcd7d61909ccf803fd1217984d1c96cbd
3+
refs/heads/master-next: 6260b4508a1786c6dc723cfff01c5be72d9b82e1
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/include/swift/AST/Decl.h

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,11 +1678,7 @@ class ExtensionDecl final : public GenericContext, public Decl,
16781678
TypeRepr *ExtendedTypeRepr;
16791679

16801680
/// The nominal type being extended.
1681-
///
1682-
/// The bit indicates whether binding has been attempted. The pointer can be
1683-
/// null if either no binding was attempted or if binding could not find the
1684-
/// extended nominal.
1685-
llvm::PointerIntPair<NominalTypeDecl *, 1, bool> ExtendedNominal;
1681+
NominalTypeDecl *ExtendedNominal = nullptr;
16861682

16871683
MutableArrayRef<TypeLoc> Inherited;
16881684

@@ -1742,12 +1738,6 @@ class ExtensionDecl final : public GenericContext, public Decl,
17421738
SourceRange getBraces() const { return Braces; }
17431739
void setBraces(SourceRange braces) { Braces = braces; }
17441740

1745-
bool hasBeenBound() const { return ExtendedNominal.getInt(); }
1746-
1747-
void setExtendedNominal(NominalTypeDecl *n) {
1748-
ExtendedNominal.setPointerAndInt(n, true);
1749-
}
1750-
17511741
/// Retrieve the type being extended.
17521742
///
17531743
/// Only use this entry point when the complete type, as spelled in the source,
@@ -1756,21 +1746,8 @@ class ExtensionDecl final : public GenericContext, public Decl,
17561746
Type getExtendedType() const;
17571747

17581748
/// Retrieve the nominal type declaration that is being extended.
1759-
/// Will trip an assertion if the declaration has not already been computed.
1760-
/// In order to fail fast when type checking work is attempted
1761-
/// before extension binding has taken place.
1762-
17631749
NominalTypeDecl *getExtendedNominal() const;
17641750

1765-
/// Compute the nominal type declaration that is being extended.
1766-
NominalTypeDecl *computeExtendedNominal() const;
1767-
1768-
/// \c hasBeenBound means nothing if this extension can never been bound
1769-
/// because it is not at the top level.
1770-
bool canNeverBeBound() const;
1771-
1772-
bool hasValidParent() const;
1773-
17741751
/// Determine whether this extension has already been bound to a nominal
17751752
/// type declaration.
17761753
bool alreadyBoundToNominal() const { return NextExtension.getInt(); }

branches/master-next/include/swift/AST/DeclContext.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,6 @@ class alignas(1 << DeclContextAlignInBits) DeclContext {
470470
/// AnyObject dynamic lookup.
471471
bool mayContainMembersAccessedByDynamicLookup() const;
472472

473-
/// Extensions are only allowed at the level in a file
474-
/// FIXME: do this for Protocols, too someday
475-
bool canBeParentOfExtension() const;
476-
477473
/// Returns true if lookups within this context could affect downstream files.
478474
///
479475
/// \param functionsAreNonCascading If true, functions are considered non-

branches/master-next/include/swift/Basic/ExternalUnion.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -433,27 +433,27 @@ struct MembersHelper<> {
433433

434434
LLVM_ATTRIBUTE_ALWAYS_INLINE
435435
static void copyConstruct(void *self, int index, const void *other) {
436-
assert(false && "bad index");
436+
llvm_unreachable("bad index");
437437
}
438438

439439
LLVM_ATTRIBUTE_ALWAYS_INLINE
440440
static void moveConstruct(void *self, int index, void *other) {
441-
assert(false && "bad index");
441+
llvm_unreachable("bad index");
442442
}
443443

444444
LLVM_ATTRIBUTE_ALWAYS_INLINE
445445
static void copyAssignSame(int index, void *self, const void *other) {
446-
assert(false && "bad index");
446+
llvm_unreachable("bad index");
447447
}
448448

449449
LLVM_ATTRIBUTE_ALWAYS_INLINE
450450
static void moveAssignSame(int index, void *self, void *other) {
451-
assert(false && "bad index");
451+
llvm_unreachable("bad index");
452452
}
453453

454454
LLVM_ATTRIBUTE_ALWAYS_INLINE
455455
static void destruct(int index, void *self) {
456-
assert(false && "bad index");
456+
llvm_unreachable("bad index");
457457
}
458458
};
459459

branches/master-next/include/swift/Reflection/ReflectionContext.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,17 +608,14 @@ class ReflectionContext
608608
auto CDAddr = this->readCaptureDescriptorFromMetadata(*MetadataAddress);
609609
if (!CDAddr)
610610
return nullptr;
611-
if (!CDAddr->isResolved())
612-
return nullptr;
613611

614612
// FIXME: Non-generic SIL boxes also use the HeapLocalVariable metadata
615613
// kind, but with a null capture descriptor right now (see
616614
// FixedBoxTypeInfoBase::allocate).
617615
//
618616
// Non-generic SIL boxes share metadata among types with compatible
619617
// layout, but we need some way to get an outgoing pointer map for them.
620-
auto CD = getBuilder().getCaptureDescriptor(
621-
CDAddr->getResolvedAddress().getAddressData());
618+
auto CD = getBuilder().getCaptureDescriptor(*CDAddr);
622619
if (CD == nullptr)
623620
return nullptr;
624621

branches/master-next/include/swift/Remote/MemoryReader.h

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class MemoryReader {
6969
/// NOTE: subclasses MUST override at least one of the readBytes functions. The default
7070
/// implementation calls through to the other one.
7171
virtual ReadBytesResult
72-
readBytes(RemoteAddress address, uint64_t size) {
72+
readBytes(RemoteAddress address, uint64_t size) {
7373
auto *Buf = malloc(size);
7474
ReadBytesResult Result(Buf, [](const void *ptr) {
7575
free(const_cast<void *>(ptr));
@@ -96,34 +96,6 @@ class MemoryReader {
9696
memcpy(dest, Ptr.get(), size);
9797
return true;
9898
}
99-
100-
/// Attempts to resolve a pointer value read from the given remote address.
101-
virtual RemoteAbsolutePointer resolvePointer(RemoteAddress address,
102-
uint64_t readValue) {
103-
// Default implementation returns the read value as is.
104-
return RemoteAbsolutePointer("", readValue);
105-
}
106-
107-
/// Attempt to read and resolve a pointer value at the given remote address.
108-
llvm::Optional<RemoteAbsolutePointer> readPointer(RemoteAddress address,
109-
unsigned pointerSize) {
110-
auto result = readBytes(address, pointerSize);
111-
if (!result)
112-
return llvm::None;
113-
114-
uint64_t pointerData;
115-
if (pointerSize == 4) {
116-
uint32_t theData;
117-
memcpy(&theData, result.get(), 4);
118-
pointerData = theData;
119-
} else if (pointerSize == 8) {
120-
memcpy(&pointerData, result.get(), 8);
121-
} else {
122-
return llvm::None;
123-
}
124-
125-
return resolvePointer(address, pointerData);
126-
}
12799

128100
virtual ~MemoryReader() = default;
129101
};

0 commit comments

Comments
 (0)