Statement-list-dead
Eliminate dead code in lists of statements.
- Signature
(statement-list-dead stmts) → new-stmt
- Arguments
- stmts — Guard (statement-listp stmts).
- Returns
- new-stmt — Type (statement-listp new-stmt).
We go through the statements, recursively transforming them.
If we reach a break, continue, or leave we stop,
dropping the remaining statements.
This is correct because
there cannot be function definitions among the statements,
as discussed in dead-code-eliminator.
Without this assumption,
we would still have to retain the function definitions
after the break, continue, or leave.