summaryrefslogtreecommitdiff
path: root/js/src/jsopcode.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jsopcode.h')
-rw-r--r--js/src/jsopcode.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/js/src/jsopcode.h b/js/src/jsopcode.h
index 7d02fa946e..11d0429298 100644
--- a/js/src/jsopcode.h
+++ b/js/src/jsopcode.h
@@ -700,6 +700,30 @@ IsEqualityOp(JSOp op)
}
inline bool
+IsSpreadOp(JSOp op)
+{
+ return JOF_OPTYPE(op) == JOF_BYTE;
+}
+
+inline bool
+IsNewOp(JSOp op)
+{
+ return op == JSOP_NEW ||
+ op == JSOP_SPREADNEW ||
+ op == JSOP_SUPERCALL ||
+ op == JSOP_SPREADSUPERCALL;
+}
+
+inline bool
+IsEvalOp(JSOp op)
+{
+ return op == JSOP_EVAL ||
+ op == JSOP_STRICTEVAL ||
+ op == JSOP_SPREADEVAL ||
+ op == JSOP_STRICTSPREADEVAL;
+}
+
+inline bool
IsCheckStrictOp(JSOp op)
{
return CodeSpec[op].format & JOF_CHECKSTRICT;