Refactor and cleanup work for passing and returning struct types
authorBrian Sullivan <briansul@microsoft.com>
Thu, 7 Jul 2016 20:23:20 +0000 (13:23 -0700)
committerBrian Sullivan <briansul@microsoft.com>
Tue, 12 Jul 2016 01:38:19 +0000 (18:38 -0700)
commit65309244833105024caeeaf5b3c8b4204552ba73
tree5aa1defb8f933bf4550157a3d6b62b99349c7bd6
parent0804d53c08804928e3b92e3c50b284453dab4944
Refactor and cleanup work for passing and returning struct types

Replaces argOrReturnTypeForStruct with two new methods:
  getArgTypeForStruct - Provides information on how to pass a struct type
  getReturnTypeForStruct - Provides information on how to return a struct type

A struct can be passed or return in the following different ways:
1. A struct type may be passed/returned as a primitive type when its size is small
2. A struct type may be passed/returned by reference to a copy
3. A struct type may be passed/returned by value using multiple registers
4. A struct type may be passed by value using a copy on the stack

Incorporated code review feedback with expanded comments.
src/jit/compiler.cpp
src/jit/compiler.h
src/jit/compiler.hpp
src/jit/importer.cpp
src/jit/lclvars.cpp
src/jit/morph.cpp
src/jit/target.h