summaryrefslogtreecommitdiffstats
path: root/js/src/vm/Opcodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/vm/Opcodes.h')
-rw-r--r--js/src/vm/Opcodes.h137
1 files changed, 75 insertions, 62 deletions
diff --git a/js/src/vm/Opcodes.h b/js/src/vm/Opcodes.h
index 438f361bcf..6db658701d 100644
--- a/js/src/vm/Opcodes.h
+++ b/js/src/vm/Opcodes.h
@@ -412,6 +412,19 @@
MACRO(Typeof, typeof_, NULL, 1, 1, 1, JOF_BYTE|JOF_IC) \
MACRO(TypeofExpr, typeof_expr, NULL, 1, 1, 1, JOF_BYTE|JOF_IC) \
/*
+ * A compound opcode for `typeof val === "type"` or `typeof val !== "type"`,
+ * where `val` is single identifier.
+ *
+ * Infallible. The result is always a boolean that depends on the type of
+ * `val` and `"type"` string, and the comparison operator.
+ *
+ * Category: Expressions
+ * Type: Other expressions
+ * Operands: TypeofEqOperand operand
+ * Stack: val => (typeof val CMP "type")
+ */ \
+ MACRO(TypeofEq, typeof_eq, NULL, 2, 1, 1, JOF_UINT8|JOF_IC) \
+ /*
* [The unary `+` operator][1].
*
* `+val` doesn't do any actual math. It just calls [ToNumber][2](val).
@@ -909,7 +922,7 @@
* Operands: uint32_t nameIndex
* Stack: obj, val => obj
*/ \
- MACRO(InitProp, init_prop, NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_PROPINIT|JOF_IC) \
+ MACRO(InitProp, init_prop, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPINIT|JOF_IC) \
/*
* Like `JSOp::InitProp`, but define a non-enumerable property.
*
@@ -925,7 +938,7 @@
* Operands: uint32_t nameIndex
* Stack: obj, val => obj
*/ \
- MACRO(InitHiddenProp, init_hidden_prop, NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_PROPINIT|JOF_IC) \
+ MACRO(InitHiddenProp, init_hidden_prop, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPINIT|JOF_IC) \
/*
* Like `JSOp::InitProp`, but define a non-enumerable, non-writable,
* non-configurable property.
@@ -942,7 +955,7 @@
* Operands: uint32_t nameIndex
* Stack: obj, val => obj
*/ \
- MACRO(InitLockedProp, init_locked_prop, NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_PROPINIT|JOF_IC) \
+ MACRO(InitLockedProp, init_locked_prop, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPINIT|JOF_IC) \
/*
* Define a data property on `obj` with property key `id` and value `val`.
*
@@ -964,9 +977,9 @@
* Operands:
* Stack: obj, id, val => obj
*/ \
- MACRO(InitElem, init_elem, NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_PROPINIT|JOF_IC) \
- MACRO(InitHiddenElem, init_hidden_elem, NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_PROPINIT|JOF_IC) \
- MACRO(InitLockedElem, init_locked_elem, NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_PROPINIT|JOF_IC) \
+ MACRO(InitElem, init_elem, NULL, 1, 3, 1, JOF_BYTE|JOF_PROPINIT|JOF_IC) \
+ MACRO(InitHiddenElem, init_hidden_elem, NULL, 1, 3, 1, JOF_BYTE|JOF_PROPINIT|JOF_IC) \
+ MACRO(InitLockedElem, init_locked_elem, NULL, 1, 3, 1, JOF_BYTE|JOF_PROPINIT|JOF_IC) \
/*
* Define an accessor property on `obj` with the given `getter`.
* `nameIndex` gives the property name.
@@ -981,8 +994,8 @@
* Operands: uint32_t nameIndex
* Stack: obj, getter => obj
*/ \
- MACRO(InitPropGetter, init_prop_getter, NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_PROPINIT) \
- MACRO(InitHiddenPropGetter, init_hidden_prop_getter, NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_PROPINIT) \
+ MACRO(InitPropGetter, init_prop_getter, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPINIT) \
+ MACRO(InitHiddenPropGetter, init_hidden_prop_getter, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPINIT) \
/*
* Define an accessor property on `obj` with property key `id` and the given `getter`.
*
@@ -998,8 +1011,8 @@
* Operands:
* Stack: obj, id, getter => obj
*/ \
- MACRO(InitElemGetter, init_elem_getter, NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_PROPINIT) \
- MACRO(InitHiddenElemGetter, init_hidden_elem_getter, NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_PROPINIT) \
+ MACRO(InitElemGetter, init_elem_getter, NULL, 1, 3, 1, JOF_BYTE|JOF_PROPINIT) \
+ MACRO(InitHiddenElemGetter, init_hidden_elem_getter, NULL, 1, 3, 1, JOF_BYTE|JOF_PROPINIT) \
/*
* Define an accessor property on `obj` with the given `setter`.
*
@@ -1015,8 +1028,8 @@
* Operands: uint32_t nameIndex
* Stack: obj, setter => obj
*/ \
- MACRO(InitPropSetter, init_prop_setter, NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_PROPINIT) \
- MACRO(InitHiddenPropSetter, init_hidden_prop_setter, NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_PROPINIT) \
+ MACRO(InitPropSetter, init_prop_setter, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPINIT) \
+ MACRO(InitHiddenPropSetter, init_hidden_prop_setter, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPINIT) \
/*
* Define an accesssor property on `obj` with property key `id` and the
* given `setter`.
@@ -1032,8 +1045,8 @@
* Operands:
* Stack: obj, id, setter => obj
*/ \
- MACRO(InitElemSetter, init_elem_setter, NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_PROPINIT) \
- MACRO(InitHiddenElemSetter, init_hidden_elem_setter, NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_PROPINIT) \
+ MACRO(InitElemSetter, init_elem_setter, NULL, 1, 3, 1, JOF_BYTE|JOF_PROPINIT) \
+ MACRO(InitHiddenElemSetter, init_hidden_elem_setter, NULL, 1, 3, 1, JOF_BYTE|JOF_PROPINIT) \
/*
* Get the value of the property `obj.name`. This can call getters and
* proxy traps.
@@ -1048,7 +1061,7 @@
* Operands: uint32_t nameIndex
* Stack: obj => obj[name]
*/ \
- MACRO(GetProp, get_prop, NULL, 5, 1, 1, JOF_ATOM|JOF_PROP|JOF_IC) \
+ MACRO(GetProp, get_prop, NULL, 5, 1, 1, JOF_ATOM|JOF_IC) \
/*
* Get the value of the property `obj[key]`.
*
@@ -1062,7 +1075,7 @@
* Operands:
* Stack: obj, key => obj[key]
*/ \
- MACRO(GetElem, get_elem, NULL, 1, 2, 1, JOF_BYTE|JOF_ELEM|JOF_IC) \
+ MACRO(GetElem, get_elem, NULL, 1, 2, 1, JOF_BYTE|JOF_IC) \
/*
* Non-strict assignment to a property, `obj.name = val`.
*
@@ -1079,7 +1092,7 @@
* Operands: uint32_t nameIndex
* Stack: obj, val => val
*/ \
- MACRO(SetProp, set_prop, NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_PROPSET|JOF_CHECKSLOPPY|JOF_IC) \
+ MACRO(SetProp, set_prop, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPSET|JOF_CHECKSLOPPY|JOF_IC) \
/*
* Like `JSOp::SetProp`, but for strict mode code. Throw a TypeError if
* `obj[key]` exists but is non-writable, if it's an accessor property with
@@ -1090,7 +1103,7 @@
* Operands: uint32_t nameIndex
* Stack: obj, val => val
*/ \
- MACRO(StrictSetProp, strict_set_prop, NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_PROPSET|JOF_CHECKSTRICT|JOF_IC) \
+ MACRO(StrictSetProp, strict_set_prop, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPSET|JOF_CHECKSTRICT|JOF_IC) \
/*
* Non-strict assignment to a property, `obj[key] = val`.
*
@@ -1103,7 +1116,7 @@
* Operands:
* Stack: obj, key, val => val
*/ \
- MACRO(SetElem, set_elem, NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_PROPSET|JOF_CHECKSLOPPY|JOF_IC) \
+ MACRO(SetElem, set_elem, NULL, 1, 3, 1, JOF_BYTE|JOF_PROPSET|JOF_CHECKSLOPPY|JOF_IC) \
/*
* Like `JSOp::SetElem`, but for strict mode code. Throw a TypeError if
* `obj[key]` exists but is non-writable, if it's an accessor property with
@@ -1114,7 +1127,7 @@
* Operands:
* Stack: obj, key, val => val
*/ \
- MACRO(StrictSetElem, strict_set_elem, NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_PROPSET|JOF_CHECKSTRICT|JOF_IC) \
+ MACRO(StrictSetElem, strict_set_elem, NULL, 1, 3, 1, JOF_BYTE|JOF_PROPSET|JOF_CHECKSTRICT|JOF_IC) \
/*
* Delete a property from `obj`. Push true on success, false if the
* property existed but could not be deleted. This implements `delete
@@ -1131,7 +1144,7 @@
* Operands: uint32_t nameIndex
* Stack: obj => succeeded
*/ \
- MACRO(DelProp, del_prop, NULL, 5, 1, 1, JOF_ATOM|JOF_PROP|JOF_CHECKSLOPPY) \
+ MACRO(DelProp, del_prop, NULL, 5, 1, 1, JOF_ATOM|JOF_CHECKSLOPPY) \
/*
* Like `JSOp::DelProp`, but for strict mode code. Push `true` on success,
* else throw a TypeError.
@@ -1141,7 +1154,7 @@
* Operands: uint32_t nameIndex
* Stack: obj => succeeded
*/ \
- MACRO(StrictDelProp, strict_del_prop, NULL, 5, 1, 1, JOF_ATOM|JOF_PROP|JOF_CHECKSTRICT) \
+ MACRO(StrictDelProp, strict_del_prop, NULL, 5, 1, 1, JOF_ATOM|JOF_CHECKSTRICT) \
/*
* Delete the property `obj[key]` and push `true` on success, `false`
* if the property existed but could not be deleted.
@@ -1157,7 +1170,7 @@
* Operands:
* Stack: obj, key => succeeded
*/ \
- MACRO(DelElem, del_elem, NULL, 1, 2, 1, JOF_BYTE|JOF_ELEM|JOF_CHECKSLOPPY) \
+ MACRO(DelElem, del_elem, NULL, 1, 2, 1, JOF_BYTE|JOF_CHECKSLOPPY) \
/*
* Like `JSOp::DelElem, but for strict mode code. Push `true` on success,
* else throw a TypeError.
@@ -1167,7 +1180,7 @@
* Operands:
* Stack: obj, key => succeeded
*/ \
- MACRO(StrictDelElem, strict_del_elem, NULL, 1, 2, 1, JOF_BYTE|JOF_ELEM|JOF_CHECKSTRICT) \
+ MACRO(StrictDelElem, strict_del_elem, NULL, 1, 2, 1, JOF_BYTE|JOF_CHECKSTRICT) \
/*
* Push true if `obj` has an own property `id`.
*
@@ -1245,7 +1258,7 @@
* Operands: uint32_t nameIndex
* Stack: receiver, obj => super.name
*/ \
- MACRO(GetPropSuper, get_prop_super, NULL, 5, 2, 1, JOF_ATOM|JOF_PROP|JOF_IC) \
+ MACRO(GetPropSuper, get_prop_super, NULL, 5, 2, 1, JOF_ATOM|JOF_IC) \
/*
* Get the value of `receiver[key]`, starting the property search at `obj`.
* In spec terms, `obj.[[Get]](key, receiver)`.
@@ -1263,7 +1276,7 @@
* Operands:
* Stack: receiver, key, obj => super[key]
*/ \
- MACRO(GetElemSuper, get_elem_super, NULL, 1, 3, 1, JOF_BYTE|JOF_ELEM|JOF_IC) \
+ MACRO(GetElemSuper, get_elem_super, NULL, 1, 3, 1, JOF_BYTE|JOF_IC) \
/*
* Assign `val` to `receiver.name`, starting the search for an existing
* property at `obj`. In spec terms, `obj.[[Set]](name, val, receiver)`.
@@ -1280,7 +1293,7 @@
* Operands: uint32_t nameIndex
* Stack: receiver, obj, val => val
*/ \
- MACRO(SetPropSuper, set_prop_super, NULL, 5, 3, 1, JOF_ATOM|JOF_PROP|JOF_PROPSET|JOF_CHECKSLOPPY) \
+ MACRO(SetPropSuper, set_prop_super, NULL, 5, 3, 1, JOF_ATOM|JOF_PROPSET|JOF_CHECKSLOPPY) \
/*
* Like `JSOp::SetPropSuper`, but for strict mode code.
*
@@ -1289,7 +1302,7 @@
* Operands: uint32_t nameIndex
* Stack: receiver, obj, val => val
*/ \
- MACRO(StrictSetPropSuper, strict_set_prop_super, NULL, 5, 3, 1, JOF_ATOM|JOF_PROP|JOF_PROPSET|JOF_CHECKSTRICT) \
+ MACRO(StrictSetPropSuper, strict_set_prop_super, NULL, 5, 3, 1, JOF_ATOM|JOF_PROPSET|JOF_CHECKSTRICT) \
/*
* Assign `val` to `receiver[key]`, strating the search for an existing
* property at `obj`. In spec terms, `obj.[[Set]](key, val, receiver)`.
@@ -1306,7 +1319,7 @@
* Operands:
* Stack: receiver, key, obj, val => val
*/ \
- MACRO(SetElemSuper, set_elem_super, NULL, 1, 4, 1, JOF_BYTE|JOF_ELEM|JOF_PROPSET|JOF_CHECKSLOPPY) \
+ MACRO(SetElemSuper, set_elem_super, NULL, 1, 4, 1, JOF_BYTE|JOF_PROPSET|JOF_CHECKSLOPPY) \
/*
* Like `JSOp::SetElemSuper`, but for strict mode code.
*
@@ -1315,7 +1328,7 @@
* Operands:
* Stack: receiver, key, obj, val => val
*/ \
- MACRO(StrictSetElemSuper, strict_set_elem_super, NULL, 1, 4, 1, JOF_BYTE|JOF_ELEM|JOF_PROPSET|JOF_CHECKSTRICT) \
+ MACRO(StrictSetElemSuper, strict_set_elem_super, NULL, 1, 4, 1, JOF_BYTE|JOF_PROPSET|JOF_CHECKSTRICT) \
/*
* Set up a for-in loop by pushing a `PropertyIteratorObject` over the
* enumerable properties of `val`.
@@ -1521,7 +1534,7 @@
* Operands: uint32_t index
* Stack: array, val => array
*/ \
- MACRO(InitElemArray, init_elem_array, NULL, 5, 2, 1, JOF_UINT32|JOF_ELEM|JOF_PROPINIT) \
+ MACRO(InitElemArray, init_elem_array, NULL, 5, 2, 1, JOF_UINT32|JOF_PROPINIT) \
/*
* Initialize an array element `array[index++]` with value `val`.
*
@@ -1553,7 +1566,7 @@
* Operands:
* Stack: array, index, val => array, (index + 1)
*/ \
- MACRO(InitElemInc, init_elem_inc, NULL, 1, 3, 2, JOF_BYTE|JOF_ELEM|JOF_PROPINIT|JOF_IC) \
+ MACRO(InitElemInc, init_elem_inc, NULL, 1, 3, 2, JOF_BYTE|JOF_PROPINIT|JOF_IC) \
/*
* Push `MagicValue(JS_ELEMENTS_HOLE)`, representing an *Elision* in an
* array literal (like the missing property 0 in the array `[, 1]`).
@@ -2650,7 +2663,7 @@
* Operands: uint32_t nameIndex
* Stack:
*/ \
- MACRO(ThrowSetConst, throw_set_const, NULL, 5, 0, 0, JOF_ATOM|JOF_NAME) \
+ MACRO(ThrowSetConst, throw_set_const, NULL, 5, 0, 0, JOF_ATOM) \
/*
* No-op instruction that marks the top of the bytecode for a
* *TryStatement*.
@@ -2751,7 +2764,7 @@
* Operands: uint24_t localno
* Stack: v => v
*/ \
- MACRO(InitLexical, init_lexical, NULL, 4, 1, 1, JOF_LOCAL|JOF_NAME) \
+ MACRO(InitLexical, init_lexical, NULL, 4, 1, 1, JOF_LOCAL) \
/*
* Initialize a global lexical binding.
*
@@ -2766,7 +2779,7 @@
* Operands: uint32_t nameIndex
* Stack: val => val
*/ \
- MACRO(InitGLexical, init_g_lexical, NULL, 5, 1, 1, JOF_ATOM|JOF_NAME|JOF_PROPINIT|JOF_GNAME|JOF_IC) \
+ MACRO(InitGLexical, init_g_lexical, NULL, 5, 1, 1, JOF_ATOM|JOF_PROPINIT|JOF_GNAME|JOF_IC) \
/*
* Initialize an aliased lexical binding; or mark it as uninitialized.
*
@@ -2784,7 +2797,7 @@
* Operands: uint8_t hops, uint24_t slot
* Stack: v => v
*/ \
- MACRO(InitAliasedLexical, init_aliased_lexical, NULL, 5, 1, 1, JOF_ENVCOORD|JOF_NAME|JOF_PROPINIT) \
+ MACRO(InitAliasedLexical, init_aliased_lexical, NULL, 5, 1, 1, JOF_ENVCOORD|JOF_PROPINIT) \
/*
* Throw a ReferenceError if the value on top of the stack is uninitialized.
*
@@ -2801,7 +2814,7 @@
* Operands: uint24_t localno
* Stack: v => v
*/ \
- MACRO(CheckLexical, check_lexical, NULL, 4, 1, 1, JOF_LOCAL|JOF_NAME) \
+ MACRO(CheckLexical, check_lexical, NULL, 4, 1, 1, JOF_LOCAL) \
/*
* Like `JSOp::CheckLexical` but for aliased bindings.
*
@@ -2816,7 +2829,7 @@
* Operands: uint8_t hops, uint24_t slot
* Stack: v => v
*/ \
- MACRO(CheckAliasedLexical, check_aliased_lexical, NULL, 5, 1, 1, JOF_ENVCOORD|JOF_NAME) \
+ MACRO(CheckAliasedLexical, check_aliased_lexical, NULL, 5, 1, 1, JOF_ENVCOORD) \
/*
* Throw a ReferenceError if the value on top of the stack is
* `MagicValue(JS_UNINITIALIZED_LEXICAL)`. Used in derived class
@@ -2843,7 +2856,7 @@
* Operands: uint32_t nameIndex
* Stack: => global
*/ \
- MACRO(BindGName, bind_g_name, NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_GNAME|JOF_IC) \
+ MACRO(BindGName, bind_g_name, NULL, 5, 0, 1, JOF_ATOM|JOF_GNAME|JOF_IC) \
/*
* Look up a name on the environment chain and push the environment which
* contains a binding for that name. If no such binding exists, push the
@@ -2854,13 +2867,14 @@
* Operands: uint32_t nameIndex
* Stack: => env
*/ \
- MACRO(BindName, bind_name, NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_IC|JOF_USES_ENV) \
+ MACRO(BindName, bind_name, NULL, 5, 0, 1, JOF_ATOM|JOF_IC|JOF_USES_ENV) \
/*
* Find a binding on the environment chain and push its value.
*
* If the binding is an uninitialized lexical, throw a ReferenceError. If
* no such binding exists, throw a ReferenceError unless the next
- * instruction is `JSOp::Typeof`, in which case push `undefined`.
+ * instruction is `JSOp::Typeof` or `JSOp::TypeofEq` (see IsTypeOfNameOp),
+ * in which case push `undefined`.
*
* Implements: [ResolveBinding][1] followed by [GetValue][2]
* (adjusted hackily for `typeof`).
@@ -2876,7 +2890,7 @@
* Operands: uint32_t nameIndex
* Stack: => val
*/ \
- MACRO(GetName, get_name, NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_IC|JOF_USES_ENV) \
+ MACRO(GetName, get_name, NULL, 5, 0, 1, JOF_ATOM|JOF_IC|JOF_USES_ENV) \
/*
* Find a global binding and push its value.
*
@@ -2900,7 +2914,7 @@
* Operands: uint32_t nameIndex
* Stack: => val
*/ \
- MACRO(GetGName, get_g_name, NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_GNAME|JOF_IC) \
+ MACRO(GetGName, get_g_name, NULL, 5, 0, 1, JOF_ATOM|JOF_GNAME|JOF_IC) \
/*
* Push the value of an argument that is stored in the stack frame
* or in an `ArgumentsObject`.
@@ -2910,7 +2924,7 @@
* Operands: uint16_t argno
* Stack: => arguments[argno]
*/ \
- MACRO(GetArg, get_arg, NULL, 3, 0, 1, JOF_QARG|JOF_NAME) \
+ MACRO(GetArg, get_arg, NULL, 3, 0, 1, JOF_QARG) \
/*
* Push the value of an argument that is stored in the stack frame. Like
* `JSOp::GetArg`, but ignores the frame's `ArgumentsObject` and doesn't
@@ -2921,7 +2935,7 @@
* Operands: uint16_t argno
* Stack: => arguments[argno]
*/ \
- MACRO(GetFrameArg, get_frame_arg, NULL, 3, 0, 1, JOF_QARG|JOF_NAME) \
+ MACRO(GetFrameArg, get_frame_arg, NULL, 3, 0, 1, JOF_QARG) \
/*
* Push the value of an optimized local variable.
*
@@ -2933,7 +2947,7 @@
* Operands: uint24_t localno
* Stack: => val
*/ \
- MACRO(GetLocal, get_local, NULL, 4, 0, 1, JOF_LOCAL|JOF_NAME) \
+ MACRO(GetLocal, get_local, NULL, 4, 0, 1, JOF_LOCAL) \
/*
* Push the number of actual arguments as Int32Value.
*
@@ -2983,7 +2997,7 @@
* Operands: uint8_t hops, uint24_t slot
* Stack: => aliasedVar
*/ \
- MACRO(GetAliasedVar, get_aliased_var, NULL, 5, 0, 1, JOF_ENVCOORD|JOF_NAME|JOF_USES_ENV) \
+ MACRO(GetAliasedVar, get_aliased_var, NULL, 5, 0, 1, JOF_ENVCOORD|JOF_USES_ENV) \
/*
* Push the value of an aliased binding, which may have to bypass a DebugEnvironmentProxy
* on the environment chain.
@@ -2993,7 +3007,7 @@
* Operands: uint8_t hops, uint24_t slot
* Stack: => aliasedVar
*/ \
- MACRO(GetAliasedDebugVar, get_aliased_debug_var, NULL, 5, 0, 1, JOF_DEBUGCOORD|JOF_NAME) \
+ MACRO(GetAliasedDebugVar, get_aliased_debug_var, NULL, 5, 0, 1, JOF_DEBUGCOORD) \
/*
* Get the value of a module import by name and pushes it onto the stack.
*
@@ -3002,7 +3016,7 @@
* Operands: uint32_t nameIndex
* Stack: => val
*/ \
- MACRO(GetImport, get_import, NULL, 5, 0, 1, JOF_ATOM|JOF_NAME) \
+ MACRO(GetImport, get_import, NULL, 5, 0, 1, JOF_ATOM) \
/*
* Get the value of a binding from the environment `env`. If the name is
* not bound in `env`, throw a ReferenceError.
@@ -3027,7 +3041,7 @@
* Operands: uint32_t nameIndex
* Stack: env => v
*/ \
- MACRO(GetBoundName, get_bound_name, NULL, 5, 1, 1, JOF_ATOM|JOF_NAME|JOF_IC) \
+ MACRO(GetBoundName, get_bound_name, NULL, 5, 1, 1, JOF_ATOM|JOF_IC) \
/*
* Push the value of an intrinsic onto the stack.
*
@@ -3040,7 +3054,7 @@
* Operands: uint32_t nameIndex
* Stack: => intrinsic[name]
*/ \
- MACRO(GetIntrinsic, get_intrinsic, NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_IC) \
+ MACRO(GetIntrinsic, get_intrinsic, NULL, 5, 0, 1, JOF_ATOM|JOF_IC) \
/*
* Pushes the currently executing function onto the stack.
*
@@ -3100,7 +3114,7 @@
* Operands: uint32_t nameIndex
* Stack: env, val => val
*/ \
- MACRO(SetName, set_name, NULL, 5, 2, 1, JOF_ATOM|JOF_NAME|JOF_PROPSET|JOF_CHECKSLOPPY|JOF_IC|JOF_USES_ENV) \
+ MACRO(SetName, set_name, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPSET|JOF_CHECKSLOPPY|JOF_IC|JOF_USES_ENV) \
/*
* Like `JSOp::SetName`, but throw a TypeError if there is no binding for
* the specified name in `env`, or if the binding is immutable (a `const`
@@ -3115,7 +3129,7 @@
* Operands: uint32_t nameIndex
* Stack: env, val => val
*/ \
- MACRO(StrictSetName, strict_set_name, NULL, 5, 2, 1, JOF_ATOM|JOF_NAME|JOF_PROPSET|JOF_CHECKSTRICT|JOF_IC|JOF_USES_ENV) \
+ MACRO(StrictSetName, strict_set_name, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPSET|JOF_CHECKSTRICT|JOF_IC|JOF_USES_ENV) \
/*
* Like `JSOp::SetName`, but for assigning to globals. `env` must be an
* environment pushed by `JSOp::BindGName`.
@@ -3125,7 +3139,7 @@
* Operands: uint32_t nameIndex
* Stack: env, val => val
*/ \
- MACRO(SetGName, set_g_name, NULL, 5, 2, 1, JOF_ATOM|JOF_NAME|JOF_PROPSET|JOF_GNAME|JOF_CHECKSLOPPY|JOF_IC) \
+ MACRO(SetGName, set_g_name, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPSET|JOF_GNAME|JOF_CHECKSLOPPY|JOF_IC) \
/*
* Like `JSOp::StrictSetGName`, but for assigning to globals. `env` must be
* an environment pushed by `JSOp::BindGName`.
@@ -3135,7 +3149,7 @@
* Operands: uint32_t nameIndex
* Stack: env, val => val
*/ \
- MACRO(StrictSetGName, strict_set_g_name, NULL, 5, 2, 1, JOF_ATOM|JOF_NAME|JOF_PROPSET|JOF_GNAME|JOF_CHECKSTRICT|JOF_IC) \
+ MACRO(StrictSetGName, strict_set_g_name, NULL, 5, 2, 1, JOF_ATOM|JOF_PROPSET|JOF_GNAME|JOF_CHECKSTRICT|JOF_IC) \
/*
* Assign `val` to an argument binding that's stored in the stack frame or
* in an `ArgumentsObject`.
@@ -3145,7 +3159,7 @@
* Operands: uint16_t argno
* Stack: val => val
*/ \
- MACRO(SetArg, set_arg, NULL, 3, 1, 1, JOF_QARG|JOF_NAME) \
+ MACRO(SetArg, set_arg, NULL, 3, 1, 1, JOF_QARG) \
/*
* Assign to an optimized local binding.
*
@@ -3154,7 +3168,7 @@
* Operands: uint24_t localno
* Stack: v => v
*/ \
- MACRO(SetLocal, set_local, NULL, 4, 1, 1, JOF_LOCAL|JOF_NAME) \
+ MACRO(SetLocal, set_local, NULL, 4, 1, 1, JOF_LOCAL) \
/*
* Assign to an aliased binding.
*
@@ -3169,7 +3183,7 @@
* Operands: uint8_t hops, uint24_t slot
* Stack: val => val
*/ \
- MACRO(SetAliasedVar, set_aliased_var, NULL, 5, 1, 1, JOF_ENVCOORD|JOF_NAME|JOF_PROPSET|JOF_USES_ENV) \
+ MACRO(SetAliasedVar, set_aliased_var, NULL, 5, 1, 1, JOF_ENVCOORD|JOF_PROPSET|JOF_USES_ENV) \
/*
* Assign to an intrinsic.
*
@@ -3183,7 +3197,7 @@
* Operands: uint32_t nameIndex
* Stack: val => val
*/ \
- MACRO(SetIntrinsic, set_intrinsic, NULL, 5, 1, 1, JOF_ATOM|JOF_NAME) \
+ MACRO(SetIntrinsic, set_intrinsic, NULL, 5, 1, 1, JOF_ATOM) \
/*
* Push a lexical environment onto the environment chain.
*
@@ -3429,7 +3443,7 @@
* Operands: uint32_t nameIndex
* Stack: => succeeded
*/ \
- MACRO(DelName, del_name, NULL, 5, 0, 1, JOF_ATOM|JOF_NAME|JOF_CHECKSLOPPY|JOF_USES_ENV) \
+ MACRO(DelName, del_name, NULL, 5, 0, 1, JOF_ATOM|JOF_CHECKSLOPPY|JOF_USES_ENV) \
/*
* Create and push the `arguments` object for the current function activation.
*
@@ -3635,14 +3649,13 @@
* a power of two. Use this macro to do so.
*/
#define FOR_EACH_TRAILING_UNUSED_OPCODE(MACRO) \
- IF_RECORD_TUPLE(/* empty */, MACRO(235)) \
IF_RECORD_TUPLE(/* empty */, MACRO(236)) \
IF_RECORD_TUPLE(/* empty */, MACRO(237)) \
IF_RECORD_TUPLE(/* empty */, MACRO(238)) \
IF_RECORD_TUPLE(/* empty */, MACRO(239)) \
IF_RECORD_TUPLE(/* empty */, MACRO(240)) \
IF_RECORD_TUPLE(/* empty */, MACRO(241)) \
- MACRO(242) \
+ IF_RECORD_TUPLE(/* empty */, MACRO(242)) \
MACRO(243) \
MACRO(244) \
MACRO(245) \