Commit Graph

12 Commits

Author SHA1 Message Date
Ben Langmuir
d13b1c719f [cursor-info] Add a way to opt out of automatic request cancellation
The OncePerASTToken machinery lets us automatically cancel "stale"
requests after a new one comes in.  This avoid wasting time processing
requests that have been superceded, which is common for cursor-info, but
sometimes you really want to get results even later, so this commit adds
a way to opt out of the cancellation.

Incidentally, disable cancellation of name translation, which doesn't
really make sense and no one should be relying on that.

rdar://problem/31905379
2017-05-08 12:01:33 -07:00
practicalswift
5b9267b8b4 [gardening] Use override as appropriate 2017-04-20 13:47:10 +02:00
David Farler
65668c9d82 Cache Code Completion results from PCH files
- Add CompilerInvocation::getPCHHash
  This will be used when creating a unique filename for a persistent
  precompiled bridging header.

- Automatically generate and use a precompiled briding header
  When we're given both -import-objc-header and -pch-output-dir
  arguments, we will try to:
  - Validate what we think the PCH filename should be for the bridging
    header, based on the Swift PCH hash and the clang module hash.
    - If we're successful, we'll just use it.
    - If it's out of date or something else is wrong, we'll try to
      emit it.
  - This gives us a single filename which we can `stat` to check for the
    validity of our code completion cache, which is keyed off of module
    name, module filename, and module file age.

- Cache code completion results from imported modules
  If we just have a single .PCH file imported, we can use that file as
  part of the key used to cache declarations in a module.  Because
  multiple files can contribute to the __ObjC module, we've always given
  it the phony filename "<imports>", which never exists, so `stat`-ing it
  always fails and we never cache declarations in it.

  This is extremely problematic for projects with huge bridging headers.
  In the case where we have a single PCH import, this can bring warm code
  completion times down to about 500ms from over 2-3s, so it can provide a
  nice performance win for IDEs.

- Add a new test that performs two code-completion requests with a bridging header.
- Add some -pch-output-dir flags to existing SourceKit tests that import a bridging
  header.

rdar://problem/31198982
2017-04-04 20:44:33 -07:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Xi Ge
4fe46c0a77 [SourceKit][CursorInfo] Add two optional fields when configuring curso-infor request, key.length and key.actionable. NFC
This serves as a skeleton for future extensions on cursor info request.
2017-01-04 13:38:25 -08: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
Brian Croom
fac744067c [SourceKit] Remove dependency of SwiftLang on Core 2016-06-22 13:04:37 -04:00
Brian Croom
479584109c [SourceKit] Add Semaphore to SourceKitSupport's concurrency module
Includes a libdispatch-based implementation.
2016-06-21 13:54:41 -04:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Johan K. Jensen
fa76656c82 Remove instances of duplicated words 2015-12-03 20:00:29 +01:00
Argyrios Kyrtzidis
d19e4ae026 [SourceKit] Add license notices to all the source files. 2015-11-05 12:01:14 -08:00
Argyrios Kyrtzidis
8ff6a98a99 [sourcekit] Merge SourceKit into the Swift repo.
The code goes into its own sub-tree under 'tools' but tests go under 'test',
so that running 'check-swift' will also run all the SourceKit tests.

SourceKit is disabled on non-darwin platforms.
2015-11-05 01:09:08 -08:00