Initial SSA impl + docs

This commit is contained in:
2026-09-02 13:16:05 +00:00
parent a8acb7706c
commit c7d44584d9
6 changed files with 1255 additions and 33 deletions
+5 -1
View File
@@ -6,6 +6,7 @@ use std::process::Command;
use flatten::flatten;
use parse::QuickJSBinary;
use ssa::convert_ssa;
const QJSC: &str = "../third_party/quickjs/build/qjsc";
const BIN_OUT: &str = "/tmp/qjsrt.bin";
@@ -16,7 +17,7 @@ fn main() {
// Compile source file
let output = Command::new(QJSC)
.args(["-b", "-m", "-o", BIN_OUT])
.args(["-b", "-o", BIN_OUT])
.arg(filename)
.output()
.unwrap();
@@ -27,4 +28,7 @@ fn main() {
let bin = std::fs::read(BIN_OUT).unwrap();
let (_, parsed) = QuickJSBinary::parse(&bin).unwrap();
let (flat_fns, atoms) = flatten(parsed);
println!("{atoms:#?}");
convert_ssa(flat_fns);
}