Commit Graph

17 Commits

Author SHA1 Message Date
Rintaro Ishizaki
66aba1bc67 [ASTGen] Add Encoder/Decoder implementation backed by llvm::json::Value
Preparation for a future use.
2023-02-15 11:55:16 -08:00
Egor Zhdan
94ec683ba5 Revert "Revert "[cxx-interop][SwiftCompilerSources] Use C++ enums directly from Swift""
This reverts commit 69431f00
2022-10-18 18:55:57 +01:00
zoecarver
80200ec23a Add Swift-side infrastructure for ASTGen.
(cherry picked from commit 7bc67c9f12)
2022-10-07 10:18:40 -07:00
eeckstein
69431f00e8 Revert "[cxx-interop][SwiftCompilerSources] Use C++ enums directly from Swift" 2022-09-22 11:45:41 +02:00
Egor Zhdan
3f1a30c52a [cxx-interop][SwiftCompilerSources] Use swift::SILAccessKind instead of BridgedAccessKind
rdar://83361087
2022-09-20 12:03:48 +01:00
Egor Zhdan
78cdf5eca6 [cxx-interop][SwiftCompilerSources] Use swift::BuiltinValueKind instead of BridgedBuiltinID
rdar://83361087
2022-09-20 12:03:48 +01:00
Egor Zhdan
710443ae6f [cxx-interop][SwiftCompilerSources] Use swift::SubstitutionMap instead of BridgedSubstitutionMap
rdar://83361087
2022-09-15 14:18:31 +01:00
Egor Zhdan
3dc584e948 [cxx-interop][SwiftCompilerSources] Use swift::SILDebugLocation instead of BridgedLocation
rdar://83361087
2022-09-15 11:36:29 +01:00
Egor Zhdan
dedfc21d6a [cxx-interop][SwiftCompilerSources] Explicitly list used headers in the modulemap
This might help to solve a flaky CI issue, and it's probably a good idea to do that anyway.
2022-07-28 18:51:04 +01:00
Egor Zhdan
0e2d438c5b [cxx-interop][SwiftCompilerSources] Use llvm::StringRef instead of BridgedStringRef
rdar://83361000
2022-07-21 16:32:16 +01:00
Egor Zhdan
1ae44e77a5 [cxx-interop][SwiftCompilerSources] Use DiagnosticInfo::FixIt instead of BridgedDiagnosticFixIt
This removes some of the bridging code and replaces it with C++ calls.

rdar://83361087
2022-07-12 16:54:16 +01:00
Richard Wei
dd7610f2d2 Rename _MatchingEngine module to _RegexParser (#42081)
As the _MatchingEngine module no longer contains the matching engine, this patch renames this module to describe its role more accurately. Because this module primarily contains the AST and the regex parsing logic, I propose we rename it to "_RegexParser".

Also renames the ExperimentalRegex module in SwiftCompilerSources to _RegexParser for consistency. This would prevent errors if sources in _RegexParser used qualified lookup with the module name.
2022-03-31 11:13:18 -07:00
Rintaro Ishizaki
4d9b65d961 [SwiftCompiler] Add DiagnosticEngine bridging
* 'SourceLoc' and 'CharSourceRange' bridging in Basic
* New 'AST' bridging. 'DiagID', 'DiagnosticArgument', 'DiagnosticFixIt',
  and 'DiagnosticEngine'
2022-02-23 15:57:33 -08:00
Rintaro Ishizaki
7486cd1c21 [SwiftCompiler] Move common bridging facilities to 'Basic'
A preparation for AST/DiagnosticEngine bridging
2022-02-20 22:06:39 -08:00
Michael Ilseman
2740e2707c Experimental Regex Strawperson (use Swift in the parser) (#40117)
[regex] Use Swift in the parser

Add in a strawperson use of Swift by the parser, for
future regex support.
2021-11-14 07:11:47 -07:00
Erik Eckstein
81f5e2f467 libswift: Infrastructure to call libswift function passes from the SILOptimizer's PassManager
With the macro SWIFT_FUNCTION_PASS a new libswift function pass can be defined in Passes.def.
The SWIFT_FUNCTION_PASS_WITH_LEGACY is similar, but it allows to keep an original C++ “legacy” implementation of the pass, which is used if the compiler is not built with libswift.
2021-06-09 11:30:59 +02:00
Erik Eckstein
8080465e77 libswift: basic SIL and SIL bridging
This is the initial version of a buildable SIL definition in libswift.
It defines an initial set of SIL classes, like Function, BasicBlock, Instruction, Argument, and a few instruction classes.
The interface between C++ and SIL is a bridging layer, implemented in C.
It contains all the required bridging data structures used to access various SIL data structures.
2021-06-09 11:28:57 +02:00