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
Scala.js: Emit js.NewArray IR nodes when possible. (#22446)
Although there is a *correct* implementation of `sr.Arrays.newArray`, it
is not efficient when creating 1-dimensional arrays. The JVM backend
special-cases it to emit `newarray` bytecode instructions.
We now also special-case it in the JS backend. In the Scala.js IR
however, `js.NewArray` only accepts a single dimension. For multiple
dimensions, the right thing to do is to emit a direct call to
`jlr.Array.newInstance`.
0 commit comments