]> git.ipfire.org Git - thirdparty/gcc.git/commit
analyzer: port pop_frame_callbacks to pub/sub
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 9 Jan 2026 20:54:16 +0000 (15:54 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 9 Jan 2026 20:54:16 +0000 (15:54 -0500)
commitbc668cf6c94a2607f280fa2447095e5f7cb81c2e
tree19ef4753b1838eb563a12c06c6744b6bbca44ba6
parentd36257a190dbe94a284f774fbf5c003abf03fc33
analyzer: port pop_frame_callbacks to pub/sub

More simplification/consolidation of some callback logic in analyzer in
favor of using the analyzer pub/sub channel.

No functional change intended.

gcc/analyzer/ChangeLog:
* common.h (struct on_frame_popped): New.
(subscriber::on_message): New vfunc for on_frame_popped.
* region-model.cc: Include "context.h" and "channels.h".
(region_model::pop_frame_callbacks): Delete.
(region_model::pop_frame): Port from notify_on_pop_frame to
using pub/sub channel.
* region-model.h (pop_frame_callback): Delete typedef.
(region_model::register_pop_frame_callback): Delete.
(region_model::pop_frame_callbacks): Delete.

gcc/testsuite/ChangeLog:
* gcc.dg/plugin/analyzer_cpython_plugin.cc
(cpython_analyzer_events_subscriber::on_message): Implement for
on_frame_popped.
(plugin_init): Drop call to
region_model::register_pop_frame_callback in favor of the above
pub/sub handler.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/common.h
gcc/analyzer/region-model.cc
gcc/analyzer/region-model.h
gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.cc