mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] Use cached deserialized decl in getOpaqueResultTypeDecl
Mangling and looking up the opaque result type decl
for serialized decls is a fairly expensive
operation. Instead, fallthrough to the request
which will have a cached value set by deserialization.
This shaves ~30ms off the cached completion for:
```swift
import SwiftUI
struct V: View {
var body: some View {
Table(#^CC^#
}
}
```
This commit is contained in:
@@ -2758,6 +2758,10 @@ private:
|
||||
/// output a null pointer.
|
||||
unsigned noDynamicallyReplacedDecl : 1;
|
||||
|
||||
/// Whether the OpaqueResultTypeRequest request was evaluated and produced
|
||||
/// a null pointer.
|
||||
unsigned noOpaqueResultType : 1;
|
||||
|
||||
/// Whether the "isFinal" bit has been computed yet.
|
||||
unsigned isFinalComputed : 1;
|
||||
|
||||
@@ -2785,7 +2789,7 @@ private:
|
||||
friend class InterfaceTypeRequest;
|
||||
friend class CheckRedeclarationRequest;
|
||||
friend class ActorIsolationRequest;
|
||||
friend class DynamicallyReplacedDeclRequest;
|
||||
friend class OpaqueResultTypeRequest;
|
||||
friend class ApplyAccessNoteRequest;
|
||||
|
||||
friend class Decl;
|
||||
|
||||
Reference in New Issue
Block a user