@@ -155,17 +155,17 @@ class ValueNumStore
155
155
156
156
// Returns "true" iff gtOper is a legal value number function.
157
157
// (Requires InitValueNumStoreStatics to have been run.)
158
- static inline bool GenTreeOpIsLegalVNFunc (genTreeOps gtOper);
158
+ static bool GenTreeOpIsLegalVNFunc (genTreeOps gtOper);
159
159
160
160
// Returns "true" iff "vnf" is a commutative (and thus binary) operator.
161
161
// (Requires InitValueNumStoreStatics to have been run.)
162
- static inline bool VNFuncIsCommutative (VNFunc vnf);
162
+ static bool VNFuncIsCommutative (VNFunc vnf);
163
163
164
164
// Returns "true" iff "vnf" is a comparison (and thus binary) operator.
165
- static inline bool VNFuncIsComparison (VNFunc vnf);
165
+ static bool VNFuncIsComparison (VNFunc vnf);
166
166
167
167
// Returns "true" iff "vnf" can be evaluated for constant arguments.
168
- static inline bool CanEvalForConstantArgs (VNFunc vnf);
168
+ static bool CanEvalForConstantArgs (VNFunc vnf);
169
169
170
170
// return vnf(v0)
171
171
template <typename T>
@@ -1176,24 +1176,43 @@ class ValueNumStore
1176
1176
// Inline functions.
1177
1177
1178
1178
// static
1179
- bool ValueNumStore::GenTreeOpIsLegalVNFunc (genTreeOps gtOper)
1179
+ inline bool ValueNumStore::GenTreeOpIsLegalVNFunc (genTreeOps gtOper)
1180
1180
{
1181
1181
return (s_vnfOpAttribs[gtOper] & VNFOA_IllegalGenTreeOp) == 0 ;
1182
1182
}
1183
1183
1184
1184
// static
1185
- bool ValueNumStore::VNFuncIsCommutative (VNFunc vnf)
1185
+ inline bool ValueNumStore::VNFuncIsCommutative (VNFunc vnf)
1186
1186
{
1187
1187
return (s_vnfOpAttribs[vnf] & VNFOA_Commutative) != 0 ;
1188
1188
}
1189
1189
1190
- bool ValueNumStore::VNFuncIsComparison (VNFunc vnf)
1190
+ inline bool ValueNumStore::VNFuncIsComparison (VNFunc vnf)
1191
1191
{
1192
1192
if (vnf >= VNF_Boundary) return false ;
1193
1193
genTreeOps gtOp = genTreeOps (vnf);
1194
1194
return GenTree::OperIsCompare (gtOp) != 0 ;
1195
1195
}
1196
1196
1197
+ template <typename T>
1198
+ inline T ValueNumStore::CoerceTypRefToT (Chunk* c, unsigned offset)
1199
+ {
1200
+ noway_assert (sizeof (T) >= sizeof (VarTypConv<TYP_REF>::Type));
1201
+ return (T) reinterpret_cast <VarTypConv<TYP_REF>::Type*>(c->m_defs )[offset];
1202
+ }
1203
+
1204
+ template <>
1205
+ inline float ValueNumStore::CoerceTypRefToT<float >(Chunk* c, unsigned offset)
1206
+ {
1207
+ unreached ();
1208
+ }
1209
+
1210
+ template <>
1211
+ inline double ValueNumStore::CoerceTypRefToT<double >(Chunk* c, unsigned offset)
1212
+ {
1213
+ unreached ();
1214
+ }
1215
+
1197
1216
/* ****************************************************************************/
1198
1217
#endif // _VALUENUM_H_
1199
1218
/* ****************************************************************************/
0 commit comments