diff options
author | Maria Matejka <mq@ucw.cz> | 2018-12-27 14:26:11 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2019-02-20 22:30:54 +0100 |
commit | 4c553c5a5b40c21ba67bd82455e79678b204cd07 (patch) | |
tree | 693d5744a125dc6dd6ed42124bf3a082cbf5503a /nest/cmds.c | |
parent | 967b88d9388b3800efed45798542cd0b41f2b903 (diff) |
Filter refactoring: dropped the recursion from the interpreter
This is a major change of how the filters are interpreted. If everything
works how it should, it should not affect you unless you are hacking the
filters themselves.
Anyway, this change should make a huge improvement in the filter performance
as previous benchmarks showed that our major problem lies in the
recursion itself.
There are also some changes in nest and protocols, related mostly to
spreading const declarations throughout the whole BIRD and also to
refactored dynamic attribute definitions. The need of these came up
during the whole work and it is too difficult to split out these
not-so-related changes.
Diffstat (limited to 'nest/cmds.c')
-rw-r--r-- | nest/cmds.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nest/cmds.c b/nest/cmds.c index 0c89d20f..6daafcb3 100644 --- a/nest/cmds.c +++ b/nest/cmds.c @@ -95,8 +95,9 @@ cmd_show_memory(void) } void -cmd_eval(struct f_inst *expr) +cmd_eval(const struct f_line *expr) { + /* TODO: Return directly the string from eval */ struct f_val v; if (f_eval(expr, this_cli->parser_pool, &v) > F_RETURN) { @@ -106,6 +107,6 @@ cmd_eval(struct f_inst *expr) buffer buf; LOG_BUFFER_INIT(buf); - val_format(v, &buf); + val_format(&v, &buf); cli_msg(23, "%s", buf.start); } |