From 59203c63bb777a3bacec32fb8830fba33540e809 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:29 +0200 Subject: Adding upstream version 127.0. Signed-off-by: Daniel Baumann --- js/src/vm/BytecodeLocation.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'js/src/vm/BytecodeLocation.h') 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_)); -- cgit v1.2.3