@@ -17,7 +17,7 @@ use value::{Function, Value};
17
17
/// An abstract interface for implementation execution of LLVM modules.
18
18
///
19
19
/// This is designed to support both interpreter and just-in-time (JIT) compiler implementations.
20
- pub trait ExecutionEngine < ' a , ' b : ' a > where LLVMExecutionEngineRef : From < & ' b Self > {
20
+ pub trait ExecutionEngine < ' a , ' b : ' a > : Sized + ' b where LLVMExecutionEngineRef : From < & ' b Self > {
21
21
/// The options given to the engine upon creation.
22
22
type Options : Copy ;
23
23
/// Create a new execution engine with the given `Module` and options, or return a
@@ -130,9 +130,9 @@ impl<'a, 'b> JitEngine<'a> {
130
130
mem:: transmute ( ptr)
131
131
}
132
132
}
133
- impl < ' a , ' b : ' a > ExecutionEngine < ' a , ' b > for JitEngine < ' a > {
133
+ impl < ' a , ' b : ' a > ExecutionEngine < ' a , ' b > for JitEngine < ' b > {
134
134
type Options = JitOptions ;
135
- fn new ( module : & ' a Module , options : JitOptions ) -> Result < JitEngine < ' a > , CBox < str > > {
135
+ fn new ( module : & ' a Module , options : JitOptions ) -> Result < JitEngine < ' b > , CBox < str > > {
136
136
unsafe {
137
137
let mut ee = mem:: uninitialized ( ) ;
138
138
let mut out = mem:: zeroed ( ) ;
@@ -176,9 +176,9 @@ impl<'a> Interpreter<'a> {
176
176
unsafe { engine:: LLVMRunFunction ( self . into ( ) , function. into ( ) , args. len ( ) as c_uint , ptr) . into ( ) }
177
177
}
178
178
}
179
- impl < ' a , ' b : ' a > ExecutionEngine < ' a , ' b > for Interpreter < ' a > {
179
+ impl < ' a , ' b : ' a > ExecutionEngine < ' a , ' b > for Interpreter < ' b > {
180
180
type Options = ( ) ;
181
- fn new ( module : & ' a Module , _: ( ) ) -> Result < Interpreter < ' a > , CBox < str > > {
181
+ fn new ( module : & ' a Module , _: ( ) ) -> Result < Interpreter < ' b > , CBox < str > > {
182
182
unsafe {
183
183
let mut ee = mem:: uninitialized ( ) ;
184
184
let mut out = mem:: zeroed ( ) ;
0 commit comments