commit de34c2c122b6ec72765788c3215643df4b6e6c82
parent bcd6c96a05c1cb2527f1b8ac1fb0ce7645b8c37c
Author: André Bargull <andre.bargull@gmail.com>
Date: Thu, 30 Oct 2025 17:01:31 +0000
Bug 1997308: Remove Label template parameter in branchPtrImpl and branchTestMagicImpl. r=spidermonkey-reviewers,jandem
- The `template` parameter for `branchPtrImpl` was added in bug 1277973,
but that code was later removed in bug 1428453.
- The `templat parameter for `branchTestMagicImpl` was added in bug 1240583,
but that code was later removed in bug 1277973.
Differential Revision: https://phabricator.services.mozilla.com/D270660
Diffstat:
4 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h
@@ -2064,9 +2064,9 @@ class MacroAssembler : public MacroAssemblerSpecific {
Imm32 imm) PER_SHARED_ARCH;
private:
- template <typename T, typename S, typename L>
- inline void branchPtrImpl(Condition cond, const T& lhs, const S& rhs, L label)
- DEFINED_ON(x86_shared);
+ template <typename T, typename S>
+ inline void branchPtrImpl(Condition cond, const T& lhs, const S& rhs,
+ Label* label) DEFINED_ON(x86_shared);
void branchPtrInNurseryChunkImpl(Condition cond, Register ptr, Label* label)
DEFINED_ON(x86);
@@ -2111,8 +2111,8 @@ class MacroAssembler : public MacroAssemblerSpecific {
template <typename T>
inline void branchTestPrimitiveImpl(Condition cond, const T& t, Label* label)
DEFINED_ON(arm, arm64, x86_shared);
- template <typename T, class L>
- inline void branchTestMagicImpl(Condition cond, const T& t, L label)
+ template <typename T>
+ inline void branchTestMagicImpl(Condition cond, const T& t, Label* label)
DEFINED_ON(arm, arm64, x86_shared);
public:
diff --git a/js/src/jit/arm/MacroAssembler-arm-inl.h b/js/src/jit/arm/MacroAssembler-arm-inl.h
@@ -2361,8 +2361,9 @@ void MacroAssembler::branchTestMagic(Condition cond, const ValueOperand& value,
branchTestMagicImpl(cond, value, label);
}
-template <typename T, class L>
-void MacroAssembler::branchTestMagicImpl(Condition cond, const T& t, L label) {
+template <typename T>
+void MacroAssembler::branchTestMagicImpl(Condition cond, const T& t,
+ Label* label) {
cond = testMagic(cond, t);
ma_b(label, cond);
}
diff --git a/js/src/jit/arm64/MacroAssembler-arm64-inl.h b/js/src/jit/arm64/MacroAssembler-arm64-inl.h
@@ -2138,8 +2138,9 @@ void MacroAssembler::branchTestMagic(Condition cond, const ValueOperand& value,
branchTestMagicImpl(cond, value, label);
}
-template <typename T, class L>
-void MacroAssembler::branchTestMagicImpl(Condition cond, const T& t, L label) {
+template <typename T>
+void MacroAssembler::branchTestMagicImpl(Condition cond, const T& t,
+ Label* label) {
Condition c = testMagic(cond, t);
B(label, c);
}
diff --git a/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h b/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
@@ -640,9 +640,9 @@ void MacroAssembler::branchPtr(Condition cond, const BaseIndex& lhs,
branchPtrImpl(cond, lhs, rhs, label);
}
-template <typename T, typename S, typename L>
+template <typename T, typename S>
void MacroAssembler::branchPtrImpl(Condition cond, const T& lhs, const S& rhs,
- L label) {
+ Label* label) {
cmpPtr(Operand(lhs), rhs);
j(cond, label);
}
@@ -1150,8 +1150,9 @@ void MacroAssembler::branchTestMagic(Condition cond, const ValueOperand& value,
branchTestMagicImpl(cond, value, label);
}
-template <typename T, class L>
-void MacroAssembler::branchTestMagicImpl(Condition cond, const T& t, L label) {
+template <typename T>
+void MacroAssembler::branchTestMagicImpl(Condition cond, const T& t,
+ Label* label) {
cond = testMagic(cond, t);
j(cond, label);
}