Skip to content

Commit

Permalink
Bug 1754018 - Make cranelift compile again. r=yury
Browse files Browse the repository at this point in the history
A field is removed from FuncType because it is never used and current
rustc throws an error for this.

A name change coming from the call_indirect work is propagated into
WasmCraneliftCompile.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D138053
  • Loading branch information
Lars T Hansen committed Feb 9, 2022
1 parent f5670ff commit 2a5a24a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/src/wasm/WasmCraneliftCompile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static bool GenerateCraneliftCode(
break;
}
case CraneliftMetadataEntry::Which::IndirectCall: {
CallSiteDesc desc(bytecodeOffset, CallSiteDesc::Dynamic);
CallSiteDesc desc(bytecodeOffset, CallSiteDesc::Indirect);
masm.append(desc, CodeOffset(offset.value()));
break;
}
Expand Down
3 changes: 1 addition & 2 deletions js/src/wasm/cranelift/src/bindings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ impl TableDesc {

#[derive(Clone)]
pub struct FuncType {
ptr: *const low_level::FuncType,
args: Vec<TypeCode>,
results: Vec<TypeCode>,
}
Expand All @@ -184,7 +183,7 @@ impl FuncType {
.map(|val_type| unsafe { low_level::env_unpack(*val_type) })
.collect();

Self { ptr, args, results }
Self { args, results }
}

pub(crate) fn args(&self) -> &[TypeCode] {
Expand Down

0 comments on commit 2a5a24a

Please sign in to comment.