| 6162 | } |
| 6163 | |
| 6164 | BfIRMDNode BfIRBuilder::DbgCreateSubroutineType(BfMethodInstance* methodInstance) |
| 6165 | { |
| 6166 | auto methodDef = methodInstance->mMethodDef; |
| 6167 | auto typeInstance = methodInstance->GetOwner(); |
| 6168 | |
| 6169 | SizedArray<BfIRMDNode, 32> diParams; |
| 6170 | diParams.push_back(DbgGetType(methodInstance->mReturnType)); |
| 6171 | |
| 6172 | BfType* thisType = NULL; |
| 6173 | if (!methodDef->mIsStatic) |
| 6174 | { |
| 6175 | BfType* thisType; |
| 6176 | thisType = typeInstance; |
| 6177 | if (!thisType->IsValuelessType()) |
| 6178 | { |
| 6179 | BfType* thisPtrType = thisType; |
| 6180 | auto diType = DbgGetType(thisPtrType); |
| 6181 | if ((thisType->IsComposite()) && (!methodInstance->GetParamIsSplat(-1))) |
| 6182 | { |
| 6183 | diType = DbgCreatePointerType(diType); |
| 6184 | diType = DbgCreateArtificialType(diType); |
| 6185 | } |
| 6186 | diParams.push_back(diType); |
| 6187 | } |
| 6188 | } |
| 6189 | |
| 6190 | for (int paramIdx = 0; paramIdx < methodInstance->GetParamCount(); paramIdx++) |
| 6191 | { |
| 6192 | bool isParamSkipped = methodInstance->IsParamSkipped(paramIdx); |
| 6193 | if (!isParamSkipped) |
| 6194 | { |
| 6195 | auto resolvedType = methodInstance->GetParamType(paramIdx); |
| 6196 | diParams.push_back(DbgGetType(resolvedType)); |
| 6197 | } |
| 6198 | } |
| 6199 | |
| 6200 | return DbgCreateSubroutineType(diParams); |
| 6201 | } |
| 6202 | |
| 6203 | BfIRMDNode BfIRBuilder::DbgCreateSubroutineType(const BfSizedArray<BfIRMDNode>& elements) |
| 6204 | { |
no test coverage detected