mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-09 13:14:55 +00:00
31ba8659f0
A previous change enabled running OIL tests with specific features enabled. This highlighted that pointer code generation under TreeBuilder-v2 was very broken. This change updates pointer code generation to work and enables the skipped tests. All enabled tests need `expected_json_v2` added to them due to formatting differences. Reformatted and rewrote the basic type handler that handles primitives and pointers. Removed the reliance on `features` to decide whether to generate for TreeBuilder-v2 as the intermediate features have been removed. Pointers are treated as containers with a capacity of 1 and a length of 0 if null/a cycle and 1 if followed. This holds for void pointers where, although they aren't followed, the length is still set. There were a couple of other changes needed to enable these tests on TBv2 that aren't worth their own issues and PRs, I sneaked them in here. Extra changes: - Added `Pointer` and `Reference` to TopoSorter so they generate `NameProvider` instances. It might be worth visiting the graph differently for `NameProvider` as it requires so many instances that others generators do not. Will consider that in the future. - Follow typedefs when calculating exclusive size for a type. Closes #458. Test plan: - CI - Enabled previously disabled tests. |
||
---|---|---|
.. | ||
integration | ||
ci.oid.toml | ||
CMakeLists.txt | ||
integration_entry_doStuff_arg0.oid | ||
integration_entry_doStuff_this.oid | ||
integration_entry_inc_arg0.oid | ||
integration_mttest.cpp | ||
integration_return_incN_arg0.oid | ||
integration_sleepy.cpp | ||
integration.py | ||
main.cpp | ||
mocks.h | ||
mttest.h | ||
test_add_children.cpp | ||
test_add_padding.cpp | ||
test_alignment_calc.cpp | ||
test_codegen.cpp | ||
test_compiler.cpp | ||
test_container_info.cpp | ||
test_drgn_parser.cpp | ||
test_drgn_parser.h | ||
test_enforce_compatibility.cpp | ||
test_flattener.cpp | ||
test_identify_containers.cpp | ||
test_key_capture.cpp | ||
test_name_gen.cpp | ||
test_node_tracker.cpp | ||
test_parser.cpp | ||
test_prune.cpp | ||
test_remove_members.cpp | ||
test_remove_top_level_pointer.cpp | ||
test_topo_sorter.cpp | ||
test_type_identifier.cpp | ||
type_graph_utils.cpp | ||
type_graph_utils.h | ||
TypeGraphParser.cpp | ||
TypeGraphParser.h |