From 2a5a24a11d5c606baca792f917101adb5d879043 Mon Sep 17 00:00:00 2001 From: Lars T Hansen Date: Wed, 9 Feb 2022 15:58:22 +0000 Subject: [PATCH] Bug 1754018 - Make cranelift compile again. r=yury 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 --- js/src/wasm/WasmCraneliftCompile.cpp | 2 +- js/src/wasm/cranelift/src/bindings/mod.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/js/src/wasm/WasmCraneliftCompile.cpp b/js/src/wasm/WasmCraneliftCompile.cpp index 0e54166729f17..651f199c3e955 100644 --- a/js/src/wasm/WasmCraneliftCompile.cpp +++ b/js/src/wasm/WasmCraneliftCompile.cpp @@ -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; } diff --git a/js/src/wasm/cranelift/src/bindings/mod.rs b/js/src/wasm/cranelift/src/bindings/mod.rs index a8ef0cd0d9971..5942ff015060e 100644 --- a/js/src/wasm/cranelift/src/bindings/mod.rs +++ b/js/src/wasm/cranelift/src/bindings/mod.rs @@ -161,7 +161,6 @@ impl TableDesc { #[derive(Clone)] pub struct FuncType { - ptr: *const low_level::FuncType, args: Vec, results: Vec, } @@ -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] {