1
0
Fork 0
forked from AbleOS/ableos

fixing a bug in a disasm

Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
This commit is contained in:
Jakub Doka 2024-12-17 20:24:53 +01:00 committed by peony
parent 5a3ffbb1ec
commit 6ddc199b6a
3 changed files with 21 additions and 10 deletions

20
Cargo.lock generated
View file

@ -210,6 +210,10 @@ dependencies = [
"foldhash",
]
[[package]]
name = "hbbytecode"
version = "0.1.0"
[[package]]
name = "hbbytecode"
version = "0.1.0"
@ -218,20 +222,26 @@ source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#248bdf003aa991f4bad
[[package]]
name = "hblang"
version = "0.1.0"
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#248bdf003aa991f4bad18ddcb084532d1bcb78d5"
dependencies = [
"hashbrown",
"hbbytecode",
"hbvm",
"hbbytecode 0.1.0",
"hbvm 0.1.0",
"log",
]
[[package]]
name = "hbvm"
version = "0.1.0"
dependencies = [
"hbbytecode 0.1.0",
]
[[package]]
name = "hbvm"
version = "0.1.0"
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#248bdf003aa991f4bad18ddcb084532d1bcb78d5"
dependencies = [
"hbbytecode",
"hbbytecode 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)",
]
[[package]]
@ -391,7 +401,7 @@ dependencies = [
"crossbeam-queue",
"derive_more",
"hashbrown",
"hbvm",
"hbvm 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)",
"ktest_macro",
"limine",
"log",

View file

@ -109,7 +109,7 @@ impl Package {
std::fs::write(format!("target/programs/{}.hbf", self.name), &out)?;
out.clear();
hblang::run_compiler(
let err = hblang::run_compiler(
&path,
Options {
resolver: Some(hblang::ABLEOS_PATH_RESOLVER),
@ -119,9 +119,10 @@ impl Package {
},
out,
&mut warnings,
)?;
);
std::fs::write(format!("target/programs/{}.hba", self.name), &out)?;
out.clear();
return err;
}
Ok(())
}

View file

@ -253,10 +253,10 @@ TERM_BACKDROP={}
);
match p.build(&mut out) {
Ok(()) => {}
Err(_) => {
writeln!(errors, "========= while compiling {} =========", path)
Err(e) => {
writeln!(errors, "========= while compiling {} {} =========", path, e)
.unwrap();
errors.push_str(core::str::from_utf8(&out).expect("no"));
errors.push_str(&String::from_utf8_lossy(&out));
out.clear();
}
}