Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix spelling | Tavian Barnes | 2024-09-23 | 1 | -1/+1 |
| | |||||
* | list: New drain_slist() macro | Tavian Barnes | 2024-09-19 | 1 | -32/+15 |
| | |||||
* | opt: #include "xspawn.h" before #ifdef POSIX_SPAWN_SETRLIMIT | Tavian Barnes | 2024-09-17 | 1 | -0/+1 |
| | | | | Fixes: 65a7814 ("opt: Don't raise RLIMIT_NOFILE if it would prevent using posix_spawn()") | ||||
* | opt: Fix an invalid assertion in sink_not_comma() | Tavian Barnes | 2024-09-17 | 1 | -4/+3 |
| | | | | | | | When optimizing -not \( -a , -b \), the child is a comma expression, not the parent. Fixes: 4a36bb9 ("expr: Make expressions variadic") | ||||
* | opt: Add missing newline to debug statement | Tavian Barnes | 2024-09-12 | 1 | -1/+1 |
| | | | | Fixes: 9b8cf46 ("opt: Warn about all ignored tests") | ||||
* | Fix includes | Tavian Barnes | 2024-08-29 | 1 | -0/+1 |
| | |||||
* | build: Move feature test macros to prelude.h | Tavian Barnes | 2024-08-28 | 1 | -1/+0 |
| | | | | | | This replaces the explicit CPPFLAGS list in flags.mk with just `-include src/prelude.h`, shortening our compiler command lines and allowing them to be easily documented. | ||||
* | prelude: Split bfs-specific utilities into new bfs.h header | Tavian Barnes | 2024-08-28 | 1 | -0/+3 |
| | |||||
* | opt: Warn about all ignored tests | Tavian Barnes | 2024-08-15 | 1 | -31/+34 |
| | | | | | This lets us warn about `bfs -delete -empty`, even though -empty is impure. | ||||
* | expr: Tell expressions what kind of expression they are | Tavian Barnes | 2024-08-15 | 1 | -2/+2 |
| | |||||
* | Default to no for "Do you want to continue?" prompts | Tavian Barnes | 2024-08-13 | 1 | -1/+1 |
| | |||||
* | opt: Add a missing NULL check in lift_andor_not() | Tavian Barnes | 2024-08-12 | 1 | -0/+4 |
| | | | | | The annotation visitor probably can't fail, but we might as well check consistently. | ||||
* | opt: Warn about ignored expressions after dangerous actions | Tavian Barnes | 2024-08-12 | 1 | -12/+49 |
| | | | | | | For example, `bfs -delete -type f` is almost certainly a mistake. Link: https://savannah.gnu.org/bugs/?65895 | ||||
* | opt: Copy data flow back up from the nested context in optimize() | Tavian Barnes | 2024-08-12 | 1 | -2/+11 |
| | | | | | | | | This fixes warnings on commands like `bfs -exclude -true` or `bfs -exclude -type f -type f`, because the data flow is properly shared between the -exclude expression and the main one. Fixes: 4a36bb9 ("expr: Make expressions variadic") | ||||
* | prelude: Simplify attributes | Tavian Barnes | 2024-07-28 | 1 | -6/+6 |
| | |||||
* | opt: -empty implies -type f,d | Tavian Barnes | 2024-07-17 | 1 | -5/+22 |
| | |||||
* | opt: -lname implies -type l | Tavian Barnes | 2024-07-17 | 1 | -0/+7 |
| | |||||
* | Minor formatting fixes | Tavian Barnes | 2024-06-06 | 1 | -21/+21 |
| | |||||
* | Replace some switch-case lookups with arrays | Tavian Barnes | 2024-06-05 | 1 | -58/+25 |
| | |||||
* | opt: Don't raise RLIMIT_NOFILE if it would prevent using posix_spawn() | Tavian Barnes | 2024-05-23 | 1 | -0/+16 |
| | | | | | | | | | | If we raise RLIMIT_NOFILE, we have to lower it before calling exec() for compatibility with select(). If posix_spawn() doesn't support that, we fall back to fork(), which is quite a bit slower. Therefore, if we're going to exec() on most files, it's better to keep RLIMIT_NOFILE the same to avoid the fork() cost, even though it makes bftw() somewhat slower. | ||||
* | opt: true is true with probability 1, not 0 | Tavian Barnes | 2024-05-23 | 1 | -1/+1 |
| | |||||
* | opt: Implement a general estimate_odds() function | Tavian Barnes | 2024-05-23 | 1 | -9/+17 |
| | |||||
* | expr: New for_expr macro | Tavian Barnes | 2024-05-23 | 1 | -6/+6 |
| | |||||
* | opt: Add missing NULL check in visit_shallow() | Tavian Barnes | 2024-04-24 | 1 | -1/+5 |
| | | | | | visit_shallow() should propagate NULL, but look_up_visitor() dereferences expr to know which visitor to return. | ||||
* | Rename config.h to prelude.h | Tavian Barnes | 2024-04-19 | 1 | -1/+1 |
| | |||||
* | Fix some -Wpedantic warnings | Tavian Barnes | 2024-03-22 | 1 | -6/+6 |
| | |||||
* | Implement -limit N | Tavian Barnes | 2024-03-20 | 1 | -0/+1 |
| | | | | Closes: https://github.com/tavianator/bfs/issues/133 | ||||
* | Re-run include-what-you-use | Tavian Barnes | 2024-03-11 | 1 | -1/+2 |
| | |||||
* | opt: Enable BFTW_STAT when profitable | Tavian Barnes | 2024-02-06 | 1 | -0/+91 |
| | |||||
* | opt: Charge eval_flags() for a stat() call | Tavian Barnes | 2024-01-31 | 1 | -0/+1 |
| | |||||
* | expr: Make expressions variadic | Tavian Barnes | 2024-01-07 | 1 | -777/+1593 |
| | | | | | | | | | Rather than only unary/binary expressions, we now support an arbitrary number of children. The optimizer has been re-written almost completely and now supports optimal reordering of longer expression chains, rather than just arm-swapping. Fixes #85. | ||||
* | expr: Arena-allocate expressions | Tavian Barnes | 2023-12-20 | 1 | -73/+40 |
| | |||||
* | opt: Use more standard terminology for data flow domains | Tavian Barnes | 2023-12-20 | 1 | -298/+294 |
| | |||||
* | config: s/attr_format/attr_printf/ | Tavian Barnes | 2023-12-18 | 1 | -2/+2 |
| | |||||
* | config: New variadic attr(...) macro | Tavian Barnes | 2023-12-18 | 1 | -2/+2 |
| | |||||
* | config: s/BFS_FORMATTER/attr_format/ | Tavian Barnes | 2023-11-09 | 1 | -2/+2 |
| | |||||
* | Formatting fixes | Tavian Barnes | 2023-09-27 | 1 | -6/+5 |
| | |||||
* | opt: Wait until purity is computed to update facts_when_impure | Tavian Barnes | 2023-06-16 | 1 | -4/+2 |
| | | | | | | | | | | | Since we moved purity out of the parser, side-effect detection has been unnecessarily pessimistic due to this bug. The fix restores warnings in cases like $ bfs -false bfs: warning: This command won't do anything. Fixes: 693b5f60dc9787d9237920cc0c87fe0e010194ee | ||||
* | Switch from assert() to bfs_assert()/bfs_verify() | Tavian Barnes | 2023-05-18 | 1 | -7/+6 |
| | |||||
* | config: Provide <stdalign.h> and <stdbool.h> | Tavian Barnes | 2023-05-11 | 1 | -1/+0 |
| | | | | In anticipation of C23, since those headers won't be necessary any more. | ||||
* | config: s/BFS_COUNTOF/countof/ | Tavian Barnes | 2023-05-10 | 1 | -8/+8 |
| | |||||
* | Replace license boilerplate with SPDX tags | Tavian Barnes | 2023-01-25 | 1 | -15/+2 |
| | | | | | | | And while I'm at it, remove years from copyright declarations. Link: https://spdx.dev/about/ Link: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/ | ||||
* | opt: Move probabilities out of the parser | Tavian Barnes | 2023-01-24 | 1 | -0/+132 |
| | |||||
* | opt: Move costs out of the parser | Tavian Barnes | 2023-01-24 | 1 | -0/+54 |
| | |||||
* | opt: Move always_{true,false} out of the parser | Tavian Barnes | 2023-01-24 | 1 | -0/+55 |
| | |||||
* | opt: Move purity out of the parser | Tavian Barnes | 2023-01-24 | 1 | -0/+62 |
| | |||||
* | opt: Use a table for simple range comparisons | Tavian Barnes | 2023-01-24 | 1 | -14/+24 |
| | |||||
* | opt: Use a table for simple predicates | Tavian Barnes | 2023-01-24 | 1 | -17/+27 |
| | |||||
* | opt: Use a table to look up optimizer functions | Tavian Barnes | 2023-01-24 | 1 | -44/+71 |
| | |||||
* | opt: Pass a va_list to bfs_vwarning(), not bfs_warning() | Tavian Barnes | 2022-12-08 | 1 | -1/+1 |
| | | | | Luckily none of the callers actually pass any arguments. |