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.
Non-composite keys are single-element tuples, therefore they don't
directly inherit the YAML serialization of their only element.
This commit enables building `ScalarTraits` for keys in all cases.
Add a specialized list class to be used in the model. This will do
runtime instance checking to make sure that list-like fields in the
model only contain object of the correct type.
Fix the constructor for required sequence fields, now they use a
`default_factory` with `list` to construct an empty list when none is
passed to the constructor.
Implement a constructor override for model classes that checks that the
constructor does not have positional arguments passed to it. This can
be dropped post-3.10 since it is implemented natively by kw_only.
Before this commit, clang-format somw clang format errors were
discarded.
This commit fixes the problems, in two ways:
- passes -Werror to clang-format, to make it stricter when reporting
errors
- drops a wrong || true when `--force-format` is passed resulting in bad
error codes
Improves the generation of the file list by using git diff-files and
parsing the output directly.
Also:
* The list now only includes files that exist in the working directory
(so no existence checks are needed).
* Added `--cached` option to check staged files only.
* Fix some missing local variable declarations.