Struct llvm::Interpreter
[−]
[src]
pub struct Interpreter(_);
The interpreter backend
Methods
impl<'a> Interpreter
[src]
fn run_function(&self, function: &'a Function, args: &[GenericValue<'a>]) -> GenericValue<'a>
Run function
with the arguments given as `GenericValue
s, then return the result as one.
To convert the arguments to GenericValue
s, you should use the GenericValueCast::to_generic
method.
To convert the return value from a GenericValue
, you should use the GenericValueCast::from_generic
method.
Trait Implementations
impl Eq for Interpreter
[src]
impl PartialEq<Interpreter> for Interpreter
[src]
fn eq(&self, other: &Interpreter) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<Interpreter> for &'a Interpreter
[src]
fn eq(&self, other: &Interpreter) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> From<LLVMExecutionEngineRef> for &'a Interpreter
[src]
fn from(ty: LLVMExecutionEngineRef) -> &'a Interpreter
Performs the conversion.
impl<'a> From<LLVMExecutionEngineRef> for &'a mut Interpreter
[src]
fn from(ty: LLVMExecutionEngineRef) -> &'a mut Interpreter
Performs the conversion.
impl DisposeRef for Interpreter
[src]
type RefTo = LLVMOpaqueExecutionEngine
What a reference to this type represents as a C pointer.
unsafe fn dispose(ptr: *mut LLVMOpaqueExecutionEngine)
Destroy the contents at the pointer's location. Read more
impl<'a> ExecutionEngine<'a> for Interpreter
[src]
type Options = ()
The options given to the engine upon creation.
fn new(module: &'a Module, _: ()) -> Result<CSemiBox<'a, Interpreter>, CBox<str>>
Create a new execution engine with the given Module
and optiions, or return a description of the error. Read more
fn add_module(&'a self, module: &'a Module)
Add a module to the list of modules to interpret or compile.
fn remove_module(&'a self, module: &'a Module) -> &'a Module
Remove a module from the list of modules to interpret or compile.
fn run_static_constructors(&'a self)
Execute all of the static constructors for this program.
fn run_static_destructors(&'a self)
Execute all of the static destructors for this program.
fn find_function(&'a self, name: &str) -> Option<&'a Function>
Attempt to find a function with the name given, or None
if there wasn't a function with that name. Read more
fn run_function(&'a self, function: &'a Function, args: &[GenericValue<'a>]) -> GenericValue<'a>
Run function
with the arguments given as `GenericValue
s, then return the result as one. Read more
unsafe fn get_global<T>(&'a self, global: &'a Value) -> &'a T
Returns a pointer to the global value given. Read more
unsafe fn find_global<T>(&'a self, name: &str) -> Option<&'a T>
Returns a pointer to the global value with the name given. Read more