fixing a bug in a disasm
Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
This commit is contained in:
parent
9a06b329f4
commit
ad587fe464
20
Cargo.lock
generated
20
Cargo.lock
generated
|
@ -210,6 +210,10 @@ dependencies = [
|
||||||
"foldhash",
|
"foldhash",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hbbytecode"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hbbytecode"
|
name = "hbbytecode"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
@ -218,20 +222,26 @@ source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#248bdf003aa991f4bad
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hblang"
|
name = "hblang"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#248bdf003aa991f4bad18ddcb084532d1bcb78d5"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
"hbbytecode",
|
"hbbytecode 0.1.0",
|
||||||
"hbvm",
|
"hbvm 0.1.0",
|
||||||
"log",
|
"log",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hbvm"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"hbbytecode 0.1.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hbvm"
|
name = "hbvm"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#248bdf003aa991f4bad18ddcb084532d1bcb78d5"
|
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#248bdf003aa991f4bad18ddcb084532d1bcb78d5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hbbytecode",
|
"hbbytecode 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -391,7 +401,7 @@ dependencies = [
|
||||||
"crossbeam-queue",
|
"crossbeam-queue",
|
||||||
"derive_more",
|
"derive_more",
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
"hbvm",
|
"hbvm 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)",
|
||||||
"ktest_macro",
|
"ktest_macro",
|
||||||
"limine",
|
"limine",
|
||||||
"log",
|
"log",
|
||||||
|
|
|
@ -109,7 +109,7 @@ impl Package {
|
||||||
std::fs::write(format!("target/programs/{}.hbf", self.name), &out)?;
|
std::fs::write(format!("target/programs/{}.hbf", self.name), &out)?;
|
||||||
out.clear();
|
out.clear();
|
||||||
|
|
||||||
hblang::run_compiler(
|
let err = hblang::run_compiler(
|
||||||
&path,
|
&path,
|
||||||
Options {
|
Options {
|
||||||
resolver: Some(hblang::ABLEOS_PATH_RESOLVER),
|
resolver: Some(hblang::ABLEOS_PATH_RESOLVER),
|
||||||
|
@ -119,9 +119,10 @@ impl Package {
|
||||||
},
|
},
|
||||||
out,
|
out,
|
||||||
&mut warnings,
|
&mut warnings,
|
||||||
)?;
|
);
|
||||||
std::fs::write(format!("target/programs/{}.hba", self.name), &out)?;
|
std::fs::write(format!("target/programs/{}.hba", self.name), &out)?;
|
||||||
out.clear();
|
out.clear();
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,10 +253,10 @@ TERM_BACKDROP={}
|
||||||
);
|
);
|
||||||
match p.build(&mut out) {
|
match p.build(&mut out) {
|
||||||
Ok(()) => {}
|
Ok(()) => {}
|
||||||
Err(_) => {
|
Err(e) => {
|
||||||
writeln!(errors, "========= while compiling {} =========", path)
|
writeln!(errors, "========= while compiling {} {} =========", path, e)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
errors.push_str(core::str::from_utf8(&out).expect("no"));
|
errors.push_str(&String::from_utf8_lossy(&out));
|
||||||
out.clear();
|
out.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue