]> git.ipfire.org Git - thirdparty/bird.git/commit
Filter: Implement multiple dispatch for methods
authorOndrej Zajicek <santiago@crfreenet.org>
Mon, 3 Jul 2023 15:00:58 +0000 (17:00 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 12 Sep 2023 14:31:52 +0000 (16:31 +0200)
commitcc1099a04169b768cb4803686ee20423a6d3fede
tree2b13ebf140425dce022bab409d5f25ee496311e3
parentc696e3cb8e53229a438a8509a05e9d0ff27b8b4a
Filter: Implement multiple dispatch for methods

 - Extend method descriptors with type signature
 - Daisy chain method descriptors for the same symbol
 - Dispatch methods for same symbol based on type signature
 - Split add/delete/filter operations to multiple methods
 - Replace ad-hoc dispatch of old-style syntax with scope-based dispatch
 - Also change method->arg_num to count initial arg

It still needs some improvements, like better handling of untyped
expressions and better error reporting when no dispatch can be done.

The multiple dispatch could also be extended to dispatch regular
function-like expressions in a uniform way.
conf/cf-lex.l
filter/config.Y
filter/data.h
filter/decl.m4
filter/f-inst.c
filter/f-inst.h
filter/f-util.c