summaryrefslogtreecommitdiffstats
path: root/src/opt.c
Commit message (Collapse)AuthorAgeFilesLines
* opt: Wait until purity is computed to update facts_when_impureTavian Barnes2023-06-161-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 Barnes2023-05-181-7/+6
|
* config: Provide <stdalign.h> and <stdbool.h>Tavian Barnes2023-05-111-1/+0
| | | | In anticipation of C23, since those headers won't be necessary any more.
* config: s/BFS_COUNTOF/countof/Tavian Barnes2023-05-101-8/+8
|
* Replace license boilerplate with SPDX tagsTavian Barnes2023-01-251-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 parserTavian Barnes2023-01-241-0/+132
|
* opt: Move costs out of the parserTavian Barnes2023-01-241-0/+54
|
* opt: Move always_{true,false} out of the parserTavian Barnes2023-01-241-0/+55
|
* opt: Move purity out of the parserTavian Barnes2023-01-241-0/+62
|
* opt: Use a table for simple range comparisonsTavian Barnes2023-01-241-14/+24
|
* opt: Use a table for simple predicatesTavian Barnes2023-01-241-17/+27
|
* opt: Use a table to look up optimizer functionsTavian Barnes2023-01-241-44/+71
|
* opt: Pass a va_list to bfs_vwarning(), not bfs_warning()Tavian Barnes2022-12-081-1/+1
| | | | Luckily none of the callers actually pass any arguments.
* expr: Rename bfs_expr_has_children() to _is_parent()Tavian Barnes2022-12-051-3/+3
|
* expr: Remove the singleton bfs_{true,false} expressionsTavian Barnes2022-11-301-31/+37
|
* expr: Remove the synthetic flagTavian Barnes2022-11-291-5/+0
| | | | | Only diagnostics cares about this, and we can just check if the pointers are equal.
* pwcache: Fill the user/group caches lazilyTavian Barnes2022-11-091-8/+11
| | | | | | | Iterating all the users/groups can be expensive, especially with NSS. Android has so many that it doesn't even return them all from get{pw,gr}ent() for performance reasons, leading to incorrect behaviour of -user/-group/etc.
* Fix includesTavian Barnes2022-11-061-2/+1
|
* bfstd: Rename from util and reorganize itTavian Barnes2022-11-061-1/+0
|
* Source / Include Folder (#88)トトも2022-04-161-0/+1088
Moved Source Files Into `src` Folder