Commit Graph

6113 Commits

Author SHA1 Message Date
Pietro Fezzardi d72139357f Add DecompileToDirectoryPipe
This pipe decompiles all the C code in a single directory, packaged up
as a .tar.gz file.
2024-06-27 17:26:18 -04:00
Pietro Fezzardi 8a95a0b9c9 HelpersToHeader: enable printing plain C 2024-06-27 17:14:28 -04:00
Pietro Fezzardi 2b9bcc0260 Backend: enable decompiling as plain C 2024-06-27 17:14:28 -04:00
Pietro Fezzardi a12b621832 Add CleanupIRPass 2024-06-27 17:14:28 -04:00
Pietro Fezzardi 7fa7b3cbe2 PTMLIndentedOstream: honor GenerateTagLessPTML
Before this commit PTMLIndentOstream was still emitting tag around
indentation, even when GenerateTagLessPTML was true.
This commit fixes the problem.
2024-06-27 22:10:01 +02:00
Pietro Fezzardi a1bc9b10f4 Add emit-recompilable-archive artifact to doc 2024-06-27 22:10:01 +02:00
Alessandro Di Federico e7c4952377 Add cleanup-ir to docs 2024-06-27 22:10:01 +02:00
Alessandro Di Federico 14db4fd67f Merge branch 'feature/drop-qualifiers' 2024-06-27 11:08:21 +02:00
Alessandro Di Federico f3b28c6cb5 Merge branch 'feature/drop-qualifiers' 2024-06-27 11:07:31 +02:00
Ivan Krysak 95cfa4785f MakeModelCastPass: remove an obsolete if branch 2024-06-27 11:07:02 +02:00
Ivan Krysak 74f56bcd93 Introduce a broken debug info removal pass 2024-06-27 11:07:02 +02:00
Ivan Krysak 31edf40695 ImplicitModelCastPass: better constness handling 2024-06-27 11:07:02 +02:00
Ivan Krysak 5ed120cdc9 ImplicitModelCastPass: extend logging 2024-06-27 11:07:02 +02:00
Ivan Krysak 185fc68097 PTML: fix the direct array data usage 2024-06-27 11:07:02 +02:00
Ivan Krysak aed53c943c linked-lists: re-enable compute return value 2024-06-27 11:07:02 +02:00
Ivan Krysak 0542be1b23 Add an array emission test 2024-06-27 11:07:02 +02:00
Ivan Krysak 94a0ad6b93 Adopt reworked model::Type 2024-06-27 11:07:01 +02:00
Ivan Krysak 504928d886 Minor improvements 2024-06-27 11:07:01 +02:00
Ivan Krysak c2b4fb70bb Model: rename TypePath to DefinitionReference 2024-06-27 11:07:01 +02:00
Ivan Krysak 3705906074 Model: rename Type into TypeDefinition 2024-06-27 11:07:01 +02:00
Ivan Krysak 5f570b99fa Fix a boost exception not found compilation error 2024-06-27 11:06:11 +02:00
Ivan Krysak b900e36a68 CommonTypeMethods: introduce isAggregate 2024-06-27 11:05:52 +02:00
Ivan Krysak 0aa2ae7f08 Pipes: introduce a primitive rank 2024-06-27 11:05:52 +02:00
Ivan Krysak cd2fdafc45 TupleTree: never assign root directly
This prevented expected cache invalidation when a new root was
assigned.
2024-06-27 11:05:52 +02:00
Ivan Krysak e52dd97937 TypeSystemPrinter: improve formatting
- change the font of the emitted graph to `Courier`, which is the only
  monospace font graphviz guarantees to support
- tweak color of the union definitions to be slightly lighter (so that
  it doesn't clash as much with the other colors used)
- change the color of all the "other" nodes (like typedef) from white
  to grey, so that they are visible on light backgrounds.
- leave a todo about `buildFieldName` being obsolete.
2024-06-27 11:05:52 +02:00
Ivan Krysak db6254c50e rcc: treat *.inc as c plus plus files 2024-06-27 11:05:52 +02:00
Ivan Krysak b72e2fd87b Model: allow omission of void size 2024-06-27 11:05:52 +02:00
Ivan Krysak 9a3086694b UpcastablePointer: do not crash on empty print 2024-06-27 11:05:52 +02:00
Ivan Krysak fbe1416aa2 ConstexprString: add operator* 2024-06-27 11:05:52 +02:00
Ivan Krysak 4a2db0ba4f UpcastablePointer: streamline empty behavior 2024-06-27 11:05:52 +02:00
Ivan Krysak 3eb4445c29 RegisterStateDeduction: fix heap-buffer-overflow 2024-06-27 11:05:52 +02:00
Ivan Krysak a2aa805e41 FilteredGraphTraits: fix stack-use-after-scope 2024-06-27 11:05:52 +02:00
Ivan Krysak cd36ef1963 Update the docs 2024-06-27 11:05:52 +02:00
Ivan Krysak 2ae19ef30a DynamicFunction: ban / in the name 2024-06-27 11:05:51 +02:00
Ivan Krysak 823e561806 TTG: rework polymorphic serialization
For now, the only serialization trait we were verifying
a polymorphic TTG type to have was the wrong (the one
that only printed base class's fields).

This commit explicitly disables said serializer and
ensures it's never used.

Here's an illustration of the impact of the changes:
```
model::UpcastableType MyType = getTypeFromSomewhere();
model::Type &View = *MyType;
model::PointerType &Pointer = MyType->asPointer();

serialize(MyType); // Good
serialize(Pointer); // Good
serialize(View); // new: explicit error
                 // old: only print base type's fields
```
2024-06-27 11:05:51 +02:00
Ivan Krysak 3c974fea7c Model: make purge-invalid-types softer 2024-06-27 11:05:51 +02:00
Ivan Krysak 42c1ea30f0 Allow deserialize to be called on non-root types 2024-06-27 11:05:51 +02:00
Ivan Krysak ffea5d9d4a TupleTreeReference: evict cache on setting root 2024-06-27 11:05:51 +02:00
Ivan Krysak 150d992368 Pipes: rename Type rank into TypeDefinition 2024-06-27 11:05:51 +02:00
Ivan Krysak 51208789a0 Rename ThePTMLBuilder into just B 2024-06-27 11:05:51 +02:00
Ivan Krysak 776a5cdc52 Model: move path data away from the header 2024-06-27 11:05:51 +02:00
Ivan Krysak 52aa0b5942 Model: introduce filters 2024-06-27 11:05:51 +02:00
Ivan Krysak 2fbb06f642 ABI-tests: remove an obsolete check
The new `prepare-tested-model.yml` script takes care of it.
2024-06-27 11:05:51 +02:00
Ivan Krysak f3c020ffb3 EnforceABI: ensure every function has a prototype 2024-06-27 11:05:51 +02:00
Ivan Krysak dfa7478685 Adopt reworked model::Type 2024-06-27 11:05:51 +02:00
Ivan Krysak f2d12ec94a Model: fix metadata helpers
Before now, when called on an non-supported type, they were just
silently doing nothing.

Also, they now correctly handle const inputs.
2024-06-27 11:05:51 +02:00
Ivan Krysak 9e0f0f72f5 RecursiveCoroutine: add operator! 2024-06-27 11:05:51 +02:00
Ivan Krysak e2e95721cc UpcastablePointer: add a new copy constructor 2024-06-27 11:05:51 +02:00
Ivan Krysak 3c64d9b6c8 Concepts: introduce ConstPtrIfConst 2024-06-27 11:05:51 +02:00
Ivan Krysak e268b854cc Concepts: introduce NonBaseDerived 2024-06-27 11:05:50 +02:00