Skip to content

Commit e6099f6

Browse files
authored
---
yaml --- r: 274815 b: refs/heads/master c: 3e9878c h: refs/heads/master i: 274813: 5194518 274811: 76ce009 274807: d156e0f 274799: 82b4230 274783: e275671 274751: 22affd3 274687: 00de4b1
1 parent a0e84bc commit e6099f6

File tree

31 files changed

+540
-750
lines changed

31 files changed

+540
-750
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: ae8ab310ca9f2140fdc26a3614d5117a9933443a
2+
refs/heads/master: 3e9878ce08ad5a01512cb2a9c9386453218dc288
33
refs/heads/master-next: 75552d2b66023907022c17dfd899aae8b198add5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/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

trunk/benchmark/single-source/DoubleWidthDivision.swift

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

trunk/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)

trunk/include/swift-c/SyntaxParser/SwiftSyntaxParser.h

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,64 @@ 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+
235293
SWIFTPARSE_END_DECLS
236294

237295
#endif

trunk/include/swift/Demangling/Demangle.h

Lines changed: 4 additions & 3 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 archetypes in
38+
/// A simple default implementation that assigns letters to type parameters in
3939
/// alphabetic order.
40-
std::string archetypeName(uint64_t index, uint64_t depth);
40+
std::string genericParameterName(uint64_t depth, uint64_t index);
4141

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

6263
DemangleOptions() {}
6364

0 commit comments

Comments
 (0)