Skip to content

Commit dece103

Browse files
committed
---
yaml --- r: 274431 b: refs/heads/master-next c: 539f2cd h: refs/heads/master i: 274429: 840b507 274427: 1fb6586 274423: f8b06b1 274415: 8997705 274399: f603dfe 274367: 82f0db9 274303: 5f39519 274175: 26772a9 273919: 5b43b13 273407: ac4f043 272383: 866b703 270335: 4428302
1 parent e929883 commit dece103

Some content is hidden

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

42 files changed

+313
-630
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: cbef630f19f869ab5279731179bd731f12b3b9d5
3-
refs/heads/master-next: a19a62351d9d928b7abda0d460a7b762f29bff98
3+
refs/heads/master-next: 539f2cdcdf66d27396e831cb598ce828316880af
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/benchmark/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ set(SWIFT_BENCH_MODULES
7777
single-source/DictionaryRemove
7878
single-source/DictionarySubscriptDefault
7979
single-source/DictionarySwap
80-
single-source/DoubleWidthDivision
8180
single-source/DropFirst
8281
single-source/DropLast
8382
single-source/DropWhile

branches/master-next/benchmark/single-source/DoubleWidthDivision.swift

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

branches/master-next/benchmark/utils/main.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ import DictionaryOfAnyHashableStrings
6565
import DictionaryRemove
6666
import DictionarySubscriptDefault
6767
import DictionarySwap
68-
import DoubleWidthDivision
6968
import DropFirst
7069
import DropLast
7170
import DropWhile
@@ -235,7 +234,6 @@ registerBenchmark(DictionaryOfAnyHashableStrings)
235234
registerBenchmark(DictionaryRemove)
236235
registerBenchmark(DictionarySubscriptDefault)
237236
registerBenchmark(DictionarySwap)
238-
registerBenchmark(DoubleWidthDivision)
239237
registerBenchmark(DropFirst)
240238
registerBenchmark(DropLast)
241239
registerBenchmark(DropWhile)

branches/master-next/include/swift-c/SyntaxParser/SwiftSyntaxParser.h

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -232,64 +232,6 @@ swiftparse_parse_string(swiftparse_parser_t, const char *source);
232232
/// declarations, etc.
233233
SWIFTPARSE_PUBLIC const char* swiftparse_syntax_structure_versioning_identifier(void);
234234

235-
typedef struct {
236-
/// Represents the range for the fixit.
237-
swiftparse_range_t range;
238-
/// Represent the text for replacement.
239-
const char* text;
240-
} swiftparse_diagnostic_fixit_t;
241-
242-
typedef enum {
243-
SWIFTPARSER_DIAGNOSTIC_SEVERITY_ERROR = 0,
244-
SWIFTPARSER_DIAGNOSTIC_SEVERITY_WARNING = 1,
245-
SWIFTPARSER_DIAGNOSTIC_SEVERITY_NOTE = 2,
246-
} swiftparser_diagnostic_severity_t;
247-
248-
/// This is for the client to ask further information about a diagnostic that is
249-
/// associated with the pointer.
250-
/// This pointer is only valid to access from within the
251-
/// swiftparse_diagnostic_handler_t block
252-
typedef const void* swiftparser_diagnostic_t;
253-
254-
/// Invoked by the parser when a diagnostic is emitted.
255-
typedef void(^swiftparse_diagnostic_handler_t)(swiftparser_diagnostic_t);
256-
257-
/// Set the \c swiftparse_diagnostic_handler_t block to be used by the parser.
258-
///
259-
/// It isn't required to set a \c swiftparse_diagnostic_handler_t block.
260-
SWIFTPARSE_PUBLIC void
261-
swiftparse_parser_set_diagnostic_handler(swiftparse_parser_t,
262-
swiftparse_diagnostic_handler_t);
263-
264-
/// Get the message of a swiftparser_diagnostic_t
265-
SWIFTPARSE_PUBLIC const char*
266-
swiftparse_diagnostic_get_message(swiftparser_diagnostic_t);
267-
268-
/// Get the source location in byte offset to where the diagnostic is issued
269-
/// in the source buffer.
270-
SWIFTPARSE_PUBLIC
271-
unsigned swiftparse_diagnostic_get_source_loc(swiftparser_diagnostic_t diag);
272-
273-
/// Get the number of fixits of a swiftparser_diagnostic_t
274-
SWIFTPARSE_PUBLIC unsigned
275-
swiftparse_diagnostic_get_fixit_count(swiftparser_diagnostic_t);
276-
277-
/// Get the fixit at the specified index of a swiftparser_diagnostic_t
278-
SWIFTPARSE_PUBLIC swiftparse_diagnostic_fixit_t
279-
swiftparse_diagnostic_get_fixit(swiftparser_diagnostic_t, unsigned);
280-
281-
/// Get the number of highlight ranges of a swiftparser_diagnostic_t
282-
SWIFTPARSE_PUBLIC unsigned
283-
swiftparse_diagnostic_get_range_count(swiftparser_diagnostic_t);
284-
285-
/// Get the highlight range at the specified index of a swiftparser_diagnostic_t
286-
SWIFTPARSE_PUBLIC swiftparse_range_t
287-
swiftparse_diagnostic_get_range(swiftparser_diagnostic_t, unsigned);
288-
289-
/// Get the severity of a swiftparser_diagnostic_t
290-
SWIFTPARSE_PUBLIC swiftparser_diagnostic_severity_t
291-
swiftparse_diagnostic_get_severity(swiftparser_diagnostic_t diag);
292-
293235
SWIFTPARSE_END_DECLS
294236

295237
#endif

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -823,11 +823,11 @@ class NumberLiteralExpr : public LiteralExpr {
823823
}
824824
};
825825

826+
826827
/// Integer literal with a '+' or '-' sign, like '+4' or '- 2'.
827828
///
828-
/// After semantic analysis assigns types, this is guaranteed to have
829-
/// a BuiltinIntegerType or be a normal type and implicitly be
830-
/// AnyBuiltinIntegerType.
829+
/// After semantic analysis assigns types, this is guaranteed to only have
830+
/// a BuiltinIntegerType.
831831
class IntegerLiteralExpr : public NumberLiteralExpr {
832832
public:
833833
IntegerLiteralExpr(StringRef Val, SourceLoc DigitsLoc, bool Implicit = false)
@@ -855,12 +855,9 @@ class IntegerLiteralExpr : public NumberLiteralExpr {
855855
};
856856

857857
/// FloatLiteralExpr - Floating point literal, like '4.0'. After semantic
858-
/// analysis assigns types, BuiltinTy is guaranteed to only have a
858+
/// analysis assigns types, this is guaranteed to only have a
859859
/// BuiltinFloatingPointType.
860860
class FloatLiteralExpr : public NumberLiteralExpr {
861-
/// This is the type of the builtin literal.
862-
Type BuiltinTy;
863-
864861
public:
865862
FloatLiteralExpr(StringRef Val, SourceLoc Loc, bool Implicit = false)
866863
: NumberLiteralExpr(ExprKind::FloatLiteral, Val, Loc, Implicit)
@@ -873,9 +870,6 @@ class FloatLiteralExpr : public NumberLiteralExpr {
873870
static bool classof(const Expr *E) {
874871
return E->getKind() == ExprKind::FloatLiteral;
875872
}
876-
877-
Type getBuiltinType() const { return BuiltinTy; }
878-
void setBuiltinType(Type ty) { BuiltinTy = ty; }
879873
};
880874

881875
/// A Boolean literal ('true' or 'false')

branches/master-next/include/swift/Demangling/Demangle.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ namespace Demangle {
3535

3636
enum class SymbolicReferenceKind : uint8_t;
3737

38-
/// A simple default implementation that assigns letters to type parameters in
38+
/// A simple default implementation that assigns letters to archetypes in
3939
/// alphabetic order.
40-
std::string genericParameterName(uint64_t depth, uint64_t index);
40+
std::string archetypeName(uint64_t index, uint64_t depth);
4141

4242
/// Display style options for the demangler.
4343
struct DemangleOptions {
@@ -57,8 +57,7 @@ struct DemangleOptions {
5757
bool ShortenArchetype = false;
5858
bool ShowPrivateDiscriminators = true;
5959
bool ShowFunctionArgumentTypes = true;
60-
std::function<std::string(uint64_t, uint64_t)> GenericParameterName =
61-
genericParameterName;
60+
std::function<std::string(uint64_t, uint64_t)> ArchetypeName = archetypeName;
6261

6362
DemangleOptions() {}
6463

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

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class ReflectionContext
288288
}
289289

290290
#elif defined(_WIN32)
291-
bool readPECOFFSections(RemoteAddress ImageStart) {
291+
bool addImage(RemoteAddress ImageStart) {
292292
auto DOSHdrBuf = this->getReader().readBytes(
293293
ImageStart, sizeof(llvm::object::dos_header));
294294
auto DOSHdr =
@@ -380,29 +380,6 @@ class ReflectionContext
380380
return true;
381381
}
382382

383-
bool addImage(RemoteAddress ImageStart) {
384-
auto Buf = this->getReader().readBytes(ImageStart,
385-
sizeof(llvm::object::dos_header));
386-
if (!Buf)
387-
return false;
388-
389-
auto DOSHdr = reinterpret_cast<const llvm::object::dos_header *>(Buf.get());
390-
if (!(DOSHdr->Magic[0] == 'M' && DOSHdr->Magic[1] == 'Z'))
391-
return false;
392-
393-
auto PEHeaderAddress =
394-
ImageStart.getAddressData() + DOSHdr->AddressOfNewExeHeader;
395-
396-
Buf = this->getReader().readBytes(RemoteAddress(PEHeaderAddress),
397-
sizeof(llvm::COFF::PEMagic));
398-
if (!Buf)
399-
return false;
400-
401-
if (memcmp(Buf.get(), llvm::COFF::PEMagic, sizeof(llvm::COFF::PEMagic)))
402-
return false;
403-
404-
return readPECOFFSections(ImageStart);
405-
}
406383
#else // ELF platforms.
407384
template <typename T> bool readELFSections(RemoteAddress ImageStart) {
408385
auto Buf =

branches/master-next/lib/AST/ASTDumper.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,16 +1831,6 @@ class PrintExpr : public ExprVisitor<PrintExpr> {
18311831
printCommon(E, "float_literal_expr");
18321832
PrintWithColorRAII(OS, LiteralValueColor)
18331833
<< " value=" << E->getDigitsText();
1834-
PrintWithColorRAII(OS, LiteralValueColor) << " builtin_initializer=";
1835-
E->getBuiltinInitializer().dump(
1836-
PrintWithColorRAII(OS, LiteralValueColor).getOS());
1837-
PrintWithColorRAII(OS, LiteralValueColor) << " initializer=";
1838-
E->getInitializer().dump(PrintWithColorRAII(OS, LiteralValueColor).getOS());
1839-
if (!E->getBuiltinType().isNull()) {
1840-
PrintWithColorRAII(OS, TypeColor) << " builtin_type='";
1841-
E->getBuiltinType().print(PrintWithColorRAII(OS, TypeColor).getOS());
1842-
PrintWithColorRAII(OS, TypeColor) << "'";
1843-
}
18441834
PrintWithColorRAII(OS, ParenthesisColor) << ')';
18451835
}
18461836

branches/master-next/lib/AST/Expr.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -974,16 +974,8 @@ llvm::APFloat FloatLiteralExpr::getValue() const {
974974
assert(!getType().isNull() && "Semantic analysis has not completed");
975975
assert(!getType()->hasError() && "Should have a valid type");
976976

977-
Type ty = getType();
978-
if (!ty->is<BuiltinFloatType>()) {
979-
assert(!getBuiltinType().isNull() && "Semantic analysis has not completed");
980-
assert(!getBuiltinType()->hasError() && "Should have a valid type");
981-
ty = getBuiltinType();
982-
}
983-
984-
return getFloatLiteralValue(
985-
isNegative(), getDigitsText(),
986-
ty->castTo<BuiltinFloatType>()->getAPFloatSemantics());
977+
return getFloatLiteralValue(isNegative(), getDigitsText(),
978+
getType()->castTo<BuiltinFloatType>()->getAPFloatSemantics());
987979
}
988980

989981
StringLiteralExpr::StringLiteralExpr(StringRef Val, SourceRange Range,

branches/master-next/lib/Basic/Default/TaskQueue.inc

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,22 +143,12 @@ bool TaskQueue::execute(TaskBeganCallback Began, TaskFinishedCallback Finished,
143143
stderrContents = stderrBuffer.get()->getBuffer();
144144
}
145145

146-
#if defined(_WIN32)
147-
// Wait() sets the upper two bits of the return code to indicate warnings
148-
// (10) and errors (11).
149-
//
150-
// This isn't a true signal on Windows, but we'll treat it as such so that
151-
// we clean up after it properly
152-
bool crashed = ReturnCode & 0xC0000000;
153-
#else
146+
if (ReturnCode == -2) {
154147
// Wait() returning a return code of -2 indicates the process received
155148
// a signal during execution.
156-
bool crashed = ReturnCode == -2;
157-
#endif
158-
if (crashed) {
159149
if (Signalled) {
160150
TaskFinishedResponse Response =
161-
Signalled(PI.Pid, ErrMsg, stdoutContents, stderrContents, T->Context, ReturnCode, TaskProcessInformation(PI.Pid));
151+
Signalled(PI.Pid, ErrMsg, stdoutContents, stderrContents, T->Context, None, TaskProcessInformation(PI.Pid));
162152
ContinueExecution = Response != TaskFinishedResponse::StopExecution;
163153
} else {
164154
// If we don't have a Signalled callback, unconditionally stop.

branches/master-next/lib/Demangling/NodePrinter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ DemanglerPrinter &DemanglerPrinter::operator<<(long long n) & {
5050
return *this;
5151
}
5252

53-
std::string Demangle::genericParameterName(uint64_t depth, uint64_t index) {
53+
std::string Demangle::archetypeName(uint64_t index, uint64_t depth) {
5454
DemanglerPrinter name;
5555
do {
5656
name << (char)('A' + (index % 26));
@@ -1958,7 +1958,7 @@ NodePointer NodePrinter::print(NodePointer Node, bool asPrefixContext) {
19581958
}
19591959
// FIXME: Depth won't match when a generic signature applies to a
19601960
// method in generic type context.
1961-
Printer << Options.GenericParameterName(depth, index);
1961+
Printer << Options.ArchetypeName(index, depth);
19621962
}
19631963
}
19641964

@@ -2036,7 +2036,7 @@ NodePointer NodePrinter::print(NodePointer Node, bool asPrefixContext) {
20362036
case Node::Kind::DependentGenericParamType: {
20372037
unsigned index = Node->getChild(1)->getIndex();
20382038
unsigned depth = Node->getChild(0)->getIndex();
2039-
Printer << Options.GenericParameterName(depth, index);
2039+
Printer << Options.ArchetypeName(index, depth);
20402040
return nullptr;
20412041
}
20422042
case Node::Kind::DependentGenericType: {

branches/master-next/lib/Demangling/OldDemangler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ class OldDemangler {
13741374

13751375
NodePointer getDependentGenericParamType(unsigned depth, unsigned index) {
13761376
DemanglerPrinter PrintName;
1377-
PrintName << genericParameterName(depth, index);
1377+
PrintName << archetypeName(index, depth);
13781378

13791379
auto paramTy = Factory.createNode(Node::Kind::DependentGenericParamType);
13801380
paramTy->addChild(Factory.createNode(Node::Kind::Index, depth), Factory);

branches/master-next/lib/SIL/TypeLowering.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,15 +1840,8 @@ CanAnyFunctionType TypeConverter::makeConstantInterfaceType(SILDeclRef c) {
18401840
return getFunctionInterfaceTypeWithCaptures(funcTy, func);
18411841
}
18421842

1843-
case SILDeclRef::Kind::EnumElement: {
1844-
auto funcTy = cast<AnyFunctionType>(
1845-
vd->getInterfaceType()->getCanonicalType());
1846-
auto sig = getEffectiveGenericSignature(vd->getDeclContext());
1847-
return CanAnyFunctionType::get(sig,
1848-
funcTy->getParams(),
1849-
funcTy.getResult(),
1850-
funcTy->getExtInfo());
1851-
}
1843+
case SILDeclRef::Kind::EnumElement:
1844+
return cast<AnyFunctionType>(vd->getInterfaceType()->getCanonicalType());
18521845

18531846
case SILDeclRef::Kind::Allocator: {
18541847
auto *cd = cast<ConstructorDecl>(vd);

branches/master-next/lib/SILGen/SILGenApply.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5543,21 +5543,10 @@ RValue SILGenFunction::emitLiteral(LiteralExpr *literal, SGFContext C) {
55435543
integerLiteral,
55445544
SILType::getBuiltinIntegerLiteralType(getASTContext()),
55455545
integerLiteral->getRawValue()));
5546-
CanType ty = integerManaged.getType().getASTType();
5546+
CanType ty = integerManaged.getType().getASTType()->getCanonicalType();
55475547
builtinLiteralArgs = RValue(*this, {integerManaged}, ty);
55485548
builtinInit = integerLiteral->getBuiltinInitializer();
55495549
init = integerLiteral->getInitializer();
5550-
} else if (auto floatLiteral = dyn_cast<FloatLiteralExpr>(literal)) {
5551-
auto *litTy = floatLiteral->getBuiltinType()->castTo<BuiltinFloatType>();
5552-
ManagedValue floatManaged = ManagedValue::forUnmanaged(B.createFloatLiteral(
5553-
floatLiteral,
5554-
SILType::getBuiltinFloatType(litTy->getFPKind(), getASTContext()),
5555-
floatLiteral->getValue()));
5556-
5557-
CanType ty = floatManaged.getType().getASTType();
5558-
builtinLiteralArgs = RValue(*this, {floatManaged}, ty);
5559-
builtinInit = floatLiteral->getBuiltinInitializer();
5560-
init = floatLiteral->getInitializer();
55615550
} else {
55625551
ASTContext &ctx = getASTContext();
55635552
SourceLoc loc = literal->getStartLoc();

0 commit comments

Comments
 (0)