--- 80e6d5eca07bded1b32b69234a05a6ad3530b45d/js/src/vm/Opcodes.h
+++ d35fc9b3fd75c3cdfc0a3ed6616309c9121f02ec/js/src/vm/Opcodes.h
@@ -1406,16 +1406,28 @@
* [2]: https://tc39.es/ecma262/#sec-iteratorclose
* Category: Objects
* Type: Iteration
* Operands: CompletionKind kind
* Stack: iter =>
*/ \
MACRO(CloseIter, close_iter, NULL, 2, 1, 0, JOF_UINT8|JOF_IC) \
/*
+ * If we can optimize iteration for `iterable`, meaning that it is a packed
+ * array and nothing important has been tampered with, then we replace it
+ * with `true`, otherwise we replace it with `false`. This is similar in
+ * operation to OptimizeSpreadCall.
+ *
+ * Category: Objects
+ * Type: Iteration
+ * Operands:
+ * Stack: iterable => is_optimizable
+ */ \
+ MACRO(OptimizeGetIterator, optimize_get_iterator, NULL, 1, 1, 1, JOF_BYTE|JOF_IC) \
+ /*
* Check that the top value on the stack is an object, and throw a
* TypeError if not. `kind` is used only to generate an appropriate error
* message.
*
* Implements: [GetIterator][1] step 5, [IteratorNext][2] step 3. Both
* operations call a JS method which scripts can define however they want,
* so they check afterwards that the method returned an object.
*
@@ -3568,24 +3580,23 @@
// 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) \
- IF_RECORD_TUPLE(/* empty */, MACRO(231)) \
IF_RECORD_TUPLE(/* empty */, MACRO(232)) \
IF_RECORD_TUPLE(/* empty */, MACRO(233)) \
IF_RECORD_TUPLE(/* empty */, MACRO(234)) \
IF_RECORD_TUPLE(/* empty */, MACRO(235)) \
IF_RECORD_TUPLE(/* empty */, MACRO(236)) \
IF_RECORD_TUPLE(/* empty */, MACRO(237)) \
- MACRO(238) \
+ IF_RECORD_TUPLE(/* empty */, MACRO(238)) \
MACRO(239) \
MACRO(240) \
MACRO(241) \
MACRO(242) \
MACRO(243) \
MACRO(244) \
MACRO(245) \
MACRO(246) \
Files
/js/src/vm/BytecodeUtil.cpp
/js/src/vm/Opcodes.h
Changesets
Diffs
/js/src/vm/BytecodeUtil.cpp
/js/src/vm/Opcodes.h