Khaled Ismaeel
53a5ff07cf
Remove embedded TUPLE-TREE-YAML
2025-04-30 15:08:45 +02:00
Khaled Ismaeel
63469c9cd6
Use unified YAML schemas in the build process
...
In this commit we instruct the build system to use the unified schema
files instead of collecting the `TUPLE-TREE-YAML` comments.
The fixes to C++ files are necessary because they depend on the order
of the fields in the schema, which was changed.
2025-04-30 15:08:45 +02:00
Khaled Ismaeel
f384b10435
Check schemas into the codebase
...
These schema files are currently generated at build time by
collecting various TUPLE-TREE-YAML comments using the
`extract_yaml.py` script. In this commit we move them to the codebase
but we don't use them yet, this will be done at a later commit for
the sake of readability.
2025-04-30 15:08:40 +02:00
Giacomo Vercesi
9ff471409e
Remove some asserts from YAMLTraits
...
More soft-fails instead.
2025-04-28 12:58:27 +02:00
Ivan Krysak
1622bb91a1
Introduce automatic names for dynamic functions
2025-04-24 13:22:14 +02:00
Ivan Krysak
1bce76f511
Bring name mangling out into a support helper
2025-04-24 13:22:14 +02:00
Giacomo Vercesi
0ac78dddba
Fix codespell errors
...
Fix erros detected by the new version of `codespell`.
2025-04-24 13:22:14 +02:00
Pietro Fezzardi
33197fb937
LocalVariables: fix VariableTypeMDName string
...
Before this commit it was set to "revng.stack_type" for a silly
copy-paste error.
2025-04-22 15:24:30 +02:00
Ivan Krysak
79964eac74
Avoid ' misuse in error messages and comments
2025-04-17 16:41:21 +02:00
Ivan Krysak
83324fcf07
NameBuilder: improve documentation
2025-04-17 11:19:17 +03:00
Ivan Krysak
76ed261375
Use revng_undefined_ instead of init_
...
Current `init_` prefix used to set the default values of SCVs
is very common in typical code, hence it would cause a lot of
collisions.
2025-04-17 11:19:17 +03:00
Ivan Krysak
c6e38cd485
Return to using constant name builders
...
Because of how name builders used to lazy gather namespaces on the first
requested name, the objects were self mutating. As such only non-const
references could be used to pass them around.
Since that is no longer the case, this restores most of lost const
qualifiers.
2025-04-17 11:19:17 +03:00
Ivan Krysak
48a7822923
FunctionTags: adopt helper registry
2025-04-17 11:19:17 +03:00
Ivan Krysak
24b96e4480
IRHelpers: introduce a const callers helper
2025-04-17 11:19:17 +03:00
Ivan Krysak
7b02ab0e44
getJTReasons: Work on const instructions
2025-04-17 11:19:17 +03:00
Ivan Krysak
76a2bffc94
Introduce an IR helper registry
2025-04-17 11:19:17 +03:00
Ivan Krysak
6a6b34b831
Introduce a general static registry helper
2025-04-17 11:19:17 +03:00
Ivan Krysak
aa15d8ca21
Standardize abort-like function usage
2025-04-17 11:19:17 +03:00
Ivan Krysak
154287b5d5
init_local_sp: drop leading _
2025-04-17 11:19:17 +03:00
Ivan Krysak
57b5eb7f98
NameBuilder: allow different name checkers
2025-04-17 11:19:17 +03:00
Ivan Krysak
47a1869695
tests: ensure architecture is always available
2025-04-17 11:19:17 +03:00
Ivan Krysak
93e44460bf
ptml::CTypeBuilder: drop getPlainTypeName
2025-04-17 11:19:17 +03:00
Ivan Krysak
7d409ab4a7
KeyedObjectContainer: support llvm::StringRef
2025-04-17 11:19:17 +03:00
Ivan Krysak
acb7d595ef
Model: introduce a primitive typedef removal pass
2025-04-17 11:19:17 +03:00
Ivan Krysak
c9ade8d458
NameBuilder: report reason when renaming something
2025-04-17 11:19:17 +03:00
Ivan Krysak
7b04cb99ae
ptml::Annotations: introduce isMacro helper
2025-04-17 11:19:17 +03:00
Ivan Krysak
cf78106d54
Model: introduce a name deduplication pass
2025-04-17 11:19:17 +03:00
Ivan Krysak
dce5c1a02c
NamingConfiguration: pull more prefixes inside
...
Unify additional values that used to be hardcoded in the old backend
under the same naming configuration root.
2025-04-17 11:19:17 +03:00
Ivan Krysak
af79a289d8
NamingConfiguration: add a new option
...
It's `ReserveNamesStartingWithUnderscore`.
2025-04-17 11:19:17 +03:00
Ivan Krysak
57ac85d7a0
NameBuilder: introduce warning method
2025-04-17 11:19:17 +03:00
Ivan Krysak
f070f1f1e1
Model: sunset double name system
2025-04-17 11:19:17 +03:00
Ivan Krysak
25790b5a78
NameBuilder: change automatic segment name
...
Use index within the binary instead of address in order to make these
shorter.
2025-04-15 16:35:42 +03:00
Ivan Krysak
645cf7fc2e
NameBuilder: sunset deduplication
...
This reworks NameBuilder to ease the transition to the system where
the model will be guaranteed to never contain any name collisions, both
between user-specified names and the automatic ones.
2025-04-15 16:35:42 +03:00
Ivan Krysak
45cc80cb68
PrimitiveType: introduce isCName helper
2025-04-15 16:35:42 +03:00
Ivan Krysak
cbddbaa462
Model: add a way to iterate over all the registers
2025-04-15 16:35:42 +03:00
Ivan Krysak
e10199ee1c
TypeDefinitionKind: introduce a prefix consumer
2025-04-15 16:35:42 +03:00
Ivan Krysak
795a84dfe6
MetaAddressType: introduce a prefix consumer
2025-04-15 16:35:42 +03:00
Ivan Krysak
2e85653873
MetaAddressType: introduce Count
2025-04-15 16:35:42 +03:00
Ivan Krysak
6ea75f02b3
Model: switch to the new namespace verifier
2025-04-15 16:35:42 +03:00
Ivan Krysak
3ff5b2cd3a
Support: introduce unwrapError
2025-04-15 16:35:42 +03:00
Ivan Krysak
6710dacfed
Model: give path helpers a home
2025-04-15 16:35:42 +03:00
Ivan Krysak
b354f1b75b
TupleTree: allow visiting upcastable pointers
2025-04-15 16:35:42 +03:00
Ivan Krysak
6c6cf04d11
STLExtras: rename is_contained_if into any_of
...
This improves consistency with the names llvm uses.
2025-04-15 16:35:42 +03:00
Ivan Krysak
0bd174c07f
STLExtras: fix an ambiguous find_if call
2025-04-15 16:35:42 +03:00
Ivan Krysak
169383daa8
MetaAddress: introduce toIdentifier() method
...
It's equivalent to the existing `toString()` except for the fact that
it uses an identifier-friendly separator (`_`).
2025-04-15 16:35:42 +03:00
Ivan Krysak
3edb6cbb9b
Minor improvements
2025-04-15 16:35:42 +03:00
Alessandro Di Federico
c5c657d11b
Lift: increase determinism
2025-04-15 15:31:10 +02:00
Giacomo Vercesi
e6fcca3dc6
TupleTreeContainer: fix infinite recursion
...
Fix an infinite recursion caused by renaming the `ContainerBase::load`
function to `ContainerBase::loadImpl`.
2025-04-07 10:35:20 +02:00
Giacomo Vercesi
11f1e532c6
Implement dirty bit on Container
...
Add a `Dirty` boolean to the `ContainerBase` class. This will be set to
true when the container mutates itself (e.g. remove, mergeBack, clear).
The dirty bit is reset when running `PipelineManager.store`.
2025-04-03 15:59:18 +02:00
Giacomo Vercesi
f740badd68
PipelineManager: drop storeContext
...
The `storeContext` function was a misguided attempt to performance
optimization. Without storing all the containers and the invalidation
metadata the resume directory would be corrupt by just storing the
context.
2025-04-03 15:59:18 +02:00