mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-09-19 11:09:05 +01:00
a4723fb2ef
`std::variant` is the last archetypal container missing in TreeBuilder-v2. The code for it isn't hugely complicated and relies on pack expansion. This change introduces a new field to the container specification: `scoped_extra`. This field allows you to write extra code that will be included within the TypeHandler in CodeGen. This means it will not have collisions with other containers, unlike the existing `extra` field. It's used here to write the recursive `getSizeType` function for `std::variant`. Tech debt is introduced here by comparing the container name to `std::variant` in CodeGen to conditionally generate some code. We've worked hard to remove references to containers in code and move them to `.toml` files. On balance, this is worth having to include the example of `std::variant`. It should be moved into a container spec field at some point, the design of which is still to be determined. Test plan: - Activated the OIL `std::variant` tests. - CI |
||
---|---|---|
.. | ||
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 |