/* Push the body on stack */
LINEX(sym->function);
+ curline.vbase = curline.ventry;
curline.emask |= FE_RETURN;
- /* Before this instruction was called, there was the T_VOID
- * automatic return value pushed on value stack and also
- * sym->function->args function arguments. Setting the
- * vbase to point to first argument. */
- ASSERT(curline.ventry >= sym->function->args);
- curline.ventry -= sym->function->args;
- curline.vbase = curline.ventry;
+ /* Arguments on stack */
+ fstk->vcnt += sym->function->args;
/* Storage for local variables */
+ f_vcnt_check_overflow(sym->function->vars);
memset(&(fstk->vstk[fstk->vcnt]), 0, sizeof(struct f_val) * sym->function->vars);
fstk->vcnt += sym->function->vars;
}
u32 as = get_as(p);
int match;
- if (set)
+ if (set->type == T_SET)
{
- struct f_val v = {T_INT, .val.i = as};
+ struct f_val v = { .type = T_INT, .val.i = as};
- match = !!find_tree(set, &v);
+ match = !!find_tree(set->val.t, &v);
}
- else
- match = (as == key);
+ else /* T_INT */
+ match = (as == set->val.i);
if (match == pos)
{
int counts_of_contains = count_asn_in_array(as_nums, as_nums[i]);
bt_assert_msg(as_path_contains(as_path, as_nums[i], counts_of_contains), "AS Path should contains %d-times number %d", counts_of_contains, as_nums[i]);
- bt_assert(as_path_filter(tmp_linpool, as_path, NULL, as_nums[i], 0) != NULL);
- bt_assert(as_path_filter(tmp_linpool, as_path, NULL, as_nums[i], 1) != NULL);
+ struct f_val v = { .type = T_INT, .val.i = as_nums[i] };
- bt_assert(as_path_filter(lp, as_path, &v, 0) != NULL);
- bt_assert(as_path_filter(lp, as_path, &v, 1) != NULL);
++ bt_assert(as_path_filter(tmp_linpool, as_path, &v, 0) != NULL);
++ bt_assert(as_path_filter(tmp_linpool, as_path, &v, 1) != NULL);
}
for (i = 0; i < 10000; i++)