Delete optimize_okay() and add a couple of assertions

This commit is contained in:
Tom Eastep 2011-02-17 10:48:46 -08:00
parent 5634b08e22
commit 6f00f2127c

View File

@ -43,7 +43,6 @@ our @EXPORT = qw(
ensure_manual_chain
log_rule_limit
dont_optimize
optimize_okay
dont_delete
dont_move
@ -660,6 +659,8 @@ sub add_reference ( $$ ) {
my $toref = reftype $to ? $to : $chain_table{$fromref->{table}}{$to};
assert($toref);
$toref->{references}{$fromref->{name}}++;
}
@ -671,6 +672,8 @@ sub delete_reference( $$ ) {
my $toref = reftype $to ? $to : $chain_table{$fromref->{table}}{$to};
assert( $toref );
delete $toref->{references}{$fromref->{name}} unless --$toref->{references}{$fromref->{name}} > 0;
}
@ -1259,21 +1262,6 @@ sub dont_optimize( $ ) {
$chainref;
}
#
# Reverse the effect of dont_optimize
#
sub optimize_okay( $ ) {
my $chain = shift;
my $chainref = reftype $chain ? $chain : $filter_table->{$chain};
$chainref->{dont_optimize} = 0;
trace( $chainref, 'O', undef, '' ) if $debug;
$chainref;
}
#
# Set the dont_optimize and dont_delete flags for a chain
#