diff options
-rw-r--r-- | Sil/Compile.icl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Sil/Compile.icl b/Sil/Compile.icl index de3f47f..9404b1c 100644 --- a/Sil/Compile.icl +++ b/Sil/Compile.icl @@ -53,6 +53,9 @@ where // Remove unreachable code opt ['ABC'.Rtn:ss] = ['ABC'.Rtn:opt $ skipUntilEntryPoint ss] opt ['ABC'.Jmp l:ss] = ['ABC'.Jmp l:opt $ skipUntilEntryPoint ss] + // Remove needless moves between A and B stacks + opt ['ABC'.PushI_a 0:'ABC'.Pop_a 1:'ABC'.Create:'ABC'.FillI_b 0 0:'ABC'.Pop_b 1:ss] = opt ss + opt ['ABC'.PushB_a 0:'ABC'.Pop_a 1:'ABC'.Create:'ABC'.FillB_b 0 0:'ABC'.Pop_b 1:ss] = opt ss // Base cases opt [s:ss] = [s:opt ss] opt [] = [] |