Commit Graph

10 Commits

Author SHA1 Message Date
Sho Ikeda
9c3e4848bf [gardening][Basic] Replace typedef with using 2018-03-28 21:27:26 +09:00
Ben Langmuir
4ce33ced0d Fix sys::Cache for ref-counted values which caused memory leaks in SourceKit
Our libcache implementation of swift::sys::Cache was broken for
ref-counted values (which are used by e.g. the SourceKit ASTManager).
It would always `retain(value)` in `set(key, value)`, but under the hood
libcache shares values, so we would only get one `release(value)` if the
same value was used across multiple keys, or if the same value *and* key
were set multiple times.

This was causing us to never release ASTs cached by SourceKit even when
the underlying libcache purged itself under memory pressure.

rdar://problem/21619189
2017-07-06 13:56:58 -07:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Dan Raviv
29d76f3b68 Canonize swift header files headers and footers
- Added missing ifdef guard in PointerIntEnum header
- Consistent naming convention for ifdef guards
- Consistent 'end namespace swift'
- Consistent single EOL at end of header files
2016-03-23 09:04:12 +02:00
practicalswift
50baf2e53b Use consistent formatting in top of file headers. 2016-01-04 02:17:48 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Doug Gregor
894c1e6bfb One more getPtr() -> get().
Swift SVN r19609
2014-07-07 14:54:53 +00:00
Argyrios Kyrtzidis
ec570d7fac [libBasic] Dmitri caught that always static_casting the key to check for equality will break if the rest of
the cache traits do not provide a direct pointer to the key object.

Swift SVN r9651
2013-10-24 20:25:00 +00:00
Argyrios Kyrtzidis
49a5f53e19 [libBasic] Introduce a caching mechanism, that evicts its entries when there is memory pressure.
The underlying mechanism uses darwin's libcache library (if not building on darwin there is a default implementation).

This was originally introduced in SourceKit, but we are moving it to libswiftBasic so it can be utilized by libswiftIDE
for caching code-completion results.

Swift SVN r9610
2013-10-23 00:41:55 +00:00