diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-11-29 16:07:17 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-11-29 16:07:17 -0500 |
commit | 6961c9a4c2fe8612db222bfd1693e38f7a43a2cd (patch) | |
tree | c6e9eec1d0bdeaa6906e33c810f4228da8ca7c50 /src/parse.c | |
parent | ba3ea2a9148da4c7ab0718e5ec077620ee29e88d (diff) | |
download | bfs-6961c9a4c2fe8612db222bfd1693e38f7a43a2cd.tar.xz |
expr: Remove the synthetic flag
Only diagnostics cares about this, and we can just check if the pointers
are equal.
Diffstat (limited to 'src/parse.c')
-rw-r--r-- | src/parse.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/parse.c b/src/parse.c index f7c114d..2136bb5 100644 --- a/src/parse.c +++ b/src/parse.c @@ -79,7 +79,6 @@ struct bfs_expr bfs_true = { .argv = &fake_true_arg, .pure = true, .always_true = true, - .synthetic = true, .cost = FAST_COST, .probability = 1.0, }; @@ -90,7 +89,6 @@ struct bfs_expr bfs_false = { .argv = &fake_false_arg, .pure = true, .always_false = true, - .synthetic = true, .cost = FAST_COST, .probability = 0.0, }; @@ -129,7 +127,6 @@ struct bfs_expr *bfs_expr_new(bfs_eval_fn *eval_fn, size_t argc, char **argv) { expr->pure = false; expr->always_true = false; expr->always_false = false; - expr->synthetic = false; expr->cost = FAST_COST; expr->probability = 0.5; expr->evaluations = 0; @@ -186,10 +183,6 @@ static struct bfs_expr *new_binary_expr(bfs_eval_fn *eval_fn, struct bfs_expr *l expr->rhs = rhs; assert(bfs_expr_has_children(expr)); - if (argv == &fake_and_arg || argv == &fake_or_arg) { - expr->synthetic = true; - } - expr->persistent_fds = lhs->persistent_fds + rhs->persistent_fds; if (lhs->ephemeral_fds > rhs->ephemeral_fds) { expr->ephemeral_fds = lhs->ephemeral_fds; @@ -2011,7 +2004,6 @@ static struct bfs_expr *parse_nohidden(struct parser_state *state, int arg1, int hidden->probability = 0.01; hidden->pure = true; - hidden->synthetic = true; if (parse_exclude(state, hidden) != 0) { return NULL; @@ -3639,7 +3631,6 @@ static struct bfs_expr *parse_whole_expr(struct parser_state *state) { goto fail; } init_print_expr(state, print); - print->synthetic = true; expr = new_binary_expr(eval_and, expr, print, &fake_and_arg); if (!expr) { |