JIT: fix handling of newarr size (#19633)
authorAndy Ayers <andya@microsoft.com>
Fri, 24 Aug 2018 02:35:33 +0000 (19:35 -0700)
committerGitHub <noreply@github.com>
Fri, 24 Aug 2018 02:35:33 +0000 (19:35 -0700)
commitee6bdf7749caf7a70c48ebe5cbd37782dc6a33dd
tree6c60d2fb45cbb991555802b5669c7b3b9387cf18
parent3ce59b1ab67fcf7c23c9fbc5da9b229f54568414
JIT: fix handling of newarr size (#19633)

`newarr` accepts either an int or native int for array size, and the
newarr helper the jit invokes takes a native int.

If the value on the stack is an int and the jit is running on a platform
where native int is larger than int, the jit must explicitly widen the
int to native int.

Found this while running some code through the interpreter -- the path
the interpreter uses to invoke jitted code doesn't guarantee that int args
are 64 bit clean.
src/jit/importer.cpp