[SimpleJIT] When finalizing multiple functions, make them all executable at the end. (#474)

Add `publish()` function to cranelift-module's `Backend` trait, which
allows `finalize_all()` to defer making memory executable until it
has finished all of the patching it needs to do.
This commit is contained in:
Dan Gohman
2018-08-28 15:27:52 -07:00
committed by GitHub
parent 8e2d01a675
commit 9ada394d11
4 changed files with 23 additions and 4 deletions

View File

@@ -105,6 +105,9 @@ where
namespace: &ModuleNamespace<Self>,
) -> Self::FinalizedData;
/// "Publish" all finalized functions and data objects to their ultimate destinations.
fn publish(&mut self);
/// Consume this `Backend` and return a result. Some implementations may
/// provide additional functionality through this result.
fn finish(self) -> Self::Product;