Add a minimal SimpleJIT example program.

This minimally demonstrates usage of the API, and serves as a very small
testcase to test that the basic JIT mechanisms are working.
This commit is contained in:
Dan Gohman
2018-08-28 16:10:39 -07:00
parent bdd1949b34
commit d2943ec32d
7 changed files with 114 additions and 5 deletions

View File

@@ -334,7 +334,10 @@ impl<'simple_jit_backend> Backend for SimpleJITBackend {
_ => unimplemented!(),
}
}
func.code
}
fn get_finalized_function(&self, func: &Self::CompiledFunction) -> Self::FinalizedFunction {
func.code
}
@@ -394,7 +397,10 @@ impl<'simple_jit_backend> Backend for SimpleJITBackend {
}
}
}
(data.storage, data.size)
}
fn get_finalized_data(&self, data: &Self::CompiledData) -> Self::FinalizedData {
(data.storage, data.size)
}