Clean up redundant code
This commit is contained in:
parent
16ba82775b
commit
21b87f352c
@ -298,7 +298,7 @@ impl<'a> Module<'a> {
|
|||||||
for (i, v) in func_list.into_iter().enumerate() {
|
for (i, v) in func_list.into_iter().enumerate() {
|
||||||
write!(w, "FUNC_LIST[{}] =", i + offset)?;
|
write!(w, "FUNC_LIST[{}] =", i + offset)?;
|
||||||
|
|
||||||
v.output(&mut Data::new(v.num_param, ed), w)?;
|
v.output(&mut Data::new(ed), w)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.gen_start_point(w)
|
self.gen_start_point(w)
|
||||||
|
@ -66,10 +66,10 @@ pub struct Data<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Data<'a> {
|
impl<'a> Data<'a> {
|
||||||
pub fn new(num_param: u32, edition: &'a dyn Edition) -> Self {
|
pub fn new(edition: &'a dyn Edition) -> Self {
|
||||||
Self {
|
Self {
|
||||||
label_list: Vec::new(),
|
label_list: Vec::new(),
|
||||||
num_param,
|
num_param: 0,
|
||||||
edition,
|
edition,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -490,6 +490,8 @@ impl Function {
|
|||||||
|
|
||||||
write!(w, ")")?;
|
write!(w, ")")?;
|
||||||
|
|
||||||
|
d.num_param = self.num_param;
|
||||||
|
|
||||||
for v in memory::visit(self) {
|
for v in memory::visit(self) {
|
||||||
write!(w, "local memory_at_{0} = MEMORY_LIST[{0}]", v)?;
|
write!(w, "local memory_at_{0} = MEMORY_LIST[{0}]", v)?;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user