Skip to content

Commit 6900c99

Browse files
committed
Update Cranelift to 0.96.0
1 parent b773282 commit 6900c99

File tree

6 files changed

+100
-89
lines changed

6 files changed

+100
-89
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ crate-type = ["dylib"]
1515

1616
[dependencies]
1717
# These have to be in sync with each other
18-
cranelift-codegen = { version = "0.95.1", features = ["unwind", "all-arch"] }
19-
cranelift-frontend = { version = "0.95.1" }
20-
cranelift-module = { version = "0.95.1" }
21-
cranelift-native = { version = "0.95.1" }
22-
cranelift-jit = { version = "0.95.1", optional = true }
23-
cranelift-object = { version = "0.95.1" }
18+
cranelift-codegen = { version = "0.96", features = ["unwind", "all-arch"] }
19+
cranelift-frontend = { version = "0.96" }
20+
cranelift-module = { version = "0.96" }
21+
cranelift-native = { version = "0.96" }
22+
cranelift-jit = { version = "0.96", optional = true }
23+
cranelift-object = { version = "0.96" }
2424
target-lexicon = "0.12.0"
2525
gimli = { version = "0.27.2", default-features = false, features = ["write"]}
2626
object = { version = "0.30.3", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

src/allocator.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ fn codegen_inner(
8585
);
8686

8787
let data_id = module.declare_data(OomStrategy::SYMBOL, Linkage::Export, false, false).unwrap();
88-
let mut data_ctx = DataContext::new();
89-
data_ctx.set_align(1);
88+
let mut data = DataDescription::new();
89+
data.set_align(1);
9090
let val = oom_strategy.should_panic();
91-
data_ctx.define(Box::new([val]));
92-
module.define_data(data_id, &data_ctx).unwrap();
91+
data.define(Box::new([val]));
92+
module.define_data(data_id, &data).unwrap();
9393
}

src/common.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,12 +458,12 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
458458
}
459459

460460
pub(crate) fn anonymous_str(&mut self, msg: &str) -> Value {
461-
let mut data_ctx = DataContext::new();
462-
data_ctx.define(msg.as_bytes().to_vec().into_boxed_slice());
461+
let mut data = DataDescription::new();
462+
data.define(msg.as_bytes().to_vec().into_boxed_slice());
463463
let msg_id = self.module.declare_anonymous_data(false, false).unwrap();
464464

465465
// Ignore DuplicateDefinition error, as the data will be the same
466-
let _ = self.module.define_data(msg_id, &data_ctx);
466+
let _ = self.module.define_data(msg_id, &data);
467467

468468
let local_msg_id = self.module.declare_data_in_func(msg_id, self.bcx.func);
469469
if self.clif_comments.enabled() {

0 commit comments

Comments
 (0)