mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Serialize local types
Local type declarations are saved in the source file during parsing, now serialized as decls. Some of these may be defined in DeclContexts which aren't Decls and previously weren't serialized. Create four new record kinds: * PatternBindingInitializer * DefaultArgumentInitializer * AbstractClosureExpr * TopLevelCodeDecl These new records are used to only preserve enough information for remangling in the debugger, and parental context relationships. Finally, provide a lookup API in the module to search by mangled name. With the new remangling API, the debugging lifecycle for local types should be complete. The extra LOCAL_CONTEXT record will compressed back down in a subsequent patch. Swift SVN r24739
This commit is contained in:
@@ -173,6 +173,8 @@ public:
|
||||
DeclName name, NLKind lookupKind,
|
||||
SmallVectorImpl<ValueDecl*> &results) const override;
|
||||
|
||||
virtual TypeDecl *lookupLocalType(StringRef MangledName) const override;
|
||||
|
||||
virtual OperatorDecl *lookupOperator(Identifier name,
|
||||
DeclKind fixity) const override;
|
||||
|
||||
@@ -191,6 +193,9 @@ public:
|
||||
|
||||
virtual void getTopLevelDecls(SmallVectorImpl<Decl*> &results) const override;
|
||||
|
||||
virtual void
|
||||
getLocalTypeDecls(SmallVectorImpl<TypeDecl*> &results) const override;
|
||||
|
||||
virtual void getDisplayDecls(SmallVectorImpl<Decl*> &results) const override;
|
||||
|
||||
virtual void
|
||||
|
||||
Reference in New Issue
Block a user