We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b834be0 commit 12a9c5aCopy full SHA for 12a9c5a
crates/wasmi/src/engine/translator/func2/stack/operands.rs
@@ -55,6 +55,17 @@ pub enum StackOperand {
55
},
56
}
57
58
+impl StackOperand {
59
+ /// Returns the [`ValType`] of the [`StackOperand`].
60
+ pub fn ty(&self, locals: &LocalsRegistry) -> ValType {
61
+ match self {
62
+ StackOperand::Temp { ty, .. } => *ty,
63
+ StackOperand::Immediate { val } => val.ty(),
64
+ StackOperand::Local { local_index, .. } => locals.ty(*local_index),
65
+ }
66
67
+}
68
+
69
/// The Wasm operand (or value) stack.
70
#[derive(Debug, Default)]
71
pub struct OperandStack {
0 commit comments