Optimize memory instance caching

This commit is contained in:
Rerumu
2022-05-19 02:47:39 -04:00
parent 00d8dc4124
commit f528df9b9e
2 changed files with 26 additions and 10 deletions
-7
View File
@@ -9,8 +9,6 @@ use wasm_ast::node::{
Return, SetGlobal, SetLocal, Statement, StoreAt,
};
use crate::analyzer::memory;
use super::manager::{
write_ascending, write_condition, write_separated, write_variable, Driver, Manager,
};
@@ -281,11 +279,6 @@ fn write_variable_list(ir: &Intermediate, w: &mut dyn Write) -> Result<()> {
impl Driver for Intermediate {
fn write(&self, mng: &mut Manager, w: &mut dyn Write) -> Result<()> {
write_parameter_list(self, w)?;
for v in memory::visit(self) {
write!(w, "local memory_at_{v} = MEMORY_LIST[{v}]")?;
}
write_variable_list(self, w)?;
write!(w, "local temp ")?;