Commit Graph

6 Commits

Author SHA1 Message Date
Michael Gottesman
e678f4979b [gardening] Add swift license headers to all files in ./unittests/Basic/*. 2017-02-09 22:02:42 -08:00
practicalswift
38be6125e5 [gardening] C++ gardening: Terminate namespaces, fix argument names, ...
Changes:
* Terminate all namespaces with the correct closing comment.
* Make sure argument names in comments match the corresponding parameter name.
* Remove redundant get() calls on smart pointers.
* Prefer using "override" or "final" instead of "virtual". Remove "virtual" where appropriate.
2016-12-17 00:32:42 +01:00
John McCall
cc7938ad21 Implement a trie data structure. Specifically, implement
a ternary tree with a fixed-length per-node inline key buffer.

I plan to use this for metadata path caches, where it's useful to
be able to quickly find the most-derived point along a path that
you've already cached, but it should be useful for other things
in the compiler as well, like function-with-argument-label
lookups and possibly code completion.

This is quite a bit more space-efficient (and somewhat faster)
than doing scans after a lower_bound on a std::map<std::string, T>.

I haven't implemented balancing yet, and I don't need delete at
all for metadata paths, so I don't plan to work on that.

Swift SVN r32453
2015-10-06 01:14:30 +00:00
John McCall
a065ae99c8 Add a data structure for efficiently storing a byte-encoded
sequence which can be read with a forward iterator.

This will be useful for storing access paths to metadata or
protocol conformance values, which are typically very short.

Now with a fix to directly include <climits> for CHAR_BIT.
This was being transitively included on Darwin, but that's
not portable.

Swift SVN r29485
2015-06-18 07:13:15 +00:00
Ted Kremenek
4036074b56 Revert "Add a data structure for efficiently storing a byte-encoded"
This broke the Linux bot.

Swift SVN r29476
2015-06-18 04:39:30 +00:00
John McCall
c099ec8321 Add a data structure for efficiently storing a byte-encoded
sequence which can be read with a forward iterator.

This will be useful for storing access paths to metadata or
protocol conformance values, which are typically very short.

Swift SVN r29458
2015-06-17 21:34:00 +00:00