You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue lampepfl#7113: Fix Scala.js codegen for Tail Recursive Returns
In order to return from a tail recursive tree in Scala.js IR, a label
must be placed outside the loop to serve as a jump/break point. While
a fresh return label had been generated for such methods (in the
LocalNameGenerator), it had not been placed at the top level of its
method, and was otherwise unused.
After generating a method's body, if a enclosing return label had been
generated, use it to wrap the method body (just as Scala 2's JS codegen
does) for such breaks.
Enable the tests of ReadersTest.scala of the Scala.js test suite, of
which InputStreamReaderTest used a tail-recursive method that depended
on this fix.
0 commit comments