Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Commit 9a40df4

Browse files
committed
misimplemented some cranelift functions, fix that
1 parent bd3c8d2 commit 9a40df4

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lucet-runtime/lucet-runtime-tests/src/host.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ macro_rules! host_tests {
470470
.new_instance(module)
471471
.expect("instance can be created");
472472
assert_eq!(
473-
u64::from(inst.run("entrypoint_restore", &[]).unwrap()),
473+
u64::from(inst.run("entrypoint_restore", &[]).unwrap().returned().unwrap()),
474474
6148914668330025056
475475
);
476476
}

lucetc/src/function.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ impl<'a> TargetEnvironment for FuncInfo<'a> {
278278
use cranelift_codegen::ir::{Function, Heap, Table, Value};
279279
impl<'a> FuncEnvironment for FuncInfo<'a> {
280280
fn is_wasm_parameter(&self, f: &Function, u: usize) -> bool {
281-
false
281+
use cranelift_codegen::ir::ArgumentPurpose;
282+
f.signature.params.get(u).expect("parameter index is valid").purpose == ArgumentPurpose::Normal
282283
}
283284

284285
fn translate_memory_copy(&mut self, cursor: FuncCursor, idx: MemoryIndex, heap: Heap, value: Value, v2: Value, v3: Value) -> Result<(), WasmError> {

0 commit comments

Comments
 (0)