|
1 | 1 | use std::fmt; |
2 | 2 |
|
3 | 3 | use cranelift::prelude::*; |
4 | | -use cranelift_module::{Backend, FuncId, Linkage, Module, ModuleError}; |
5 | | -use cranelift_simplejit::{SimpleJITBackend, SimpleJITBuilder}; |
| 4 | +use cranelift_module::{FuncId, Linkage, Module, ModuleError}; |
| 5 | +use cranelift_simplejit::{SimpleJITBuilder, SimpleJITModule, SimpleJITProduct}; |
6 | 6 |
|
7 | 7 | use rustpython_bytecode::bytecode; |
8 | 8 |
|
@@ -32,13 +32,13 @@ pub enum JitArgumentError { |
32 | 32 | struct Jit { |
33 | 33 | builder_context: FunctionBuilderContext, |
34 | 34 | ctx: codegen::Context, |
35 | | - module: Module<SimpleJITBackend>, |
| 35 | + module: SimpleJITModule, |
36 | 36 | } |
37 | 37 |
|
38 | 38 | impl Jit { |
39 | 39 | fn new() -> Self { |
40 | 40 | let builder = SimpleJITBuilder::new(cranelift_module::default_libcall_names()); |
41 | | - let module = Module::new(builder); |
| 41 | + let module = SimpleJITModule::new(builder); |
42 | 42 | Self { |
43 | 43 | builder_context: FunctionBuilderContext::new(), |
44 | 44 | ctx: module.make_context(), |
@@ -112,7 +112,7 @@ pub fn compile<C: bytecode::Constant>( |
112 | 112 | pub struct CompiledCode { |
113 | 113 | sig: JitSig, |
114 | 114 | code: *const u8, |
115 | | - memory: <SimpleJITBackend as Backend>::Product, |
| 115 | + memory: SimpleJITProduct, |
116 | 116 | } |
117 | 117 |
|
118 | 118 | impl CompiledCode { |
|
0 commit comments