Refactoring of struct promotion code for the future fix. (#20216)
authorSergey Andreenko <seandree@microsoft.com>
Sat, 6 Oct 2018 00:07:41 +0000 (17:07 -0700)
committerGitHub <noreply@github.com>
Sat, 6 Oct 2018 00:07:41 +0000 (17:07 -0700)
commit768911897f0921ef77ef991088359d248cb99613
tree4f18b1e0ca05c63cfeb739e559744aef412d2b85
parent457148064c836daa746542f1559b7958d6420c22
Refactoring of struct promotion code for the future fix. (#20216)

Create StructPromotionHelper.

* Add the check for promoted fields with changed type.

`CanPromoteStructType` can fake a field type if the field type is "structs of a single field of scalar types aligned at their natural boundary.". Add a check in debug that when we morph struct field access we have an expected type in the field handle.
src/jit/compiler.h
src/jit/importer.cpp
src/jit/lclvars.cpp
src/jit/morph.cpp