summaryrefslogtreecommitdiffstats
path: root/js/src/vm/BytecodeLocation.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/vm/BytecodeLocation.h')
-rw-r--r--js/src/vm/BytecodeLocation.h9
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_));