luaur_compile_cli/methods/
compile_stats_operator_add_assign.rs1use crate::records::compile_stats::CompileStats;
2
3impl CompileStats {
4 pub fn compile_stats_operator_add_assign(&mut self, other: &CompileStats) -> &mut Self {
5 self.lines += other.lines;
6 self.bytecode += other.bytecode;
7 self.bytecode_instruction_count += other.bytecode_instruction_count;
8 self.codegen += other.codegen;
9 self.read_time += other.read_time;
10 self.misc_time += other.misc_time;
11 self.parse_time += other.parse_time;
12 self.compile_time += other.compile_time;
13 self.codegen_time += other.codegen_time;
14 self.lower_stats += other.lower_stats.clone();
15 self
16 }
17}
18
19#[allow(non_snake_case)]
20impl core::ops::AddAssign<&CompileStats> for CompileStats {
21 fn add_assign(&mut self, other: &CompileStats) {
22 self.compile_stats_operator_add_assign(other);
23 }
24}