Skip to content

Commit 253cded

Browse files
committed
update to cranelift 0.68
1 parent fb3f889 commit 253cded

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎Cargo.toml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ name = "toy"
1111
path = "src/toy.rs"
1212

1313
[dependencies]
14-
cranelift = "0.66.0"
15-
cranelift-module = "0.66.0"
16-
cranelift-simplejit = "0.66.0"
14+
cranelift = "0.68.0"
15+
cranelift-module = "0.68.0"
16+
cranelift-simplejit = "0.68.0"
1717
peg = "0.6"

‎src/jit.rs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::collections::HashMap;
22

33
use cranelift::prelude::*;
44
use cranelift_module::{DataContext, Linkage, Module};
5-
use cranelift_simplejit::{SimpleJITBackend, SimpleJITBuilder};
5+
use cranelift_simplejit::{SimpleJITModule, SimpleJITBuilder};
66
use frontend::*;
77
use std::slice;
88

@@ -22,14 +22,14 @@ pub struct JIT {
2222

2323
/// The module, with the simplejit backend, which manages the JIT'd
2424
/// functions.
25-
module: Module<SimpleJITBackend>,
25+
module: SimpleJITModule,
2626
}
2727

2828
impl JIT {
2929
/// Create a new `JIT` instance.
3030
pub fn new() -> Self {
3131
let builder = SimpleJITBuilder::new(cranelift_module::default_libcall_names());
32-
let module = Module::new(builder);
32+
let module = SimpleJITModule::new(builder);
3333
Self {
3434
builder_context: FunctionBuilderContext::new(),
3535
ctx: module.make_context(),
@@ -89,7 +89,7 @@ impl JIT {
8989
self.data_ctx.define(contents.into_boxed_slice());
9090
let id = self
9191
.module
92-
.declare_data(name, Linkage::Export, true, false, None)
92+
.declare_data(name, Linkage::Export, true, false)
9393
.map_err(|e| e.to_string())?;
9494

9595
self.module
@@ -178,7 +178,7 @@ struct FunctionTranslator<'a> {
178178
int: types::Type,
179179
builder: FunctionBuilder<'a>,
180180
variables: HashMap<String, Variable>,
181-
module: &'a mut Module<SimpleJITBackend>,
181+
module: &'a mut SimpleJITModule,
182182
}
183183

184184
impl<'a> FunctionTranslator<'a> {
@@ -374,7 +374,7 @@ impl<'a> FunctionTranslator<'a> {
374374
fn translate_global_data_addr(&mut self, name: String) -> Value {
375375
let sym = self
376376
.module
377-
.declare_data(&name, Linkage::Export, true, false, None)
377+
.declare_data(&name, Linkage::Export, true, false)
378378
.expect("problem declaring data object");
379379
let local_id = self
380380
.module

0 commit comments

Comments
 (0)