cranelift-module: document that finalize methods may not be relevant
This commit is contained in:
committed by
Benjamin Bouvier
parent
3c15f8f129
commit
51229c3f58
@@ -119,6 +119,9 @@ where
|
|||||||
|
|
||||||
/// Perform all outstanding relocations on the given function. This requires all `Local`
|
/// Perform all outstanding relocations on the given function. This requires all `Local`
|
||||||
/// and `Export` entities referenced to be defined.
|
/// and `Export` entities referenced to be defined.
|
||||||
|
///
|
||||||
|
/// This method is not relevant for `Backend` implementations that do not provide
|
||||||
|
/// `Backend::FinalizedFunction`.
|
||||||
fn finalize_function(
|
fn finalize_function(
|
||||||
&mut self,
|
&mut self,
|
||||||
id: FuncId,
|
id: FuncId,
|
||||||
@@ -131,6 +134,9 @@ where
|
|||||||
|
|
||||||
/// Perform all outstanding relocations on the given data object. This requires all
|
/// Perform all outstanding relocations on the given data object. This requires all
|
||||||
/// `Local` and `Export` entities referenced to be defined.
|
/// `Local` and `Export` entities referenced to be defined.
|
||||||
|
///
|
||||||
|
/// This method is not relevant for `Backend` implementations that do not provide
|
||||||
|
/// `Backend::FinalizedData`.
|
||||||
fn finalize_data(
|
fn finalize_data(
|
||||||
&mut self,
|
&mut self,
|
||||||
id: DataId,
|
id: DataId,
|
||||||
@@ -142,6 +148,9 @@ where
|
|||||||
fn get_finalized_data(&self, data: &Self::CompiledData) -> Self::FinalizedData;
|
fn get_finalized_data(&self, data: &Self::CompiledData) -> Self::FinalizedData;
|
||||||
|
|
||||||
/// "Publish" all finalized functions and data objects to their ultimate destinations.
|
/// "Publish" all finalized functions and data objects to their ultimate destinations.
|
||||||
|
///
|
||||||
|
/// This method is not relevant for `Backend` implementations that do not provide
|
||||||
|
/// `Backend::FinalizedFunction` or `Backend::FinalizedData`.
|
||||||
fn publish(&mut self);
|
fn publish(&mut self);
|
||||||
|
|
||||||
/// Consume this `Backend` and return a result. Some implementations may
|
/// Consume this `Backend` and return a result. Some implementations may
|
||||||
|
|||||||
@@ -648,6 +648,9 @@ where
|
|||||||
///
|
///
|
||||||
/// Use `get_finalized_function` and `get_finalized_data` to obtain the final
|
/// Use `get_finalized_function` and `get_finalized_data` to obtain the final
|
||||||
/// artifacts.
|
/// artifacts.
|
||||||
|
///
|
||||||
|
/// This method is not relevant for `Backend` implementations that do not provide
|
||||||
|
/// `Backend::FinalizedFunction` or `Backend::FinalizedData`.
|
||||||
pub fn finalize_definitions(&mut self) {
|
pub fn finalize_definitions(&mut self) {
|
||||||
for func in self.functions_to_finalize.drain(..) {
|
for func in self.functions_to_finalize.drain(..) {
|
||||||
let info = &self.contents.functions[func];
|
let info = &self.contents.functions[func];
|
||||||
|
|||||||
Reference in New Issue
Block a user