Update metering data on return

This commit is contained in:
losfair 2019-05-17 01:20:09 +08:00
parent 14fcd78b30
commit b830f10fa0

View File

@ -43,7 +43,8 @@ impl FunctionMiddleware for Metering {
| Operator::BrTable { .. } | Operator::BrTable { .. }
| Operator::BrIf { .. } | Operator::BrIf { .. }
| Operator::Call { .. } | Operator::Call { .. }
| Operator::CallIndirect { .. } => { | Operator::CallIndirect { .. }
| Operator::Return => {
sink.push(Event::Internal(InternalEvent::GetInternal(0))); sink.push(Event::Internal(InternalEvent::GetInternal(0)));
sink.push(Event::WasmOwned(Operator::I64Const { sink.push(Event::WasmOwned(Operator::I64Const {
value: self.current_block as i64, value: self.current_block as i64,