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/BytecodeLocation.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/BytecodeLocation.h')
-rw-r--r-- | js/src/vm/BytecodeLocation.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/js/src/vm/BytecodeLocation.h b/js/src/vm/BytecodeLocation.h index 8109b5f2fa..c5bd1d2f5d 100644 --- a/js/src/vm/BytecodeLocation.h +++ b/js/src/vm/BytecodeLocation.h @@ -15,6 +15,7 @@ #include "vm/CompletionKind.h" // CompletionKind #include "vm/FunctionPrefixKind.h" // FunctionPrefixKind #include "vm/GeneratorResumeKind.h" +#include "vm/TypeofEqOperand.h" // TypeofEqOperand namespace js { @@ -103,6 +104,7 @@ class BytecodeLocation { inline JSAtom* getAtom(const JSScript* script) const; inline JSString* getString(const JSScript* script) const; + inline bool atomizeString(JSContext* cx, JSScript* script); inline PropertyName* getPropertyName(const JSScript* script) const; inline JS::BigInt* getBigInt(const JSScript* script) const; inline JSObject* getObject(const JSScript* script) const; @@ -198,8 +200,6 @@ class BytecodeLocation { bool isStrictSetOp() const { return IsStrictSetPC(rawBytecode_); } - bool isNameOp() const { return IsNameOp(getOp()); } - bool isSpreadOp() const { return IsSpreadOp(getOp()); } bool isInvokeOp() const { return IsInvokeOp(getOp()); } @@ -279,6 +279,11 @@ class BytecodeLocation { return index; } + TypeofEqOperand getTypeofEqOperand() const { + MOZ_ASSERT(is(JSOp::TypeofEq)); + return TypeofEqOperand::fromRawValue(GET_UINT8(rawBytecode_)); + } + FunctionPrefixKind getFunctionPrefixKind() const { MOZ_ASSERT(is(JSOp::SetFunName)); return FunctionPrefixKind(GET_UINT8(rawBytecode_)); |