| 4254 | |
| 4255 | private: |
| 4256 | void compileCallOp(const unsigned int FuncIndex) noexcept { |
| 4257 | const auto &FuncType = |
| 4258 | Context.CompositeTypes[std::get<0>(Context.Functions[FuncIndex])] |
| 4259 | ->getFuncType(); |
| 4260 | const auto &Function = std::get<1>(Context.Functions[FuncIndex]); |
| 4261 | const auto &ParamTypes = FuncType.getParamTypes(); |
| 4262 | |
| 4263 | std::vector<LLVM::Value> Args(ParamTypes.size() + 1); |
| 4264 | Args[0] = F.Fn.getFirstParam(); |
| 4265 | for (size_t I = 0; I < ParamTypes.size(); ++I) { |
| 4266 | const size_t J = ParamTypes.size() - 1 - I; |
| 4267 | Args[J + 1] = stackPop(); |
| 4268 | } |
| 4269 | |
| 4270 | auto Ret = Builder.createCall(Function, Args); |
| 4271 | auto Ty = Ret.getType(); |
| 4272 | if (Ty.isVoidTy()) { |
| 4273 | // nothing to do |
| 4274 | } else if (Ty.isStructTy()) { |
| 4275 | for (auto Val : unpackStruct(Builder, Ret)) { |
| 4276 | stackPush(Val); |
| 4277 | } |
| 4278 | } else { |
| 4279 | stackPush(Ret); |
| 4280 | } |
| 4281 | } |
| 4282 | |
| 4283 | void compileIndirectCallOp(const uint32_t TableIndex, |
| 4284 | const uint32_t FuncTypeIndex) noexcept { |
nothing calls this directly
no test coverage detected