Commit Graph

6 Commits

Author SHA1 Message Date
Paolo Tranquilli
70ff401f21 Swift: replace internal swift mangler with our own
Our mangler is split in two version:
* `SwiftTrapMangler`, with the same behaviour as the previous
  `SwiftMangler`, constructing mangled names with trap label references
* `SwiftRecursiveMangler` that replaces trap label references with
  recursive calls to its own `mangle` functions, effectively rolling out
  the entire chain of references

The latter is used to create lazy trap file names. Hashing is used to
avoid excessively long filenames.
2023-05-31 09:52:20 +02:00
Paolo Tranquilli
2183d380db Swift: implement review suggestions 2023-05-30 10:30:44 +02:00
Paolo Tranquilli
146591934a Swift: clean up SwiftMangler 2023-05-02 10:45:43 +02:00
Paolo Tranquilli
0aed7d56c2 Swift: more mangling 2023-05-02 10:45:42 +02:00
Paolo Tranquilli
c8ca6057d3 Swift: mangle several new things 2023-05-02 10:45:40 +02:00
Alex Denisov
125aab8107 Swift: rework fetching and dispatching
* visiting now happens in a later stage than fetching labels. While
  fetching a list of entities to be visited is created, and then acted
  upon in actual extraction. This partially flattens the recursive
  nature of `fetchLabel` into a loop inside `SwiftVisitor::extract`.
  Recursion in `fetchLabel` will only happen on labels fetched while
  naming an entity (calling into `SwiftMangler`).
* The choice whether to name a declaration or type has been moved from
  the translators to `SwiftMangler`. Acting on this choice is contained
  in `SwiftDispatcher::createLabel`.
* The choice whether to emit a body of a declaration has been moved from
  `DeclTranslator` to the dispatcher. This choice is also contained in
  `SwiftDispatcher::createLabel`.
* The simple functionality of the `LabelStore` has been moved to the
  `SwiftDispatcher` as well.
2023-04-25 11:15:27 +02:00