(dest: &str, lhs: i64, rhs: i64)
| 145 | |
| 146 | fn lit_math(dest: &str, lhs: i64, rhs: i64) -> IrInstruction { |
| 147 | IrInstruction::Math { |
| 148 | dest: reg(dest), |
| 149 | op: IrMathOp::Add, |
| 150 | ty: i64_ty(), |
| 151 | lhs: IrValue::Integer(lhs), |
| 152 | rhs: IrValue::Integer(rhs), |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | fn alloc_for(func: &IrFunction) -> FunctionContext { |
| 157 | let mut ctx = FunctionContext::new(&StdHashMap::new()); |
| 158 | assign_stack_slots(func, &mut ctx, &StdHashMap::new(), true, false); |