Restructure and compartmentalize the project

This commit is contained in:
Rerumu
2022-06-23 20:14:04 -04:00
parent 59a5a3219f
commit 223895e617
34 changed files with 105 additions and 93 deletions
+2 -2
View File
@@ -10,8 +10,8 @@ cargo-fuzz = true
[dependencies]
libfuzzer-sys = "0.4"
wasm-smith = "0.8.0"
codegen-luajit = { path = "../codegen-luajit" }
codegen-luau = { path = "../codegen-luau" }
codegen-luajit = { path = "../codegen/luajit" }
codegen-luau = { path = "../codegen/luau" }
[dependencies.parity-wasm]
git = "https://github.com/paritytech/parity-wasm.git"
+4 -1
View File
@@ -134,7 +134,10 @@ impl Target for LuaJIT {
fn write_runtime(w: &mut dyn Write) -> Result<()> {
let runtime = codegen_luajit::RUNTIME;
writeln!(w, "local rt = (function() {runtime} end)()")?;
writeln!(w, "local rt = (function()")?;
writeln!(w, "{runtime}")?;
writeln!(w, "end)()")?;
writeln!(w, "{ASSERTION}")
}
+8 -1
View File
@@ -146,8 +146,15 @@ impl Target for Luau {
fn write_runtime(w: &mut dyn Write) -> Result<()> {
let runtime = codegen_luau::RUNTIME;
let numeric = codegen_luau::NUMERIC;
writeln!(w, "local rt = (function()")?;
writeln!(w, "local I64 = (function()")?;
writeln!(w, "{numeric}")?;
writeln!(w, "end)()")?;
writeln!(w, "{runtime}")?;
writeln!(w, "end)()")?;
writeln!(w, "local rt = (function() {runtime} end)()")?;
writeln!(w, "{ASSERTION}")
}