summaryrefslogtreecommitdiff
path: root/filter/f-inst.c
diff options
context:
space:
mode:
authorJan Maria Matejka <mq@ucw.cz>2018-12-17 15:00:01 +0100
committerMaria Matejka <mq@ucw.cz>2019-02-20 22:30:54 +0100
commitfc8df41ec6cd5e6e3d53036a97dc7219dbbade5e (patch)
tree2da45d5bf3bd424e2bd8bb23482592fcba8fa2aa /filter/f-inst.c
parent7afa1438866fa94454ba133608b6877171f71d37 (diff)
Filter refactoring: The values are now saved on a custom stack.
This shall help with performance.
Diffstat (limited to 'filter/f-inst.c')
-rw-r--r--filter/f-inst.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/filter/f-inst.c b/filter/f-inst.c
index 814e026d..41cace61 100644
--- a/filter/f-inst.c
+++ b/filter/f-inst.c
@@ -121,15 +121,14 @@
while (tt) {
*vv = lp_alloc(fs->pool, sizeof(struct f_path_mask));
if (tt->kind == PM_ASN_EXPR) {
- struct f_val xres;
- INTERPRET(xres, (struct f_inst *) tt->val);
+ INTERPRET((struct f_inst *) tt->val, 0);
(*vv)->kind = PM_ASN;
- if (xres.type != T_INT) {
+ if (res.type != T_INT) {
runtime( "Error resolving path mask template: value not an integer" );
return F_ERROR;
}
- (*vv)->val = xres.val.i;
+ (*vv)->val = res.val.i;
} else {
**vv = *tt;
}
@@ -659,7 +658,7 @@
return F_RETURN;
case FI_CALL:
ARG_ANY(1);
- fret = interpret(fs, what->a2.p, &res);
+ fret = interpret(fs, what->a2.p);
if (fret > F_RETURN)
return fret;
break;
@@ -681,7 +680,9 @@
}
/* It is actually possible to have t->data NULL */
- INTERPRET(res, t->data);
+ fret = interpret(fs, t->data);
+ if (fret >= F_RETURN)
+ return fret;
}
break;
case FI_IP_MASK: /* IP.MASK(val) */