Bug 1861078: apply code formatting via Lando

# ignore-this-changeset
This commit is contained in:
Otto Länd
2025-03-03 16:40:41 +00:00
parent e2c94653c9
commit 39f7dc3e29
4 changed files with 23 additions and 26 deletions

View File

@@ -16284,8 +16284,7 @@ bool CodeGenerator::generateWasm(wasm::CallIndirectId callIndirectId,
MOZ_ASSERT(functionEntryStackMap); MOZ_ASSERT(functionEntryStackMap);
if (functionEntryStackMap && if (functionEntryStackMap &&
!stackMaps->add(trapInsnOffset.offset(), !stackMaps->add(trapInsnOffset.offset(), functionEntryStackMap)) {
functionEntryStackMap)) {
functionEntryStackMap->destroy(); functionEntryStackMap->destroy();
return false; return false;
} }

View File

@@ -247,7 +247,8 @@ struct StackMap final {
static_assert(sizeof(StackMap) == 12, "wasm::StackMap has unexpected size"); static_assert(sizeof(StackMap) == 12, "wasm::StackMap has unexpected size");
// A map from an offset relative to the beginning of a code block to a StackMap // A map from an offset relative to the beginning of a code block to a StackMap
using StackMapHashMap = HashMap<uint32_t, StackMap*, DefaultHasher<uint32_t>, SystemAllocPolicy>; using StackMapHashMap =
HashMap<uint32_t, StackMap*, DefaultHasher<uint32_t>, SystemAllocPolicy>;
class StackMaps { class StackMaps {
private: private:
@@ -267,9 +268,7 @@ public:
[[nodiscard]] bool add(uint32_t codeOffset, StackMap* map) { [[nodiscard]] bool add(uint32_t codeOffset, StackMap* map) {
return mapping_.put(codeOffset, map); return mapping_.put(codeOffset, map);
} }
void clear() { void clear() { mapping_.clear(); }
mapping_.clear();
}
bool empty() const { return mapping_.empty(); } bool empty() const { return mapping_.empty(); }
// Return the number of stack maps contained in this. // Return the number of stack maps contained in this.
size_t length() const { return mapping_.count(); } size_t length() const { return mapping_.count(); }

View File

@@ -1892,8 +1892,7 @@ static bool AddStackCheckForImportFunctionEntry(jit::MacroAssembler& masm,
// In debug builds, we'll always have a stack map, even if there are no // In debug builds, we'll always have a stack map, even if there are no
// refs to track. // refs to track.
MOZ_ASSERT(stackMap); MOZ_ASSERT(stackMap);
if (stackMap && if (stackMap && !stackMaps->add(trapInsnOffset.offset(), stackMap)) {
!stackMaps->add(trapInsnOffset.offset(), stackMap)) {
stackMap->destroy(); stackMap->destroy();
return false; return false;
} }