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
```
In some of the descriptions of Model fields/methods there are specicial
doxygen commands, such as `\sa`. These show up in python in docstrings
unescaped, causing warnings such as `SyntaxWarning: invalid escape
sequence '\s'`. In order to avoid these, replace the `\` with `\\` which
escapes to a `\`.
Replace the stub implementation of invalidation with the proper
implementation. A ReadPathCache is added to each global so that it can
keep tracks of what target are associated to which read paths.
The previous `makeDiff` implementation did account nor have enough
information to be able to upcast abstract types. This commit introduces
the necessary information for this to happen.
Allow the serialization and deserialization of individual model objects,
this is useful when these need to be exchanged individually across an
IPC boundary.
Make `makeDiff` run faster by:
* Utilizing the information exposed by TYPE_HINTS which avoids having
expensive runtime checks
* Optimize some of the hot parts of the codebase to lower run times
Add support for tracing onto the PipelineC. This is done by:
1. Creating wrapper functions for each PipelineC function with the
script in `scripts/PipelineC_add_tracing.py`. These will call a
special function called `wrap` which will ultimately call a method
with a `_` prepended to the name
2. Conversion of all PipelineC methods in `PipelineC.cpp` to `static`
and their rename with a `_` in front, in order for them to work with
the wrapper function in (1)
3. Generation of 2 additional include files, one for types and one for
functions, to be used by users of tracing files in order to have
introspection.
These steps allow the creation of a trace file with the use of the
`REVNG_C_API_TRACE_PATH` environment variable. The traces can then be
used in conjunction with the `revng trace run` and `revng trace
inspect` commands.
add the setElementByPath function which allows setting a value in a
tuple tree give a tuple tree path to apply it to
Also apply some small fixes to the `tuple_tree.ts` codebase
This commit reduces build times by introducing a type-erasure layer when
performing a visit on TupleTrees. Basically instead of propagating the
type of the visitor along all of the template castle, we wrap the
visitor into a virtual class with one method for each possible type in
the TupleTree.
This enables a single instatiation of visit algorithm.