| 233 | } |
| 234 | |
| 235 | Type Func::GetLocalType(Index index) const { |
| 236 | Index num_params = decl.GetNumParams(); |
| 237 | if (index < num_params) { |
| 238 | return GetParamType(index); |
| 239 | } else { |
| 240 | index -= num_params; |
| 241 | assert(index < local_types.size()); |
| 242 | return local_types[index]; |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | Type Func::GetLocalType(const Var& var) const { |
| 247 | return GetLocalType(GetLocalIndex(var)); |
no test coverage detected