| summaryrefslogtreecommitdiff |
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2019-04-26 15:32:33 +0200 |
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2019-04-26 15:32:33 +0200 |
| commit | 707e875456b7d8dcc37aaa8f92b16e984b534045 (patch) | |
| tree | a8fe3675daa7775866b1f09e6e0a31acc283ed20 /src | |
| parent | 89f6fbd55b9eebcc296c6d933009c7ec6aa35e55 (diff) | |
Adds an optimization for NOPs in sequences.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ataxic.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ataxic.erl b/src/ataxic.erl index 4a1bd8b..195d77f 100644 --- a/src/ataxic.erl +++ b/src/ataxic.erl @@ -337,7 +337,8 @@ update_value (OP) -> #value{ op = OP }. -spec optimize (basic()) -> basic(). optimize (#seq{ ops = OPs }) -> S0OPs = flatten_sequence(OPs), - optimize_update_field_sequence(S0OPs, []); + S1OPs = lists:filter(fun (E) -> (not is_record(E, current)) end, S0OPs), + optimize_update_field_sequence(S1OPs, []); optimize (OP) -> OP. %%%%% APPLY TO %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |


