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

@@ -97,6 +97,9 @@ where
namespace: &ModuleNamespace<Self>,
) -> Self::FinalizedFunction;
/// Return the finalized artifact from the backend, if relevant.
fn get_finalized_function(&self, func: &Self::CompiledFunction) -> Self::FinalizedFunction;
/// Perform all outstanding relocations on the given data object. This requires all
/// `Local` and `Export` entities referenced to be defined.
fn finalize_data(
@@ -105,6 +108,9 @@ where
namespace: &ModuleNamespace<Self>,
) -> Self::FinalizedData;
/// Return the finalized artifact from the backend, if relevant.
fn get_finalized_data(&self, data: &Self::CompiledData) -> Self::FinalizedData;
/// "Publish" all finalized functions and data objects to their ultimate destinations.
fn publish(&mut self);