Currently, optimistic compilation is governed with the system property "nashorn.optimistic". It should be a command line option (e.g. --optimistic-types) configurable on a per-script-environment basis. As part of this, tests currently relying on the optimistic flag (NumberAccessTest and NumberBoxingTest) should be relaxed to work identically with optimistic and non-optimistic compilation.
|