forked from AbleOS/holey-bytes
fixing a leaked reg bug when constant happens
This commit is contained in:
parent
6b7572f089
commit
802e8b5d55
|
@ -1242,6 +1242,7 @@ impl Codegen {
|
|||
|
||||
self.ci.emit(neg(dst.get(), oper.get()));
|
||||
self.ci.free_loc(drop_loc);
|
||||
self.ci.regs.free(oper);
|
||||
|
||||
Some(Value::new(value.ty, dst))
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@ use {
|
|||
pub struct Logger;
|
||||
|
||||
impl log::Log for Logger {
|
||||
fn enabled(&self, metadata: &log::Metadata) -> bool {
|
||||
log::max_level() >= metadata.level()
|
||||
fn enabled(&self, _: &log::Metadata) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn log(&self, record: &log::Record) {
|
||||
|
|
|
@ -3,9 +3,11 @@ fn main() -> std::io::Result<()> {
|
|||
use std::io::Write;
|
||||
|
||||
log::set_logger(&hblang::Logger).unwrap();
|
||||
log::set_max_level(log::LevelFilter::Error);
|
||||
|
||||
let args = std::env::args().collect::<Vec<_>>();
|
||||
let args = args.iter().map(String::as_str).collect::<Vec<_>>();
|
||||
|
||||
let opts = hblang::Options::from_args(&args)?;
|
||||
let file = args.iter().filter(|a| !a.starts_with('-')).nth(1).copied().unwrap_or("main.hb");
|
||||
|
||||
|
|
|
@ -1314,7 +1314,6 @@ pub fn report_to(
|
|||
|
||||
_ = writeln!(out, "{}", line.replace("\t", " "));
|
||||
_ = writeln!(out, "{}^", " ".repeat(col - 1));
|
||||
todo!()
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Hash)]
|
||||
|
|
Loading…
Reference in a new issue