luaur_compile_cli/records/
compile_stats.rs1use luaur_code_gen::records::lowering_stats::LoweringStats;
2
3#[derive(Debug, Clone)]
4pub struct CompileStats {
5 pub lines: usize,
6 pub bytecode: usize,
7 pub bytecode_instruction_count: usize,
8 pub codegen: usize,
9
10 pub read_time: f64,
11 pub misc_time: f64,
12 pub parse_time: f64,
13 pub compile_time: f64,
14 pub codegen_time: f64,
15
16 pub lower_stats: LoweringStats,
17}
18
19impl Default for CompileStats {
20 fn default() -> Self {
21 Self {
22 lines: 0,
23 bytecode: 0,
24 bytecode_instruction_count: 0,
25 codegen: 0,
26 read_time: 0.0,
27 misc_time: 0.0,
28 parse_time: 0.0,
29 compile_time: 0.0,
30 codegen_time: 0.0,
31 lower_stats: LoweringStats {
32 total_functions: 0,
33 skipped_functions: 0,
34 spills_to_slot: 0,
35 spills_to_restore: 0,
36 max_spill_slots_used: 0,
37 blocks_pre_opt: 0,
38 blocks_post_opt: 0,
39 max_block_instructions: 0,
40 reg_alloc_errors: 0,
41 lowering_errors: 0,
42 block_linearization_stats: Default::default(),
43 function_stats_flags: 0,
44 functions: Vec::new(),
45 },
46 }
47 }
48}