--- f7e3d1e375d7a20b79960b6b5619b685d3342148/js/src/vm/Opcodes.h
+++ ba8de6a4229732265c447e22e63d2cddd6f772fe/js/src/vm/Opcodes.h
@@ -2397,49 +2397,24 @@
*
* Category: Control flow
* Type: Exceptions
* Operands: uint16_t msgNumber
* Stack: =>
*/ \
MACRO(ThrowMsg, throw_msg, NULL, 3, 0, 0, JOF_UINT16) \
/*
- * Throw a TypeError for invalid assignment to a `const`. The environment
- * coordinate is used to get the variable name for the error message.
+ * Throws a runtime TypeError for invalid assignment to a `const` binding.
*
* Category: Control flow
* Type: Exceptions
- * Operands: uint8_t hops, uint24_t slot
- * Stack:
- */ \
- MACRO(ThrowSetAliasedConst, throw_set_aliased_const, NULL, 5, 0, 0, JOF_ENVCOORD|JOF_NAME|JOF_DETECTING) \
- /*
- * Throw a TypeError for invalid assignment to the callee binding in a named
- * lambda, which is always a `const` binding. This is a different bytecode
- * than `JSOp::ThrowSetConst` because the named lambda callee, if not closed
- * over, does not have a frame slot to look up the name with for the error
- * message.
- *
- * Category: Control flow
- * Type: Exceptions
- * Operands:
- * Stack:
- */ \
- MACRO(ThrowSetCallee, throw_set_callee, NULL, 1, 0, 0, JOF_BYTE) \
- /*
- * Throws a runtime TypeError for invalid assignment to an optimized
- * `const` binding. `localno` is used to get the variable name for the
- * error message.
- *
- * Category: Control flow
- * Type: Exceptions
- * Operands: uint24_t localno
+ * Operands: uint32_t nameIndex
* Stack:
*/ \
- MACRO(ThrowSetConst, throw_set_const, NULL, 4, 0, 0, JOF_LOCAL|JOF_NAME|JOF_DETECTING) \
+ MACRO(ThrowSetConst, throw_set_const, NULL, 5, 0, 0, JOF_ATOM|JOF_NAME|JOF_DETECTING) \
/*
* No-op instruction that marks the top of the bytecode for a
* *TryStatement*.
*
* The `jumpAtEndOffset` operand is the offset (relative to the current op)
* of the `JSOp::Goto` at the end of the try-block body. This is used by
* bytecode analysis and JIT compilation.
*
@@ -2630,49 +2605,32 @@
*
* Category: Variables and scopes
* Type: Initialization
* 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|JOF_DETECTING) \
/*
- * Throw a ReferenceError if the optimized local `localno` is
- * uninitialized.
+ * Throw a ReferenceError if the value on top of the stack is uninitialized.
*
- * `localno` must be the number of a fixed slot in the current stack frame
- * previously initialized or marked uninitialized using `JSOp::InitLexical`.
- *
- * Typically used before `JSOp::GetLocal` or `JSOp::SetLocal`.
+ * Typically used after `JSOp::GetLocal` or `JSOp::GetAliasedVar`.
*
* Implements: [GetBindingValue][1] step 3 and [SetMutableBinding][2] step
* 4 for declarative Environment Records.
*
* [1]: https://tc39.es/ecma262/#sec-declarative-environment-records-getbindingvalue-n-s
* [2]: https://tc39.es/ecma262/#sec-declarative-environment-records-setmutablebinding-n-v-s
*
* Category: Variables and scopes
* Type: Initialization
- * Operands: uint24_t localno
- * Stack: =>
- */ \
- MACRO(CheckLexical, check_lexical, NULL, 4, 0, 0, JOF_LOCAL|JOF_NAME) \
- /*
- * Like `JSOp::CheckLexical` but for aliased bindings.
- *
- * Note: There are no `CheckName` or `CheckGName` instructions because
- * they're unnecessary. `JSOp::{Get,Set}{Name,GName}` all check for
- * uninitialized lexicals and throw if needed.
- *
- * Category: Variables and scopes
- * Type: Initialization
- * Operands: uint8_t hops, uint24_t slot
- * Stack: =>
+ * Operands: uint32_t nameIndex
+ * Stack: v => v
*/ \
- MACRO(CheckAliasedLexical, check_aliased_lexical, NULL, 5, 0, 0, JOF_ENVCOORD|JOF_NAME) \
+ MACRO(CheckLexical, check_lexical, NULL, 5, 1, 1, JOF_ATOM|JOF_NAME) \
/*
* Throw a ReferenceError if the value on top of the stack is
* `MagicValue(JS_UNINITIALIZED_LEXICAL)`. Used in derived class
* constructors to check `this` (which needs to be initialized before use,
* by calling `super()`).
*
* Implements: [GetThisBinding][1] step 3.
*
@@ -3500,16 +3458,19 @@
// clang-format on
/*
* In certain circumstances it may be useful to "pad out" the opcode space to
* a power of two. Use this macro to do so.
*/
#define FOR_EACH_TRAILING_UNUSED_OPCODE(MACRO) \
+ MACRO(236) \
+ MACRO(237) \
+ MACRO(238) \
MACRO(239) \
MACRO(240) \
MACRO(241) \
MACRO(242) \
MACRO(243) \
MACRO(244) \
MACRO(245) \
MACRO(246) \
Files
/js/src/frontend/BytecodeEmitter.cpp
/js/src/frontend/BytecodeEmitter.h
/js/src/frontend/NameOpEmitter.cpp
/js/src/vm/BytecodeUtil.cpp
/js/src/vm/Opcodes.h
Changesets
https://hg.mozilla.org/mozilla-central/rev/d7685b7062706f451a7277581f0b0b14542b1a1e
https://hg.mozilla.org/mozilla-central/rev/e00eb4d3b3b06b232434ac50e6aedccb09b07c42
https://hg.mozilla.org/mozilla-central/rev/ba8de6a4229732265c447e22e63d2cddd6f772fe
https://hg.mozilla.org/mozilla-central/rev/72975d0d8292a67ab6d44f7ae390b345d131e930
https://hg.mozilla.org/mozilla-central/rev/2fec64fbdce6b27ed887a24a2529a254c4c0dc40
Diffs
/js/src/frontend/BytecodeEmitter.cpp
/js/src/frontend/BytecodeEmitter.h
/js/src/frontend/NameOpEmitter.cpp
/js/src/vm/BytecodeUtil.cpp
/js/src/vm/Opcodes.h