mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
don't clone Layout
This commit is contained in:
parent
fa013e7d01
commit
55cb780249
18 changed files with 250 additions and 360 deletions
|
@ -105,7 +105,7 @@ where
|
|||
} => {
|
||||
// for now, treat invoke as a normal call
|
||||
|
||||
let stmt = Stmt::Let(*symbol, Expr::Call(call.clone()), layout.clone(), pass);
|
||||
let stmt = Stmt::Let(*symbol, Expr::Call(call.clone()), *layout, pass);
|
||||
self.build_stmt(&stmt)
|
||||
}
|
||||
Stmt::Switch {
|
||||
|
@ -252,32 +252,20 @@ where
|
|||
x => Err(format!("layout, {:?}, not implemented yet", x)),
|
||||
}
|
||||
}
|
||||
LowLevel::NumAcos => self.build_fn_call(
|
||||
sym,
|
||||
bitcode::NUM_ACOS.to_string(),
|
||||
args,
|
||||
&[layout.clone()],
|
||||
layout,
|
||||
),
|
||||
LowLevel::NumAsin => self.build_fn_call(
|
||||
sym,
|
||||
bitcode::NUM_ASIN.to_string(),
|
||||
args,
|
||||
&[layout.clone()],
|
||||
layout,
|
||||
),
|
||||
LowLevel::NumAtan => self.build_fn_call(
|
||||
sym,
|
||||
bitcode::NUM_ATAN.to_string(),
|
||||
args,
|
||||
&[layout.clone()],
|
||||
layout,
|
||||
),
|
||||
LowLevel::NumAcos => {
|
||||
self.build_fn_call(sym, bitcode::NUM_ACOS.to_string(), args, &[*layout], layout)
|
||||
}
|
||||
LowLevel::NumAsin => {
|
||||
self.build_fn_call(sym, bitcode::NUM_ASIN.to_string(), args, &[*layout], layout)
|
||||
}
|
||||
LowLevel::NumAtan => {
|
||||
self.build_fn_call(sym, bitcode::NUM_ATAN.to_string(), args, &[*layout], layout)
|
||||
}
|
||||
LowLevel::NumPowInt => self.build_fn_call(
|
||||
sym,
|
||||
bitcode::NUM_POW_INT.to_string(),
|
||||
args,
|
||||
&[layout.clone(), layout.clone()],
|
||||
&[*layout, *layout],
|
||||
layout,
|
||||
),
|
||||
LowLevel::NumSub => {
|
||||
|
@ -472,7 +460,7 @@ where
|
|||
} => {
|
||||
// for now, treat invoke as a normal call
|
||||
|
||||
let stmt = Stmt::Let(*symbol, Expr::Call(call.clone()), layout.clone(), pass);
|
||||
let stmt = Stmt::Let(*symbol, Expr::Call(call.clone()), *layout, pass);
|
||||
self.scan_ast(&stmt);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue