test interleaving of js and native optimization passes