(
resolve: &Resolve,
bindgen: &mut B,
address: B::Operand,
value: B::Operand,
ty: &Type,
)
| 820 | } |
| 821 | |
| 822 | pub fn lower_to_memory<B: Bindgen>( |
| 823 | resolve: &Resolve, |
| 824 | bindgen: &mut B, |
| 825 | address: B::Operand, |
| 826 | value: B::Operand, |
| 827 | ty: &Type, |
| 828 | ) { |
| 829 | let mut generator = Generator::new(resolve, bindgen); |
| 830 | // TODO: make this configurable? Right now this function is only called for |
| 831 | // future/stream callbacks so it's appropriate to skip realloc here as it's |
| 832 | // all "lower for wasm import", but this might get reused for something else |
| 833 | // in the future. |
| 834 | generator.realloc = Some(Realloc::Export("cabi_realloc")); |
| 835 | generator.stack.push(value); |
| 836 | generator.write_to_memory(ty, address, Default::default()); |
| 837 | } |
| 838 | |
| 839 | pub fn lower_flat<B: Bindgen>( |
| 840 | resolve: &Resolve, |
no test coverage detected