Ivan Krysak
cc57e57fd1
TTG: remove support for optional: true fields
...
After this commit, every non-key field is treated as if it was optional
while every key field (plus every auto-generated `Kind` field) - as if
it was required.
2025-10-13 18:33:10 +03:00
Giacomo Vercesi
5f714f9f00
tuple_tree.ts: add toString to Reference
...
Add the `toString` method to the `Reference` class. This is needed to
allow `makeDiff` to function correctly if it encounters an instanced of
the class.
2025-09-08 17:36:12 +02:00
Khaled Ismaeel
4a56c313db
Process enums separately in diff
...
Before this commit the logic was recursing upon finding
enums, which leads to incorrect behavior where `infoObject` is
`undefined`.
2025-06-25 15:40:40 +02:00
Giacomo Vercesi
6b7af19817
tuple_tree.ts: rename TypeHints to TypesMetadata
...
Rename the `TypeHints` to `TypesMetadata` (and related function
arguments) to better convey their contents.
2025-05-07 10:47:27 +02:00
Jurij Srebrnič
c9731dc722
tuple_tree.ts: remove dead code in _applyDiff
...
Remove a branch from `_applyDiff` as the conditions for it to happen are
impossible.
2025-05-07 10:47:27 +02:00
Giacomo Vercesi
5e386d2a8d
model.ts: disable key sorting
...
Disable sorting of model keys, as that worsens the readability of the
model.
2025-02-05 10:38:16 +01:00
Ivan Krysak
dfa7478685
Adopt reworked model::Type
2024-06-27 11:05:51 +02:00
Ivan Krysak
edb2d11c9a
TTG: add upcastable struct field support
2024-06-27 11:05:49 +02:00
Ivan Krysak
ac587cbb4f
Model: rename Type into TypeDefinition
2024-06-27 11:05:48 +02:00
Giacomo Vercesi
293c0c9e25
tupletree.ts: Reference.resolve is now nullable
...
Allow `Reference.resolve` to return undefined if the reference's path
does not exist on the target object.
2024-01-26 19:13:58 +01:00
Giacomo Vercesi
bc7cde4cf7
tuple_tree.ts: fix diffing for abstract types
...
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.
2023-11-03 16:30:40 +01:00
Giacomo Vercesi
27c065a54b
model.ts: implement makeDiff speedups
...
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
2023-07-21 13:19:04 +02:00
Giacomo Vercesi
3a006422d3
typescript/python model wrappers: fix structure
...
Change the way the python and typescript model wrappers handle
attributes in struct fields. Now all fields are populated and none of
the use `None`.
2023-07-21 09:34:00 +02:00
Giacomo Vercesi
406a21360a
model.ts: add offset support to MetaAddress
...
Allow the `MetaAddress` class in typescript to independently compute the
offset to another MetaAddress.
2023-07-21 09:34:00 +02:00
Giacomo Vercesi
31cd2b53f9
rcc: add codespell
...
Add codespell to the list of checks performed by
revng-check-conventions. This should reduce the amount of typos present
in the revng codebase.
2023-05-11 10:05:32 +02:00
Alessandro Di Federico
564843165b
tuple_tree.ts: refine ParsableType interface
...
Fixes an issue that was detected in recent typescript versions where the
`Parsable` interface was not fully defined.
2023-04-28 09:56:06 +02:00
Giacomo Vercesi
31bb77237f
typescript: add setElementByPath function
...
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
2023-02-07 16:54:35 +01:00
Giacomo Vercesi
a741e39f76
revng-check-conventions: introduce prettier
...
Adds the formatting tool prettier to allow formatting JS, TS, JSON,
YAML and HTML files.
2022-06-28 15:29:09 +02:00
Giacomo Vercesi
a4ca82b50b
Introduce TypeScript model generator
2022-05-09 13:37:35 +02:00