summaryrefslogtreecommitdiff
path: root/js/src/jit/MacroAssembler.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit/MacroAssembler.h')
-rw-r--r--js/src/jit/MacroAssembler.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h
index 9d95c7f7ab..6d9888469e 100644
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -2121,6 +2121,15 @@ class MacroAssembler : public MacroAssemblerSpecific
inline void assertStackAlignment(uint32_t alignment, int32_t offset = 0);
};
+// StackMacroAssembler checks no GC will happen while it's on the stack.
+class MOZ_RAII StackMacroAssembler : public MacroAssembler {
+ JS::AutoCheckCannotGC nogc;
+
+public:
+ StackMacroAssembler() : MacroAssembler() {}
+ explicit StackMacroAssembler(JSContext* cx) : MacroAssembler(cx) {}
+};
+
static inline Assembler::DoubleCondition
JSOpToDoubleCondition(JSOp op)
{