| 1381 | } |
| 1382 | |
| 1383 | Result BinaryReaderInterp::OnLocalGetExpr(Index local_index) { |
| 1384 | // Get the translated index before calling validator_.OnLocalGet because it |
| 1385 | // will update the type stack size. We need the index to be relative to the |
| 1386 | // old stack size. |
| 1387 | Index translated_local_index = TranslateLocalIndex(local_index); |
| 1388 | CHECK_RESULT( |
| 1389 | validator_.OnLocalGet(GetLocation(), Var(local_index, GetLocation()))); |
| 1390 | |
| 1391 | Type type = func_->GetLocalType(local_index); |
| 1392 | if (type.IsRef()) { |
| 1393 | istream_.Emit(Opcode::InterpLocalGetRef, translated_local_index); |
| 1394 | } else { |
| 1395 | istream_.Emit(Opcode::LocalGet, translated_local_index); |
| 1396 | } |
| 1397 | return Result::Ok; |
| 1398 | } |
| 1399 | |
| 1400 | Result BinaryReaderInterp::OnLocalSetExpr(Index local_index) { |
| 1401 | // See comment in OnLocalGetExpr above. |
nothing calls this directly
no test coverage detected