Skip to content
Closed
Prev Previous commit
Next Next commit
Clippy
  • Loading branch information
ShaharNaveh committed Nov 29, 2025
commit f59c99f58a272cdefc505fa15f61e6a011f5d32c
10 changes: 2 additions & 8 deletions crates/codegen/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,6 @@ pub fn compile_expression(
}

macro_rules! emit {
($c:expr, Instruction::$op:ident { $arg:ident$(,)? }$(,)?) => {
$c.emit_arg($arg, |x| Instruction::$op { $arg: x })
};
($c:expr, Instruction::$op:ident { $arg:ident : $arg_val:expr $(,)? }$(,)?) => {
$c.emit_arg($arg_val, |x| Instruction::$op { $arg: x })
};
($c:expr, Instruction::$op:ident( $arg_val:expr $(,)? )$(,)?) => {
$c.emit_arg($arg_val, Instruction::$op)
};
Expand Down Expand Up @@ -5127,12 +5121,12 @@ impl Compiler {

fn emit_load_const(&mut self, constant: ConstantData) {
let idx = self.arg_constant(constant);
self.emit_arg(idx, |idx| Instruction::LoadConst(idx))
self.emit_arg(idx, Instruction::LoadConst)
}

fn emit_return_const(&mut self, constant: ConstantData) {
let idx = self.arg_constant(constant);
self.emit_arg(idx, |idx| Instruction::ReturnConst(idx))
self.emit_arg(idx, Instruction::ReturnConst)
}

fn emit_return_value(&mut self) {
Expand Down