Skip to content

Commit 0fddb04

Browse files
committed
Update cranelift dependencies
1 parent 6c52c5c commit 0fddb04

3 files changed

Lines changed: 39 additions & 142 deletions

File tree

Cargo.lock

Lines changed: 30 additions & 133 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jit/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ edition = "2018"
1010
autotests = false
1111

1212
[dependencies]
13-
cranelift = "0.66.0"
14-
cranelift-module = "0.66.0"
15-
cranelift-simplejit = "0.66.0"
13+
cranelift = "0.68.0"
14+
cranelift-module = "0.68.0"
15+
cranelift-simplejit = "0.68.0"
1616
num-traits = "0.2"
17-
libffi = "0.9.0"
17+
libffi = "1.0"
1818
rustpython-bytecode = { path = "../bytecode", version = "0.1.2" }
1919
thiserror = "1.0"
2020

jit/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::fmt;
22

33
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};
66

77
use rustpython_bytecode::bytecode;
88

@@ -32,13 +32,13 @@ pub enum JitArgumentError {
3232
struct Jit {
3333
builder_context: FunctionBuilderContext,
3434
ctx: codegen::Context,
35-
module: Module<SimpleJITBackend>,
35+
module: SimpleJITModule,
3636
}
3737

3838
impl Jit {
3939
fn new() -> Self {
4040
let builder = SimpleJITBuilder::new(cranelift_module::default_libcall_names());
41-
let module = Module::new(builder);
41+
let module = SimpleJITModule::new(builder);
4242
Self {
4343
builder_context: FunctionBuilderContext::new(),
4444
ctx: module.make_context(),
@@ -112,7 +112,7 @@ pub fn compile<C: bytecode::Constant>(
112112
pub struct CompiledCode {
113113
sig: JitSig,
114114
code: *const u8,
115-
memory: <SimpleJITBackend as Backend>::Product,
115+
memory: SimpleJITProduct,
116116
}
117117

118118
impl CompiledCode {

0 commit comments

Comments
 (0)