[interp] Optimize multidimensional array access (#16822)
commitaaaa2bdd5e5795dfba689cde110999a9a9225fb2
authorVlad Brezae <brezaevlad@gmail.com>
Tue, 17 Sep 2019 07:32:20 +0000 (17 10:32 +0300)
committerGitHub <noreply@github.com>
Tue, 17 Sep 2019 07:32:20 +0000 (17 10:32 +0300)
treec4f556bc71f4f2ebd31a3d02504dcbbd0415b9a5
parent87072b55c0a29928590da436d2991015f919869a
[interp] Optimize multidimensional array access (#16822)

* [interp] Pass rank instead to LDELEMA

It feels more intuitive and uses less computations.

* [interp] Avoid unnecessary type check

Loading element address of array requires type checks only if the elements of the array are references.

* [interp] Avoid using MINT_CALLRUN for Get intrinsic

It is very slow. Use ldelema/ldobj pair instead.

* [interp] Optimize MINT_LDELEMA

* [interp] Rename ldelema_fast to ldelema1

ldelema_fast was handling arrays with a single dimension. Rename it to better suggest this.

* [interp] Avoid using MINT_CALLRUN for Set intrinsic

* [interp] Remove some duplicated and confusing code

* [interp] Fix stack type of MINT_NEWARR result
mono/mini/interp/interp.c
mono/mini/interp/mintops.def
mono/mini/interp/transform.c