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 7ab8452 commit c3e522dCopy full SHA for c3e522d
crates/wasmi/src/engine/translator/func2/layout/mod.rs
@@ -4,7 +4,7 @@ use self::consts::{ConstRegistry, ConstRegistryIter};
4
use super::{LocalIdx, Operand, OperandIdx, Reset};
5
use crate::{
6
core::{UntypedVal, ValType},
7
- engine::TranslationError,
+ engine::{translator::comparator::AllocConst, TranslationError},
8
ir::Reg,
9
Error,
10
};
@@ -127,6 +127,12 @@ impl StackLayout {
127
}
128
129
130
+impl AllocConst for StackLayout {
131
+ fn alloc_const<T: Into<UntypedVal>>(&mut self, value: T) -> Result<Reg, Error> {
132
+ self.const_to_reg(value)
133
+ }
134
+}
135
+
136
/// The [`StackSpace`] of a [`Reg`].
137
#[derive(Debug, Copy, Clone)]
138
pub enum StackSpace {
0 commit comments