[rebase of #2206] SI-874 JSR-223 compliance for the interpreter

review by @rjolly to make sure I didn't butcher anything during the rebase