| 2862 | } |
| 2863 | |
| 2864 | bool BfTypeInstance::IsIRFuncUsed(BfIRFunction func) |
| 2865 | { |
| 2866 | for (auto& group : mMethodInstanceGroups) |
| 2867 | { |
| 2868 | if (group.mDefault != NULL) |
| 2869 | if (group.mDefault->mIRFunction == func) |
| 2870 | return true; |
| 2871 | if (group.mMethodSpecializationMap != NULL) |
| 2872 | { |
| 2873 | for (auto& methodInstPair : *group.mMethodSpecializationMap) |
| 2874 | { |
| 2875 | auto methodInstance = methodInstPair.mValue; |
| 2876 | if (methodInstance->mIRFunction == func) |
| 2877 | return true; |
| 2878 | } |
| 2879 | } |
| 2880 | } |
| 2881 | return false; |
| 2882 | } |
| 2883 | |
| 2884 | void BfTypeInstance::CalcHotVirtualData(Array<int>* ifaceMapping) |
| 2885 | { |