Derive Default for CompileOpts

This commit is contained in:
Jeong YunWon 2021-09-30 03:59:18 +09:00
parent ae122c6478
commit d0c436949e

View file

@ -64,19 +64,13 @@ struct Compiler {
opts: CompileOpts,
}
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Default)]
pub struct CompileOpts {
/// How optimized the bytecode output should be; any optimize > 0 does
/// not emit assert statements
pub optimize: u8,
}
impl Default for CompileOpts {
fn default() -> Self {
CompileOpts { optimize: 0 }
}
}
#[derive(Debug, Clone, Copy)]
struct CompileContext {
loop_data: Option<(ir::BlockIdx, ir::BlockIdx)>,