22 #include "../config.h"
24 #include "RMonoVariant_Def.h"
25 #include "abi/RMonoABITypeTraits.h"
39 if ((flags & FlagIsAlias) != 0) {
47 return ((flags & FlagOwnMemory) == 0) && v.ddata ==
nullptr;
49 return ((flags & FlagOwnMemory) == 0) && op ==
nullptr;
51 return ((flags & FlagOwnMemory) == 0) && pp ==
nullptr;
60 template <
typename ABI>
63 typedef RMonoABITypeTraits<ABI> ABITypeTraits;
65 if ((flags & FlagIsAlias) != 0) {
82 }
else if (v.size <= 2) {
84 }
else if (v.size <= 4) {
86 }
else if (v.size <= 8) {
94 alignment =
sizeof(
typename ABITypeTraits::irmono_gchandle);
95 size =
sizeof(
typename ABITypeTraits::irmono_gchandle);
98 alignment =
sizeof(
typename ABITypeTraits::irmono_voidp);
99 size =
sizeof(
typename ABITypeTraits::irmono_voidp);
114 template <
typename ABI>
117 typedef RMonoABITypeTraits<ABI> ABITypeTraits;
119 if ((flags & FlagIsAlias) != 0) {
133 *((
typename ABITypeTraits::irmono_gchandle*) buf) = abi.hp2i_RMonoObjectPtr(
getMonoObjectPtr());
136 *((
typename ABITypeTraits::irmono_voidp*) buf) = abi.p2i_rmono_voidp(
getRawPtr());
142 template <
typename ABI>
145 typedef RMonoABITypeTraits<ABI> ABITypeTraits;
147 if ((flags & FlagIsAlias) != 0) {
161 if ((flags & FlagOwnMemory) != 0) {
162 o = abi.hi2p_RMonoObjectPtr(*((
typename ABITypeTraits::irmono_gchandle*) buf), &mono);
164 *op = abi.hi2p_RMonoObjectPtr(*((
typename ABITypeTraits::irmono_gchandle*) buf), &mono);
168 if ((flags & FlagOwnMemory) != 0) {
169 p = abi.i2p_rmono_voidp(*((
typename ABITypeTraits::irmono_voidp*) buf));
171 *pp = abi.i2p_rmono_voidp(*((
typename ABITypeTraits::irmono_voidp*) buf));