From 31e9f276ce5e10104450c66c505063538506b62a Mon Sep 17 00:00:00 2001 From: Ryan Hunt Date: Wed, 21 Jul 2021 21:02:02 +0000 Subject: [PATCH] Bug 1721001 - wasm: Fix bustage due to missing ifdefs. r=yury Differential Revision: https://phabricator.services.mozilla.com/D120382 --- js/src/wasm/WasmBaselineCompile.cpp | 7 +++++++ js/src/wasm/WasmOpIter.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/js/src/wasm/WasmBaselineCompile.cpp b/js/src/wasm/WasmBaselineCompile.cpp index 8394f05dd450..945d55d772d4 100644 --- a/js/src/wasm/WasmBaselineCompile.cpp +++ b/js/src/wasm/WasmBaselineCompile.cpp @@ -8633,6 +8633,8 @@ class BaseCompiler final : public BaseCompilerInterface { [[nodiscard]] bool emitTableGrow(); [[nodiscard]] bool emitTableSet(); [[nodiscard]] bool emitTableSize(); + +#ifdef ENABLE_WASM_GC [[nodiscard]] bool emitStructNewWithRtt(); [[nodiscard]] bool emitStructNewDefaultWithRtt(); [[nodiscard]] bool emitStructGet(FieldExtension extension); @@ -8661,6 +8663,7 @@ class BaseCompiler final : public BaseCompilerInterface { const StructField& field, AnyReg value); [[nodiscard]] bool emitGcArraySet(RegRef object, RegPtr data, RegI32 index, const ArrayType& array, AnyReg value); +#endif // ENABLE_WASM_GC #ifdef ENABLE_WASM_SIMD void emitVectorAndNot(); @@ -13421,6 +13424,8 @@ bool BaseCompiler::emitTableInit() { }); } +#ifdef ENABLE_WASM_GC + void BaseCompiler::emitGcCanon(uint32_t typeIndex) { const TypeIdDesc& typeId = moduleEnv_.typeIds[typeIndex]; RegRef rp = needRef(); @@ -14244,6 +14249,8 @@ bool BaseCompiler::emitBrOnCast() { return true; } +#endif // ENABLE_WASM_GC + #ifdef ENABLE_WASM_SIMD // Emitter trampolines used by abstracted SIMD operations. Naming here follows diff --git a/js/src/wasm/WasmOpIter.h b/js/src/wasm/WasmOpIter.h index 9a759ed0a028..7786dd2c0759 100644 --- a/js/src/wasm/WasmOpIter.h +++ b/js/src/wasm/WasmOpIter.h @@ -606,6 +606,8 @@ class MOZ_STACK_CLASS OpIter : private Policy { Value* value); [[nodiscard]] bool readTableSize(uint32_t* tableIndex); + +#ifdef ENABLE_WASM_GC [[nodiscard]] bool readStructNewWithRtt(uint32_t* typeIndex, Value* rtt, ValueVector* argValues); [[nodiscard]] bool readStructNewDefaultWithRtt(uint32_t* typeIndex, @@ -633,6 +635,7 @@ class MOZ_STACK_CLASS OpIter : private Policy { uint32_t* rttTypeIndex, uint32_t* rttDepth, ResultType* branchTargetType, ValueVector* values); +#endif #ifdef ENABLE_WASM_SIMD [[nodiscard]] bool readLaneIndex(uint32_t inputLanes, uint32_t* laneIndex); @@ -2864,6 +2867,8 @@ inline bool OpIter::readFieldIndex(uint32_t* fieldIndex, return true; } +#ifdef ENABLE_WASM_GC + template inline bool OpIter::readStructNewWithRtt(uint32_t* typeIndex, Value* rtt, @@ -3220,6 +3225,8 @@ inline bool OpIter::readBrOnCast(uint32_t* relativeDepth, Value* rtt, branchTargetType, values); } +#endif // ENABLE_WASM_GC + #ifdef ENABLE_WASM_SIMD template