Giacomo Vercesi
bacc059c49
Add model.ts roundtrip tests
2022-05-04 11:45:02 +02:00
Giacomo Vercesi
4b7c5b7d87
Generate model.ts.tgz installable package
2022-05-04 11:45:02 +02:00
Giacomo Vercesi
153f0288ef
Generate model.ts via CMake
2022-05-04 11:45:02 +02:00
Giacomo Vercesi
9f146d622b
Typescript model generator
2022-05-04 11:45:02 +02:00
Giacomo Vercesi
6e291c8a9d
Add node_modules generation to CMake
2022-05-04 11:45:02 +02:00
Giacomo Vercesi
ee5834e897
Convert python_type to more generic type_info
2022-05-04 11:19:39 +02:00
Giacomo Vercesi
d4d7d44d3d
ABI.h: change model doc fields to multiline
2022-05-04 11:19:39 +02:00
Alessandro Di Federico
e6f6010cfd
Build with -fvisibility-inlines-hidden
...
`-fvisibility-inlines-hidden` ensures that each dynamic library uses its
own version of each `inline` function.
This reduces the number of exported symbols and resolves issues related
to picking a version of a weak symbol that has already been deleted upon
`dlclose`.
The downside of this flag is that the address of `inline` functions can
be different across different libraries. This commit drops certain
assertions that were relying on this behavior.
2022-04-29 16:40:24 +02:00
Alessandro Di Federico
13bf5a7171
Merge branch 'feature/resourcefinder-use-self-maps'
2022-04-28 22:19:01 +02:00
Giacomo Vercesi
168eab6cc5
Use /proc/self/maps to determine root
...
Use the path of the mapped librevngSupport.so to determine the root
directory.
2022-04-28 22:18:08 +02:00
Giacomo Vercesi
91067a8886
getCurrentExecutableFullPath: assert on error
...
`getCurrentExecutableFullPath` now aborts if it cannot determine the
real path instead of returning an empty string.
2022-04-28 22:10:14 +02:00
Giacomo Vercesi
d109a68bc4
Remove BUILD_PATH
...
It has not been relevant for a long time.
2022-04-28 22:10:02 +02:00
Alessandro Di Federico
fe9b125aa4
Merge branch 'feature/revng-check-conventions-fix'
2022-04-28 09:47:49 +02:00
Giacomo Vercesi
23362444b8
check-conventions: improve file list generation
...
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.
2022-04-28 09:46:10 +02:00
Giacomo Vercesi
7c64831835
revng-check-conventions: install configurations
...
Fix bug in revng-check-conventions that caused config files to not
be present in the install directory and to not be looked for if run
from there.
2022-04-28 09:45:52 +02:00
Alessandro Di Federico
e0dac4e27d
Merge branch 'feature/string-map-container-usability'
2022-04-28 08:32:40 +02:00
Pietro Fezzardi
e9470d031d
Add std::map-like methods to StringMapContainer
2022-04-27 17:40:21 +02:00
Pietro Fezzardi
de0398754d
Add makeStringMapContainerFactory
2022-04-27 17:09:28 +02:00
Pietro Fezzardi
da44302bba
Fix StringMapContainer::remove on isAll target
...
Before this commit, the container did not properly remove everything
when removing a wildcard * target.
2022-04-27 17:08:13 +02:00
Alessandro Di Federico
72d0c5776f
Merge branch 'feature/python-api-graphql'
2022-04-26 16:08:07 +02:00
Giacomo Vercesi
b9794b84bb
revng.daemon: introduce tests
...
Add end-to-end tests checking that every GraphQL endpoint is properly
working and returning the expected result
2022-04-26 15:59:35 +02:00
Giacomo Vercesi
4f7908753e
Introduce the revng-daemon command
2022-04-26 15:59:35 +02:00
Giacomo Vercesi
172faebacf
Introduce the revng.daemon GraphQL API
...
This commit introduces the `revng.daemon` Python module, a Flask-powered
web application that exposes the functionality from `revng.api` across a
GraphQL API
2022-04-26 15:59:35 +02:00
Giacomo Vercesi
7231ee607a
Introduce PipelineC wrapper for Python
...
Add the revng.api module: a wrapper around the PipelineC API.
2022-04-26 15:59:35 +02:00
Giacomo Vercesi
4445a841b2
revng-pipeline: introduce artifacts
...
Add a new key to a Step, named Artifacts. If present, it indicates that
the step has a "default" Kind and Container that can be easily retrieved
without explicitly specifying either when producing an artifact.
2022-04-26 15:59:35 +02:00
Giacomo Vercesi
99ae9c98e0
Add MIMEType to container
...
Add additional field MIMEType to Container.
This allows API consumers to know at runtime how to treat the data
within a container without any prior knowledge.
2022-04-26 15:59:35 +02:00
Giacomo Vercesi
f4d63759de
PipelineC: expose kinds, ranks and more
...
Adds missing API functions to PipelineC that will be needed by the
GraphQL API:
* Kinds enumeration
* Get Rank and parent of a Kind
* Enumerate and inspect Ranks
* Get a Step's parent
Included are some docstring fixes
2022-04-26 15:05:30 +02:00
Giacomo Vercesi
87b09fd401
PipelineC: Refactor headers
...
Split PipelineC.h in 4 separate header, this is due to cffi not
being able to interpret `#ifdef`s so C++ declarations need to be
in a separate file.
2022-04-26 15:05:30 +02:00
Giacomo Vercesi
e5c9141ccc
Refactor revng.cli.support
...
* Removed shadowed `relative` function
* Clean up imports
* Add type hints to functions
* Use Path where possible
2022-04-26 15:05:30 +02:00
Giacomo Vercesi
b90773b642
Move librevngRecompile to analyses
2022-04-26 15:05:30 +02:00
Giacomo Vercesi
a831fa8e74
ContainerSet: add isContainerRegistered
...
This function allows to check if a container is registered,
irrespective of its initialization status
2022-04-26 15:05:30 +02:00
Filippo Cremonese
1bab3d8137
PipelineC: fix returning reference to local
...
'PathComponents` was copied on the stack by the assignment and then a
pointer to it is returned by `c_str`, leading to a use-after-free since
it is freed when going out of scope
2022-04-26 15:05:30 +02:00
Filippo Cremonese
19ff90e499
PipelineC: fix off-by-! in LoadLibraryPermanently
2022-04-26 15:05:30 +02:00
Filippo Cremonese
1af425c730
Minor changes
2022-04-26 15:05:30 +02:00
Alessandro Di Federico
3cb0100976
Merge branch 'feature/string-map-container'
2022-04-21 14:46:18 +02:00
Pietro Fezzardi
0ff8a6933b
Add StringMapContainer
2022-04-20 17:39:59 +02:00
Pietro Fezzardi
d70eec060c
Fix test implementation of mergeBackImpl
...
The previous implementation worked like `insert`, while the proper
semantics is `insert_or_assign`
2022-04-20 17:39:59 +02:00
Alvise de Faveri
a3110c0b59
Add QualifiedType::is(TypeKind)
2022-04-20 11:25:46 +02:00
Alessandro Di Federico
58c8f96317
Merge branch 'feature/revng-check-conventions-improvements'
2022-04-20 09:57:31 +02:00
Giacomo Vercesi
bbce0b33e5
revng-check-conventions: introduce isort
2022-04-20 09:57:08 +02:00
Giacomo Vercesi
46821cee5f
revng-check-conventions: introduce mypy
2022-04-20 09:57:01 +02:00
Giacomo Vercesi
31a836e48c
revng-check-conventions: introduce flake8
2022-04-20 09:56:44 +02:00
Giacomo Vercesi
daa3388389
Add commit range option to revng-check-conventions
...
This commit also introduces `--HEAD` which is useful for `git rebase -x`
checks.
2022-04-20 09:56:06 +02:00
Giacomo Vercesi
8758c7fcc3
Print header for run_revng_checks
2022-04-20 09:55:41 +02:00
Giacomo Vercesi
d81dc49809
revng-check-conventions: license check
2022-04-20 09:55:18 +02:00
Giacomo Vercesi
52a5c700e1
revng-check-conventions: add shellcheck
...
Add bash script checks with shellcheck + `set` rule.
Also, all existing bash scripts have been fixed.
2022-04-20 09:54:51 +02:00
Giacomo Vercesi
56b004bfd2
Improve revng-check-conventions
...
* Only check dirty files by default (--all checks all files).
* Better file identification
* Various bash improvements
* Report more explicative errors
2022-04-20 09:53:19 +02:00
Alessandro Di Federico
427a3ca30e
Merge branch 'feature/enforce-abi-deductions'
2022-04-15 18:52:12 +02:00
Antonio Frighetto
ab4bdf398d
EFA: leverage ABI-specific layer
...
Architecture-agnostic results provided by EarlyFunctionAnalysis
are refined through an ABI-specific layer.
2022-04-15 18:25:11 +02:00
Antonio Frighetto
7235f69a99
EFA: add final results to ABIAnalysis::dump
...
Output `FinalReturnValuesRegisters` results for aiding debugging tasks.
2022-04-15 18:25:11 +02:00