Let's look at some examples of tests in GenRefactored2 that are different from master. Basically, differences stem from the fact that by default master runs GenASM, while currently the other branch runs GenBCode.
instrumented/inline-in-constructors
An example with -optimise in .flags about which the new optimizer will complain, on the grounds that -neo:GenASM hasn't been indicated.
The test suite at GenRefactored2 lets those tests run with the optimizer they were designed for, via -neo:GenASM -closurify:traditional
neg/case-collision.check
Different because with the old optimizer emits three warnings while the new one emits only one warning
All of the other differences have in common that the test suite in master, as is, in fact tests the output of a specific optimizer implementation. Take for example method driver() in test/files/run/t7181.scala which results in:
881 instructions, when compiled with -neo:o2 -closurify:delegating
1004 instructions, when compiled with -neo:GenASM -closurify:traditional -optimise
In spite of -optimise running the dead-code phase, it doesn't manage to remove all the JUMPs that the pattern matcher left around, and a partest.BytecodeTest tuned towards the current dead-code elimination might well reject the new optimizer output.
Additionally, ICode tests have been removed because the new optimizer won't produces any ICode.
Now that I'm starting with a new branch with a clean history I'll strive for:
(a) adding tests specific to the new optimizer
(b) "sharing" as many as possible tests between old and new backends.
In that new branch GenASM will run by default. The setup chosen for GenRefactored2 had the benefit that it allowed re-using (most of) the test suite.
Miguel
http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/