diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /js/src/vm/BytecodeUtil.h | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/vm/BytecodeUtil.h')
-rw-r--r-- | js/src/vm/BytecodeUtil.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/js/src/vm/BytecodeUtil.h b/js/src/vm/BytecodeUtil.h index 09ff4387bb..3f0d4d07e4 100644 --- a/js/src/vm/BytecodeUtil.h +++ b/js/src/vm/BytecodeUtil.h @@ -39,10 +39,6 @@ class JS_PUBLIC_API StringPrinter; static inline uint32_t JOF_TYPE(uint32_t fmt) { return fmt & JOF_TYPEMASK; } -/* Shorthand for mode from format. */ - -static inline uint32_t JOF_MODE(uint32_t fmt) { return fmt & JOF_MODEMASK; } - /* * Immediate operand getters, setters, and bounds. */ @@ -462,8 +458,6 @@ inline bool IsCheckStrictOp(JSOp op) { return CodeSpec(op).format & JOF_CHECKSTRICT; } -inline bool IsNameOp(JSOp op) { return CodeSpec(op).format & JOF_NAME; } - #ifdef DEBUG inline bool IsCheckSloppyOp(JSOp op) { return CodeSpec(op).format & JOF_CHECKSLOPPY; @@ -510,10 +504,6 @@ inline bool IsSetElemOp(JSOp op) { inline bool IsSetElemPC(const jsbytecode* pc) { return IsSetElemOp(JSOp(*pc)); } -inline bool IsElemPC(const jsbytecode* pc) { - return CodeSpec(JSOp(*pc)).format & JOF_ELEM; -} - inline bool IsInvokeOp(JSOp op) { return CodeSpec(op).format & JOF_INVOKE; } inline bool IsInvokePC(jsbytecode* pc) { return IsInvokeOp(JSOp(*pc)); } @@ -534,6 +524,12 @@ inline bool IsSpreadOp(JSOp op) { return CodeSpec(op).format & JOF_SPREAD; } inline bool IsSpreadPC(const jsbytecode* pc) { return IsSpreadOp(JSOp(*pc)); } +// Returns true if the specified opcode is for `typeof name` where `name` is +// single identifier. +inline bool IsTypeOfNameOp(JSOp op) { + return op == JSOp::Typeof || op == JSOp::TypeofEq; +} + inline bool OpUsesEnvironmentChain(JSOp op) { return CodeSpec(op).format & JOF_USES_ENV; } |