Remove ES_NEXT macro (#4915)

- remove all '#JERRY_ESNEXT' macro
- remove 5.1 build profile, update test runner accordingly (Note: all builtins are turn on by default)
- move tests from tests/jerry/esnext into tests/jerry, concatenate files with same names
- add skiplist to some snapshot tests that were supported only in 5.1
- fix doxygen issues that were hidden before (bc. of es.next macro)

Co-authored-by: Martin Negyokru negyokru@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2022-01-31 16:46:00 +01:00
committed by GitHub
parent 76403606d0
commit 4924f9fd31
973 changed files with 1902 additions and 8240 deletions
-4
View File
@@ -105,13 +105,11 @@ do_number_arithmetic (number_arithmetic_op op, /**< number arithmetic operation
result = ecma_number_remainder (left_number, right_number);
break;
}
#if JERRY_ESNEXT
case NUMBER_ARITHMETIC_EXPONENTIATION:
{
result = ecma_number_pow (left_number, right_number);
break;
}
#endif /* JERRY_ESNEXT */
}
ret_value = ecma_make_number_value (result);
@@ -150,13 +148,11 @@ do_number_arithmetic (number_arithmetic_op op, /**< number arithmetic operation
ret_value = ecma_bigint_div_mod (left_value, right_value, true);
break;
}
#if JERRY_ESNEXT
case NUMBER_ARITHMETIC_EXPONENTIATION:
{
ret_value = ecma_bigint_pow (left_value, right_value);
break;
}
#endif /* JERRY_ESNEXT */
}
ecma_free_value (left_value);
@@ -107,7 +107,6 @@ opfunc_instanceof (ecma_value_t left_value, /**< left value */
return ecma_raise_type_error (ECMA_ERR_RIGHT_VALUE_OF_INSTANCEOF_MUST_BE_AN_OBJECT);
}
#if JERRY_ESNEXT
ecma_value_t has_instance_method = ecma_op_get_method_by_symbol_id (right_value, LIT_GLOBAL_SYMBOL_HAS_INSTANCE);
if (ECMA_IS_VALUE_ERROR (has_instance_method))
{
@@ -131,7 +130,6 @@ opfunc_instanceof (ecma_value_t left_value, /**< left value */
return ecma_make_boolean_value (has_instance);
}
#endif /* JERRY_ESNEXT */
ecma_object_t *right_value_obj_p = ecma_get_object_from_value (right_value);
return ecma_op_object_has_instance (right_value_obj_p, left_value);
+20 -28
View File
@@ -184,13 +184,6 @@ vm_op_delete_prop (ecma_value_t object, /**< base object */
ecma_value_t property, /**< property name */
bool is_strict) /**< strict mode */
{
#if !JERRY_ESNEXT
if (ecma_is_value_undefined (object))
{
return ECMA_VALUE_TRUE;
}
#endif /* !JERRY_ESNEXT */
if (!ecma_op_require_object_coercible (object))
{
return ECMA_VALUE_ERROR;
@@ -215,12 +208,10 @@ vm_op_delete_prop (ecma_value_t object, /**< base object */
ecma_deref_object (obj_p);
ecma_deref_ecma_string (name_string_p);
#if JERRY_ESNEXT
if (is_strict && ecma_is_value_false (delete_op_ret))
{
return ecma_raise_type_error (ECMA_ERR_OPERATOR_DELETE_RETURNED_FALSE_IN_STRICT_MODE);
}
#endif /* JERRY_ESNEXT */
return delete_op_ret;
} /* vm_op_delete_prop */
@@ -296,14 +287,12 @@ opfunc_for_in (ecma_value_t iterable_value, /**< ideally an iterable value */
ecma_object_t *obj_p = ecma_get_object_from_value (obj_expr_value);
ecma_collection_t *prop_names_p = ecma_op_object_enumerate (obj_p);
#if JERRY_ESNEXT
if (JERRY_UNLIKELY (prop_names_p == NULL))
{
ecma_deref_object (obj_p);
*result_obj_p = ECMA_VALUE_ERROR;
return NULL;
}
#endif /* JERRY_ESNEXT */
if (prop_names_p->item_count != 0)
{
@@ -317,8 +306,6 @@ opfunc_for_in (ecma_value_t iterable_value, /**< ideally an iterable value */
return NULL;
} /* opfunc_for_in */
#if JERRY_ESNEXT
/**
* 'VM_OC_APPEND_ARRAY' opcode handler specialized for spread objects
*
@@ -498,8 +485,6 @@ opfunc_spread_arguments (ecma_value_t *stack_top_p, /**< pointer to the current
return buff_p;
} /* opfunc_spread_arguments */
#endif /* JERRY_ESNEXT */
/**
* 'VM_OC_APPEND_ARRAY' opcode handler, for setting array object properties
*
@@ -511,12 +496,10 @@ opfunc_append_array (ecma_value_t *stack_top_p, /**< current stack top */
uint16_t values_length) /**< number of elements to set
* with potential OPFUNC_HAS_SPREAD_ELEMENT flag */
{
#if JERRY_ESNEXT
if (values_length >= OPFUNC_HAS_SPREAD_ELEMENT)
{
return opfunc_append_to_spread_array (stack_top_p, (uint16_t) (values_length & ~OPFUNC_HAS_SPREAD_ELEMENT));
}
#endif /* JERRY_ESNEXT */
ecma_object_t *array_obj_p = ecma_get_object_from_value (stack_top_p[-1]);
JERRY_ASSERT (ecma_get_object_type (array_obj_p) == ECMA_OBJECT_TYPE_ARRAY);
@@ -574,8 +557,6 @@ opfunc_append_array (ecma_value_t *stack_top_p, /**< current stack top */
return ECMA_VALUE_EMPTY;
} /* opfunc_append_array */
#if JERRY_ESNEXT
/**
* Create an executable object using the current frame context
*
@@ -905,7 +886,7 @@ opfunc_async_create_and_await (vm_frame_ctx_t *frame_ctx_p, /**< frame context *
static ecma_value_t
opfunc_private_method_or_accessor_add (ecma_object_t *class_object_p, /**< the function itself */
ecma_object_t *this_obj_p, /**< this object */
uint32_t static_flag)
uint32_t static_flag) /**< static_flag */
{
ecma_string_t *internal_string_p = ecma_get_internal_string (LIT_INTERNAL_MAGIC_STRING_CLASS_PRIVATE_ELEMENTS);
ecma_property_t *prop_p = ecma_find_named_property (class_object_p, internal_string_p);
@@ -985,7 +966,9 @@ opfunc_private_method_or_accessor_add (ecma_object_t *class_object_p, /**< the f
* ECMA_VALUE_{TRUE/FALSE} - otherwise
*/
ecma_value_t
opfunc_define_field (ecma_value_t base, ecma_value_t property, ecma_value_t value)
opfunc_define_field (ecma_value_t base, /**< base */
ecma_value_t property, /**< property */
ecma_value_t value) /**< value */
{
ecma_string_t *property_key_p = ecma_op_to_property_key (property);
@@ -1216,6 +1199,8 @@ opfunc_set_home_object (ecma_object_t *func_p, /**< function object */
/**
* Make private key from descriptor
*
* @return pointer to private key
*/
ecma_string_t *
opfunc_make_private_key (ecma_value_t descriptor) /**< descriptor */
@@ -1228,6 +1213,9 @@ opfunc_make_private_key (ecma_value_t descriptor) /**< descriptor */
/**
* Find a private property in the private elements internal property given the key
*
* @return pointer to the private property - if it is found,
* NULL - othervise
*/
static ecma_property_t *
opfunc_find_private_key (ecma_object_t *class_object_p, /**< class environment */
@@ -1291,7 +1279,7 @@ static ecma_property_t *
opfunc_find_private_element (ecma_object_t *obj_p, /**< object */
ecma_string_t *key_p, /**< key */
ecma_string_t **private_key_p, /**< [out] private key */
bool allow_heritage)
bool allow_heritage) /**< heritage flag */
{
JERRY_ASSERT (private_key_p != NULL);
JERRY_ASSERT (*private_key_p == NULL);
@@ -1342,7 +1330,8 @@ opfunc_find_private_element (ecma_object_t *obj_p, /**< object */
* ECMA_VALUE_FALSE - otherwise
*/
ecma_value_t
opfunc_private_in (ecma_value_t base, ecma_value_t property)
opfunc_private_in (ecma_value_t base, /**< base */
ecma_value_t property) /**< property */
{
if (!ecma_is_value_object (base))
{
@@ -1514,11 +1503,13 @@ opfunc_private_get (ecma_value_t base, /**< this object */
/**
* Find the private property in the object who's private key descriptor matches the given key
*
* @return pointer to private key
*/
static ecma_string_t *
opfunc_create_private_key (ecma_value_t *collection_p, /**< TODO */
opfunc_create_private_key (ecma_value_t *collection_p, /**< collection of private properties */
ecma_value_t search_key, /**< key */
ecma_private_property_kind_t search_kind)
ecma_private_property_kind_t search_kind) /**< kind of the property */
{
if (search_kind < ECMA_PRIVATE_GETTER)
{
@@ -1561,7 +1552,10 @@ opfunc_create_private_key (ecma_value_t *collection_p, /**< TODO */
* Collect private members for PrivateMethodOrAccessorAdd and PrivateFieldAdd abstract operations
*/
void
opfunc_collect_private_properties (ecma_value_t constructor, ecma_value_t prop_name, ecma_value_t value, uint8_t opcode)
opfunc_collect_private_properties (ecma_value_t constructor, /**< constructor */
ecma_value_t prop_name, /**< property name */
ecma_value_t value, /**< value */
uint8_t opcode) /**< opcode */
{
ecma_private_property_kind_t kind = ECMA_PRIVATE_FIELD;
bool is_static = false;
@@ -2303,8 +2297,6 @@ opfunc_lexical_scope_has_restricted_binding (vm_frame_ctx_t *frame_ctx_p, /**< f
&& !ecma_is_property_configurable (property));
} /* opfunc_lexical_scope_has_restricted_binding */
#endif /* JERRY_ESNEXT */
/**
* @}
* @}
-11
View File
@@ -36,9 +36,7 @@ typedef enum
NUMBER_ARITHMETIC_MULTIPLICATION, /**< multiplication */
NUMBER_ARITHMETIC_DIVISION, /**< division */
NUMBER_ARITHMETIC_REMAINDER, /**< remainder calculation */
#if JERRY_ESNEXT
NUMBER_ARITHMETIC_EXPONENTIATION, /**< exponentiation */
#endif /* JERRY_ESNEXT */
} number_arithmetic_op;
/**
@@ -54,8 +52,6 @@ typedef enum
NUMBER_BITWISE_SHIFT_URIGHT, /**< bitwise UNSIGNED RIGHT SHIFT calculation */
} number_bitwise_logic_op;
#if JERRY_ESNEXT
/**
* Types for opfunc_create_executable_object.
*/
@@ -65,8 +61,6 @@ typedef enum
VM_CREATE_EXECUTABLE_OBJECT_ASYNC, /**< create an async function */
} vm_create_executable_object_type_t;
#endif /* JERRY_ESNEXT */
/**
* The stack contains spread object during the upcoming APPEND_ARRAY operation
*/
@@ -102,14 +96,10 @@ ecma_value_t vm_op_delete_var (ecma_value_t name_literal, ecma_object_t *lex_env
ecma_collection_t *opfunc_for_in (ecma_value_t left_value, ecma_value_t *result_obj_p);
#if JERRY_ESNEXT
ecma_collection_t *opfunc_spread_arguments (ecma_value_t *stack_top_p, uint8_t argument_list_len);
#endif /* JERRY_ESNEXT */
ecma_value_t opfunc_append_array (ecma_value_t *stack_top_p, uint16_t values_length);
#if JERRY_ESNEXT
vm_executable_object_t *opfunc_create_executable_object (vm_frame_ctx_t *frame_ctx_p,
vm_create_executable_object_type_t type);
@@ -174,7 +164,6 @@ ecma_value_t
opfunc_copy_data_properties (ecma_value_t target_object, ecma_value_t source_object, ecma_value_t filter_array);
ecma_value_t opfunc_lexical_scope_has_restricted_binding (vm_frame_ctx_t *vm_frame_ctx_p, ecma_string_t *name_p);
#endif /* JERRY_ESNEXT */
/**
* @}
-6
View File
@@ -45,13 +45,11 @@ typedef enum
VM_FRAME_CTX_SHARED_DIRECT_EVAL = (1 << 1), /**< direct eval call */
VM_FRAME_CTX_SHARED_FREE_THIS = (1 << 2), /**< free this binding */
VM_FRAME_CTX_SHARED_FREE_LOCAL_ENV = (1 << 3), /**< free local environment */
#if JERRY_ESNEXT
VM_FRAME_CTX_SHARED_NON_ARROW_FUNC = (1 << 4), /**< non-arrow function */
VM_FRAME_CTX_SHARED_HERITAGE_PRESENT = (1 << 5), /**< class heritage present */
VM_FRAME_CTX_SHARED_HAS_CLASS_FIELDS = (1 << 6), /**< has class fields */
VM_FRAME_CTX_SHARED_EXECUTABLE = (1 << 7), /**< frame is an executable object constructed
* with opfunc_create_executable_object */
#endif /* JERRY_ESNEXT */
} vm_frame_ctx_shared_flags_t;
/**
@@ -74,8 +72,6 @@ typedef struct
uint32_t arg_list_len; /**< arguments list length */
} vm_frame_ctx_shared_args_t;
#if JERRY_ESNEXT
/**
* Shared data extended with computed class fields
*/
@@ -91,8 +87,6 @@ typedef struct
#define VM_GET_COMPUTED_CLASS_FIELDS(frame_ctx_p) \
(((vm_frame_ctx_shared_class_fields_t *) ((frame_ctx_p)->shared_p))->computed_class_fields_p)
#endif /* JERRY_ESNEXT */
/**
* Flag bits of vm_frame_ctx_t
*/
-30
View File
@@ -43,7 +43,6 @@ JERRY_STATIC_ASSERT (PARSER_WITH_CONTEXT_STACK_ALLOCATION == PARSER_TRY_CONTEXT_
JERRY_STATIC_ASSERT (PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION == PARSER_FOR_AWAIT_OF_CONTEXT_STACK_ALLOCATION,
for_of_context_stack_allocation_must_be_equal_to_for_await_of_context_stack_allocation);
#if JERRY_ESNEXT
/**
* Abort (finalize) the current variable length stack context, and remove it.
*
@@ -76,7 +75,6 @@ vm_stack_context_abort_variable_length (vm_frame_ctx_t *frame_ctx_p, /**< frame
return vm_stack_top_p;
} /* vm_stack_context_abort_variable_length */
#endif /* JERRY_ESNEXT */
/**
* Abort (finalize) the current stack context, and remove it.
@@ -113,16 +111,13 @@ vm_stack_context_abort (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
}
case VM_CONTEXT_TRY:
case VM_CONTEXT_CATCH:
#if JERRY_ESNEXT
case VM_CONTEXT_BLOCK:
#endif /* JERRY_ESNEXT */
case VM_CONTEXT_WITH:
{
VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_WITH_CONTEXT_STACK_ALLOCATION);
vm_stack_top_p -= PARSER_WITH_CONTEXT_STACK_ALLOCATION;
break;
}
#if JERRY_ESNEXT
case VM_CONTEXT_ITERATOR:
case VM_CONTEXT_OBJ_INIT:
case VM_CONTEXT_OBJ_INIT_REST:
@@ -141,7 +136,6 @@ vm_stack_context_abort (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
vm_stack_top_p -= PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION;
break;
}
#endif /* JERRY_ESNEXT */
default:
{
JERRY_ASSERT (VM_GET_CONTEXT_TYPE (vm_stack_top_p[-1]) == VM_CONTEXT_FOR_IN);
@@ -201,15 +195,11 @@ vm_decode_branch_offset (const uint8_t *branch_offset_p, /**< start offset of by
return branch_offset;
} /* vm_decode_branch_offset */
#if JERRY_ESNEXT
/**
* Byte code which resumes an executable object with throw
*/
static const uint8_t vm_stack_resume_executable_object_with_context_end[1] = { CBC_CONTEXT_END };
#endif /* JERRY_ESNEXT */
/**
* Find a finally up to the end position.
*
@@ -252,7 +242,6 @@ vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
return VM_CONTEXT_FOUND_EXPECTED;
}
#if JERRY_ESNEXT
if (stack_top_p[-1] & VM_CONTEXT_HAS_LEX_ENV)
{
ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;
@@ -260,7 +249,6 @@ vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
frame_ctx_p->lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);
ecma_deref_object (lex_env_p);
}
#endif /* JERRY_ESNEXT */
byte_code_p = frame_ctx_p->byte_code_start_p + context_end;
@@ -299,16 +287,6 @@ vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
{
JERRY_ASSERT (context_type == VM_CONTEXT_CATCH);
#if !JERRY_ESNEXT
if (stack_top_p[-1] & VM_CONTEXT_HAS_LEX_ENV)
{
ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;
JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);
frame_ctx_p->lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);
ecma_deref_object (lex_env_p);
}
#endif /* !JERRY_ESNEXT */
if (byte_code_p[0] == CBC_CONTEXT_END)
{
VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_TRY_CONTEXT_STACK_ALLOCATION);
@@ -322,7 +300,6 @@ vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
VM_PLUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FINALLY_CONTEXT_EXTRA_STACK_ALLOCATION);
stack_top_p += PARSER_FINALLY_CONTEXT_EXTRA_STACK_ALLOCATION;
#if JERRY_ESNEXT
if (JERRY_UNLIKELY (byte_code_p[1] == CBC_EXT_ASYNC_EXIT))
{
branch_offset = (uint32_t) (byte_code_p - frame_ctx_p->byte_code_start_p);
@@ -332,7 +309,6 @@ vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
frame_ctx_p->stack_top_p = stack_top_p;
return VM_CONTEXT_FOUND_FINALLY;
}
#endif /* JERRY_ESNEXT */
JERRY_ASSERT (byte_code_p[1] >= CBC_EXT_FINALLY && byte_code_p[1] <= CBC_EXT_FINALLY_3);
@@ -348,7 +324,6 @@ vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
frame_ctx_p->stack_top_p = stack_top_p;
return VM_CONTEXT_FOUND_FINALLY;
}
#if JERRY_ESNEXT
else if (stack_top_p[-1] & VM_CONTEXT_CLOSE_ITERATOR)
{
JERRY_ASSERT (context_type == VM_CONTEXT_FOR_OF || context_type == VM_CONTEXT_FOR_AWAIT_OF
@@ -441,7 +416,6 @@ vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
jcontext_raise_exception (exception);
}
}
#endif /* JERRY_ESNEXT */
stack_top_p = vm_stack_context_abort (frame_ctx_p, stack_top_p);
}
@@ -450,8 +424,6 @@ vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
return VM_CONTEXT_FOUND_EXPECTED;
} /* vm_stack_find_finally */
#if JERRY_ESNEXT
/**
* Get the offsets of ecma values corresponding to the passed context.
*
@@ -568,8 +540,6 @@ vm_ref_lex_env_chain (ecma_object_t *lex_env_p, /**< top of lexical environment
} while (context_top_p > context_end_p);
} /* vm_ref_lex_env_chain */
#endif /* JERRY_ESNEXT */
/**
* @}
* @}
-12
View File
@@ -68,12 +68,9 @@ typedef enum
VM_CONTEXT_FINALLY_RETURN, /**< finally context with a return */
VM_CONTEXT_TRY, /**< try context */
VM_CONTEXT_CATCH, /**< catch context */
#if JERRY_ESNEXT
VM_CONTEXT_BLOCK, /**< block context */
#endif /* JERRY_ESNEXT */
VM_CONTEXT_WITH, /**< with context */
VM_CONTEXT_FOR_IN, /**< for-in context */
#if JERRY_ESNEXT
VM_CONTEXT_FOR_OF, /**< for-of context */
VM_CONTEXT_FOR_AWAIT_OF, /**< for-await-of context */
@@ -81,7 +78,6 @@ typedef enum
VM_CONTEXT_ITERATOR, /**< iterator context */
VM_CONTEXT_OBJ_INIT, /**< object-initializer context */
VM_CONTEXT_OBJ_INIT_REST, /**< object-initializer-rest context */
#endif /* JERRY_ESNEXT */
} vm_stack_context_type_t;
/**
@@ -90,10 +86,8 @@ typedef enum
typedef enum
{
VM_CONTEXT_FOUND_FINALLY, /**< found finally */
#if JERRY_ESNEXT
VM_CONTEXT_FOUND_ERROR, /**< found an error */
VM_CONTEXT_FOUND_AWAIT, /**< found an await operation */
#endif /* JERRY_ESNEXT */
VM_CONTEXT_FOUND_EXPECTED, /**< found the type specified in finally_type */
} vm_stack_found_type;
@@ -105,11 +99,7 @@ typedef enum
* - [JS values belong to the context]
* - [previous JS values stored by the VM stack]
*/
#if JERRY_ESNEXT
#define VM_CONTEXT_IS_VARIABLE_LENGTH(context_type) ((context_type) >= VM_CONTEXT_ITERATOR)
#else /* !JERRY_ESNEXT */
#define VM_CONTEXT_IS_VARIABLE_LENGTH(context_type) false
#endif /* JERRY_ESNEXT */
/**
* Checks whether the context type is a finally type.
@@ -131,11 +121,9 @@ typedef enum
*/
#define VM_CONTEXT_GET_NEXT_OFFSET(offsets) (-((int32_t) ((offsets) & ((1 << VM_CONTEXT_OFFSET_SHIFT) - 1))))
#if JERRY_ESNEXT
ecma_value_t *vm_stack_context_abort_variable_length (vm_frame_ctx_t *frame_ctx_p,
ecma_value_t *vm_stack_top_p,
uint32_t context_stack_allocation);
#endif /* JERRY_ESNEXT */
ecma_value_t *vm_stack_context_abort (vm_frame_ctx_t *frame_ctx_p, ecma_value_t *vm_stack_top_p);
vm_stack_found_type vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p,
ecma_value_t *stack_top_p,
+12 -75
View File
@@ -95,12 +95,10 @@ vm_op_get_value (ecma_value_t object, /**< base object */
property_name_p = ecma_get_string_from_value (property);
}
#if JERRY_ESNEXT
if (ecma_is_value_symbol (property))
{
property_name_p = ecma_get_symbol_from_value (property);
}
#endif /* JERRY_ESNEXT */
if (property_name_p != NULL)
{
@@ -264,12 +262,10 @@ vm_run_global (const ecma_compiled_code_t *bytecode_p, /**< pointer to bytecode
ecma_object_t *global_obj_p = ecma_builtin_get_global ();
#endif /* JERRY_BUILTIN_REALMS */
#if JERRY_ESNEXT
if (bytecode_p->status_flags & CBC_CODE_FLAGS_LEXICAL_BLOCK_NEEDED)
{
ecma_create_global_lexical_block (global_obj_p);
}
#endif /* JERRY_ESNEXT */
ecma_object_t *const global_scope_p = ecma_get_global_scope (global_obj_p);
@@ -465,7 +461,6 @@ vm_construct_literal_object (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
ecma_object_t *func_obj_p;
#if JERRY_ESNEXT
if (JERRY_UNLIKELY (CBC_FUNCTION_IS_ARROW (bytecode_p->status_flags)))
{
func_obj_p = ecma_op_create_arrow_function_object (frame_ctx_p->lex_env_p, bytecode_p, frame_ctx_p->this_binding);
@@ -474,9 +469,6 @@ vm_construct_literal_object (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
{
func_obj_p = ecma_op_create_any_function_object (frame_ctx_p->lex_env_p, bytecode_p);
}
#else /* !JERRY_ESNEXT */
func_obj_p = ecma_op_create_simple_function_object (frame_ctx_p->lex_env_p, bytecode_p);
#endif /* JERRY_ESNEXT */
return ecma_make_object_value (func_obj_p);
} /* vm_construct_literal_object */
@@ -513,8 +505,11 @@ vm_get_implicit_this_value (ecma_value_t *this_value_p) /**< [in,out] this value
*/
static const uint8_t vm_error_byte_code_p[] = { CBC_EXT_OPCODE, CBC_EXT_ERROR };
#if JERRY_ESNEXT
/**
* Get class function object
*
* @return the pointer to the object
*/
static ecma_object_t *
vm_get_class_function (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
{
@@ -731,7 +726,6 @@ vm_spread_operation (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
frame_ctx_p->byte_code_p += 3;
}
} /* vm_spread_operation */
#endif /* JERRY_ESNEXT */
/**
* 'Function call' opcode handler.
@@ -1283,10 +1277,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
case VM_OC_CREATE_BINDING:
{
#if !JERRY_ESNEXT
JERRY_ASSERT (opcode == CBC_CREATE_VAR);
#endif /* !JERRY_ESNEXT */
uint32_t literal_index;
READ_LITERAL_INDEX (literal_index);
@@ -1298,7 +1288,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
uint8_t prop_attributes = ECMA_PROPERTY_FLAG_WRITABLE;
#if JERRY_ESNEXT
if (opcode == CBC_CREATE_LET)
{
prop_attributes = ECMA_PROPERTY_ENUMERABLE_WRITABLE;
@@ -1315,9 +1304,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
{
property_value_p->value = ECMA_VALUE_UNINITIALIZED;
}
#else /* !JERRY_ESNEXT */
ecma_create_named_data_property (frame_ctx_p->lex_env_p, name_p, prop_attributes, NULL);
#endif /* JERRY_ESNEXT */
continue;
}
@@ -1343,27 +1329,27 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
while (lex_env_p->type_flags_refs & ECMA_OBJECT_FLAG_BLOCK)
{
#if JERRY_ESNEXT && !(defined JERRY_NDEBUG)
#if !(defined JERRY_NDEBUG)
if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)
{
ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);
JERRY_ASSERT (property_p == NULL || !(*property_p & ECMA_PROPERTY_FLAG_ENUMERABLE));
}
#endif /* JERRY_ESNEXT && !JERRY_NDEBUG */
#endif /* !JERRY_NDEBUG */
JERRY_ASSERT (lex_env_p->u2.outer_reference_cp != JMEM_CP_NULL);
lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);
}
#if JERRY_ESNEXT && !(defined JERRY_NDEBUG)
#if !(defined JERRY_NDEBUG)
if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)
{
ecma_property_t *property_p = ecma_find_named_property (lex_env_p, name_p);
JERRY_ASSERT (property_p == NULL || !(*property_p & ECMA_PROPERTY_FLAG_ENUMERABLE));
}
#endif /* JERRY_ESNEXT && !JERRY_NDEBUG */
#endif /* !JERRY_NDEBUG */
/* 'Variable declaration' */
result = ecma_op_has_binding (lex_env_p, name_p);
@@ -1413,7 +1399,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
continue;
}
#if JERRY_ESNEXT
case VM_OC_EXT_VAR_EVAL:
{
uint32_t literal_index;
@@ -1485,7 +1470,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
ecma_deref_object (ecma_get_object_from_value (lit_value));
continue;
}
#endif /* JERRY_ESNEXT */
case VM_OC_CREATE_ARGUMENTS:
{
uint32_t literal_index;
@@ -1574,7 +1558,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
continue;
}
#if JERRY_ESNEXT
case VM_OC_CHECK_VAR:
{
JERRY_ASSERT (CBC_FUNCTION_GET_TYPE (frame_ctx_p->shared_p->bytecode_header_p->status_flags)
@@ -1887,7 +1870,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
left_value ^= right_value;
/* FALLTHRU */
}
#endif /* JERRY_ESNEXT */
case VM_OC_SET_PROPERTY:
{
JERRY_STATIC_ASSERT (VM_OC_NON_STATIC_FLAG == VM_OC_BACKWARD_BRANCH,
@@ -1903,7 +1885,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
goto error;
}
#if JERRY_ESNEXT
if (JERRY_UNLIKELY (ecma_compare_ecma_string_to_magic_id (prop_name_p, LIT_MAGIC_STRING_PROTOTYPE))
&& !(opcode_data & VM_OC_NON_STATIC_FLAG))
{
@@ -1912,9 +1893,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
const int index = (int) (opcode_data >> VM_OC_NON_STATIC_SHIFT) - 2;
#else /* !JERRY_ESNEXT */
const int index = -1;
#endif /* JERRY_ESNEXT */
ecma_object_t *object_p = ecma_get_object_from_value (stack_top_p[index]);
@@ -1936,7 +1914,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
goto error;
}
#if JERRY_ESNEXT
if (JERRY_UNLIKELY (ecma_compare_ecma_string_to_magic_id (prop_name_p, LIT_MAGIC_STRING_PROTOTYPE))
&& !(opcode_data & VM_OC_NON_STATIC_FLAG))
{
@@ -1945,10 +1922,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
const int index = (int) (opcode_data >> VM_OC_NON_STATIC_SHIFT) - 2;
#else /* !JERRY_ESNEXT */
const int index = -1;
#endif /* JERRY_ESNEXT */
opfunc_set_accessor (VM_OC_GROUP_GET_INDEX (opcode_data) == VM_OC_SET_GETTER,
stack_top_p[index],
prop_name_p,
@@ -1964,7 +1937,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
*stack_top_p++ = ecma_make_object_value (ecma_op_new_array_object (0));
continue;
}
#if JERRY_ESNEXT
case VM_OC_LOCAL_EVAL:
{
ECMA_CLEAR_LOCAL_PARSE_OPTS ();
@@ -2885,7 +2857,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
continue;
}
#endif /* JERRY_ESNEXT */
case VM_OC_PUSH_ELISON:
{
*stack_top_p++ = ECMA_VALUE_ARRAY_HOLE;
@@ -2896,22 +2867,17 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
uint16_t values_length = *byte_code_p++;
stack_top_p -= values_length;
#if JERRY_ESNEXT
if (*byte_code_start_p == CBC_EXT_OPCODE)
{
values_length = (uint16_t) (values_length | OPFUNC_HAS_SPREAD_ELEMENT);
}
#endif /* JERRY_ESNEXT */
result = opfunc_append_array (stack_top_p, values_length);
#if JERRY_ESNEXT
if (ECMA_IS_VALUE_ERROR (result))
{
goto error;
}
#else /* !JERRY_ESNEXT */
JERRY_ASSERT (ecma_is_value_empty (result));
#endif /* JERRY_ESNEXT */
continue;
}
case VM_OC_IDENT_REFERENCE:
@@ -3341,7 +3307,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
ecma_fast_free_value (value);
continue;
}
#if JERRY_ESNEXT
case VM_OC_POP_REFERENCE:
{
ecma_free_value (stack_top_p[-2]);
@@ -3362,7 +3327,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
--stack_top_p;
continue;
}
#endif /* JERRY_ESNEXT */
case VM_OC_PLUS:
case VM_OC_MINUS:
{
@@ -3637,7 +3601,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
*stack_top_p++ = result;
goto free_both_values;
}
#if JERRY_ESNEXT
case VM_OC_EXP:
{
result = do_number_arithmetic (NUMBER_ARITHMETIC_EXPONENTIATION, left_value, right_value);
@@ -3650,7 +3613,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
*stack_top_p++ = result;
goto free_both_values;
}
#endif /* JERRY_ESNEXT */
case VM_OC_EQUAL:
{
result = opfunc_equality (left_value, right_value);
@@ -4005,7 +3967,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
case VM_OC_BLOCK_CREATE_CONTEXT:
{
#if JERRY_ESNEXT
ecma_value_t *stack_context_top_p;
stack_context_top_p = VM_GET_REGISTERS (frame_ctx_p) + register_end + frame_ctx_p->context_depth;
@@ -4040,12 +4001,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
stack_context_top_p[-1] |= VM_CONTEXT_HAS_LEX_ENV;
}
#else /* !JERRY_ESNEXT */
JERRY_ASSERT (VM_GET_CONTEXT_TYPE (stack_top_p[-2]) == VM_CONTEXT_CATCH
&& !(stack_top_p[-2] & VM_CONTEXT_HAS_LEX_ENV));
stack_top_p[-2] |= VM_CONTEXT_HAS_LEX_ENV;
#endif /* JERRY_ESNEXT */
frame_ctx_p->lex_env_p = ecma_create_decl_lex_env (frame_ctx_p->lex_env_p);
frame_ctx_p->lex_env_p->type_flags_refs |= ECMA_OBJECT_FLAG_BLOCK;
@@ -4096,13 +4051,11 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (prop_names_p == NULL)
{
#if JERRY_ESNEXT
if (JERRY_UNLIKELY (ECMA_IS_VALUE_ERROR (expr_obj_value)))
{
result = expr_obj_value;
goto error;
}
#endif /* JERRY_ESNEXT */
/* The collection is already released */
byte_code_p = byte_code_start_p + branch_offset;
@@ -4118,13 +4071,12 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
stack_top_p[-3] = 0;
stack_top_p[-4] = expr_obj_value;
#if JERRY_ESNEXT
if (byte_code_p[0] == CBC_EXT_OPCODE && byte_code_p[1] == CBC_EXT_CLONE_CONTEXT)
{
/* No need to duplicate the first context. */
byte_code_p += 2;
}
#endif /* JERRY_ESNEXT */
continue;
}
case VM_OC_FOR_IN_GET_NEXT:
@@ -4191,7 +4143,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
continue;
}
#if JERRY_ESNEXT
case VM_OC_FOR_OF_INIT:
{
ecma_value_t value = *(--stack_top_p);
@@ -4405,7 +4356,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
frame_ctx_p->stack_top_p = stack_top_p;
return ECMA_VALUE_UNDEFINED;
}
#endif /* JERRY_ESNEXT */
case VM_OC_TRY:
{
/* Try opcode simply creates the try context. */
@@ -4467,7 +4417,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
continue;
}
#if JERRY_ESNEXT
if (stack_top_p[-1] & VM_CONTEXT_HAS_LEX_ENV)
{
ecma_object_t *lex_env_p = frame_ctx_p->lex_env_p;
@@ -4475,7 +4424,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
frame_ctx_p->lex_env_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, lex_env_p->u2.outer_reference_cp);
ecma_deref_object (lex_env_p);
}
#endif /* JERRY_ESNEXT */
VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FINALLY_CONTEXT_STACK_ALLOCATION);
stack_top_p -= PARSER_FINALLY_CONTEXT_STACK_ALLOCATION;
@@ -4517,7 +4465,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
stack_top_p[-2] = jump_target;
break;
}
#if JERRY_ESNEXT
case VM_CONTEXT_FOUND_ERROR:
{
JERRY_ASSERT (jcontext_has_pending_exception ());
@@ -4530,7 +4477,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
stack_top_p[-2] = jump_target;
return ECMA_VALUE_UNDEFINED;
}
#endif /* JERRY_ESNEXT */
default:
{
byte_code_p = frame_ctx_p->byte_code_start_p + jump_target;
@@ -4561,7 +4507,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
stack_top_p[-2] = (uint32_t) branch_offset;
break;
}
#if JERRY_ESNEXT
case VM_CONTEXT_FOUND_ERROR:
{
JERRY_ASSERT (jcontext_has_pending_exception ());
@@ -4574,7 +4519,6 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
stack_top_p[-2] = (uint32_t) branch_offset;
return ECMA_VALUE_UNDEFINED;
}
#endif /* JERRY_ESNEXT */
default:
{
byte_code_p = frame_ctx_p->byte_code_start_p + branch_offset;
@@ -4839,13 +4783,12 @@ error:
while (stack_top_p > stack_bottom_p)
{
ecma_value_t stack_item = *(--stack_top_p);
#if JERRY_ESNEXT
if (stack_item == ECMA_VALUE_RELEASE_LEX_ENV)
{
opfunc_pop_lexical_environment (frame_ctx_p);
continue;
}
#endif /* JERRY_ESNEXT */
ecma_fast_free_value (stack_item);
}
@@ -4918,7 +4861,6 @@ error:
stack_top_p[-2] = result;
continue;
}
#if JERRY_ESNEXT
case VM_CONTEXT_FOUND_ERROR:
{
JERRY_ASSERT (jcontext_has_pending_exception ());
@@ -4936,7 +4878,6 @@ error:
stack_top_p[-2] = result;
return ECMA_VALUE_UNDEFINED;
}
#endif /* JERRY_ESNEXT */
default:
{
goto finish;
@@ -4975,13 +4916,11 @@ error:
*stack_top_p++ = result;
continue;
}
#if JERRY_ESNEXT
case VM_CONTEXT_FOUND_AWAIT:
{
JERRY_ASSERT (VM_GET_CONTEXT_TYPE (frame_ctx_p->stack_top_p[-1]) == VM_CONTEXT_FINALLY_THROW);
return ECMA_VALUE_UNDEFINED;
}
#endif /* JERRY_ESNEXT */
default:
{
break;
@@ -5278,7 +5217,6 @@ vm_execute (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
opfunc_call (frame_ctx_p);
break;
}
#if JERRY_ESNEXT
case VM_EXEC_SUPER_CALL:
{
vm_super_call (frame_ctx_p);
@@ -5293,7 +5231,6 @@ vm_execute (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
{
return completion_value;
}
#endif /* JERRY_ESNEXT */
case VM_EXEC_CONSTRUCT:
{
opfunc_construct (frame_ctx_p);
-89
View File
@@ -164,10 +164,8 @@ typedef enum
VM_OC_ERROR, /**< error while the vm_loop is suspended */
VM_OC_JUMP, /**< jump */
#if JERRY_ESNEXT
VM_OC_BRANCH_IF_NULLISH, /** branch if undefined or null */
VM_OC_POP_REFERENCE, /** prop identifier or property reference from the stack */
#endif /* JERRY_ESNEXT */
VM_OC_BRANCH_IF_STRICT_EQUAL, /**< branch if strict equal */
/* These four opcodes must be in this order. */
@@ -189,9 +187,7 @@ typedef enum
VM_OC_MUL, /**< mul */
VM_OC_DIV, /**< div */
VM_OC_MOD, /**< mod */
#if JERRY_ESNEXT
VM_OC_EXP, /**< exponentiation */
#endif /* JERRY_ESNEXT */
VM_OC_EQUAL, /**< equal */
VM_OC_NOT_EQUAL, /**< not equal */
@@ -227,17 +223,14 @@ typedef enum
VM_OC_CREATE_ARGUMENTS, /**< create arguments object */
VM_OC_SET_BYTECODE_PTR, /**< setting bytecode pointer */
VM_OC_VAR_EVAL, /**< variable and function evaluation */
#if JERRY_ESNEXT
VM_OC_EXT_VAR_EVAL, /**< variable and function evaluation for
* functions with separate argument context */
#endif /* JERRY_ESNEXT */
VM_OC_INIT_ARG_OR_FUNC, /**< create and init a function or argument binding */
#if JERRY_DEBUGGER
VM_OC_BREAKPOINT_ENABLED, /**< enabled breakpoint for debugger */
VM_OC_BREAKPOINT_DISABLED, /**< disabled breakpoint for debugger */
#endif /* JERRY_DEBUGGER */
#if JERRY_ESNEXT
VM_OC_CLASS_CALL_STATIC_BLOCK, /**< call the class static block */
VM_OC_DEFINE_FIELD, /**< define class field */
VM_OC_PRIVATE_PROP_REFERENCE, /**< reference to class private method */
@@ -310,7 +303,6 @@ typedef enum
VM_OC_SET__PROTO__, /**< set prototype when __proto__: form is used */
VM_OC_PUSH_STATIC_FIELD_FUNC, /**< push static field initializer function */
VM_OC_ADD_COMPUTED_FIELD, /**< add computed field name */
#endif /* JERRY_ESNEXT */
#if JERRY_MODULE_SYSTEM
VM_OC_MODULE_IMPORT, /**< module dynamic import */
VM_OC_MODULE_IMPORT_META, /**< module import.meta */
@@ -324,91 +316,10 @@ typedef enum
*/
typedef enum
{
#if !JERRY_ESNEXT
VM_OC_EXP = VM_OC_NONE, /**< exponentiation */
VM_OC_BRANCH_IF_NULLISH = VM_OC_NONE, /** branch if undefined or null */
VM_OC_POP_REFERENCE = VM_OC_NONE, /** prop identifier or property reference from the stack */
#endif /* !JERRY_ESNEXT */
#if !JERRY_DEBUGGER
VM_OC_BREAKPOINT_ENABLED = VM_OC_NONE, /**< enabled breakpoint for debugger is unused */
VM_OC_BREAKPOINT_DISABLED = VM_OC_NONE, /**< disabled breakpoint for debugger is unused */
#endif /* !JERRY_DEBUGGER */
#if !JERRY_ESNEXT
VM_OC_CLASS_CALL_STATIC_BLOCK = VM_OC_NONE, /**< call the class static block */
VM_OC_DEFINE_FIELD = VM_OC_NONE, /**< define class field */
VM_OC_PRIVATE_PROP_REFERENCE = VM_OC_NONE, /* reference to class private method */
VM_OC_ASSIGN_PRIVATE = VM_OC_NONE, /**< assign to private field */
VM_OC_PRIVATE_FIELD_ADD = VM_OC_NONE, /**< add private field */
VM_OC_PRIVATE_PROP_GET = VM_OC_NONE, /**< get private field */
VM_OC_PRIVATE_IN = VM_OC_NONE, /**< 'in' opcode handler for private identifiers */
VM_OC_COLLECT_PRIVATE_PROPERTY = VM_OC_NONE, /**< collect private properties */
VM_OC_EXT_VAR_EVAL = VM_OC_NONE, /**< variable and function evaluation for
* functions with separate argument context */
VM_OC_CHECK_VAR = VM_OC_NONE, /**< check redeclared vars in the global scope */
VM_OC_CHECK_LET = VM_OC_NONE, /**< check redeclared lets in the global scope */
VM_OC_ASSIGN_LET_CONST = VM_OC_NONE, /**< assign values to let/const declarations */
VM_OC_INIT_BINDING = VM_OC_NONE, /**< create and intialize a binding */
VM_OC_THROW_CONST_ERROR = VM_OC_NONE, /**< throw invalid assignment to const variable error */
VM_OC_COPY_TO_GLOBAL = VM_OC_NONE, /**< copy value to global lex env */
VM_OC_COPY_FROM_ARG = VM_OC_NONE, /**< copy value from arg lex env */
VM_OC_CLONE_CONTEXT = VM_OC_NONE, /**< clone lexical environment with let/const declarations */
VM_OC_COPY_DATA_PROPERTIES = VM_OC_NONE, /**< copy data properties of an object */
VM_OC_SET_COMPUTED_PROPERTY = VM_OC_NONE, /**< set computed property is unused */
VM_OC_FOR_OF_INIT = VM_OC_NONE, /**< for-of init context */
VM_OC_FOR_OF_GET_NEXT = VM_OC_NONE, /**< for-of get next */
VM_OC_FOR_OF_HAS_NEXT = VM_OC_NONE, /**< for-of has next */
VM_OC_FOR_AWAIT_OF_INIT = VM_OC_NONE, /**< for-await-of init context */
VM_OC_FOR_AWAIT_OF_HAS_NEXT = VM_OC_NONE, /**< for-await-of has next */
VM_OC_LOCAL_EVAL = VM_OC_NONE, /**< eval in local context */
VM_OC_SUPER_CALL = VM_OC_NONE, /**< call the 'super' constructor */
VM_OC_PUSH_CLASS_ENVIRONMENT = VM_OC_NONE, /**< push class environment */
VM_OC_PUSH_IMPLICIT_CTOR = VM_OC_NONE, /**< create implicit class constructor */
VM_OC_INIT_CLASS = VM_OC_NONE, /**< initialize class */
VM_OC_FINALIZE_CLASS = VM_OC_NONE, /**< finalize class */
VM_OC_SET_FIELD_INIT = VM_OC_NONE, /**< store the class field initializer function */
VM_OC_SET_STATIC_FIELD_INIT = VM_OC_NONE, /**< store the static class field initializer function */
VM_OC_RUN_FIELD_INIT = VM_OC_NONE, /**< run the class field initializer function */
VM_OC_RUN_STATIC_FIELD_INIT = VM_OC_NONE, /**< run the static class field initializer function */
VM_OC_SET_NEXT_COMPUTED_FIELD = VM_OC_NONE, /**< set the next computed field of a class */
VM_OC_PUSH_SUPER_CONSTRUCTOR = VM_OC_NONE, /**< getSuperConstructor operation */
VM_OC_RESOLVE_LEXICAL_THIS = VM_OC_NONE, /**< resolve this_binding from from the lexical environment */
VM_OC_SUPER_REFERENCE = VM_OC_NONE, /**< push super reference */
VM_OC_SET_HOME_OBJECT = VM_OC_NONE, /**< set the [[HomeObject]] internal property in an object literal */
VM_OC_OBJECT_LITERAL_HOME_ENV = VM_OC_NONE, /**< create/destroy [[HomeObject]] environment of an object literal */
VM_OC_SET_FUNCTION_NAME = VM_OC_NONE, /**< set function name property */
VM_OC_PUSH_SPREAD_ELEMENT = VM_OC_NONE, /**< push spread element */
VM_OC_PUSH_REST_OBJECT = VM_OC_NONE, /**< push rest object */
VM_OC_ITERATOR_CONTEXT_CREATE = VM_OC_NONE, /**< create iterator context */
VM_OC_ITERATOR_STEP = VM_OC_NONE, /**< IteratorStep abstract operation */
VM_OC_ITERATOR_CONTEXT_END = VM_OC_NONE, /**< finalize iterator cotnext */
VM_OC_OBJ_INIT_CONTEXT_CREATE = VM_OC_NONE, /**< create object initializer context */
VM_OC_OBJ_INIT_CONTEXT_END = VM_OC_NONE, /**< finalize object initializer context */
VM_OC_OBJ_INIT_PUSH_REST = VM_OC_NONE, /**< push the object with the rest properties */
VM_OC_INITIALIZER_PUSH_NAME = VM_OC_NONE, /**< append string to name list array and push the string */
VM_OC_DEFAULT_INITIALIZER = VM_OC_NONE, /**< default initializer inside a pattern */
VM_OC_REST_INITIALIZER = VM_OC_NONE, /**< create rest object inside an array pattern */
VM_OC_INITIALIZER_PUSH_PROP = VM_OC_NONE, /**< push property for object initializer */
VM_OC_SPREAD_ARGUMENTS = VM_OC_NONE, /**< perform function call/construct with spreaded arguments */
VM_OC_CREATE_GENERATOR = VM_OC_NONE, /**< create a generator object */
VM_OC_YIELD = VM_OC_NONE, /**< yield operation */
VM_OC_ASYNC_YIELD = VM_OC_NONE, /**< async yield operation */
VM_OC_ASYNC_YIELD_ITERATOR = VM_OC_NONE, /**< async yield iterator operation */
VM_OC_AWAIT = VM_OC_NONE, /**< await operation */
VM_OC_GENERATOR_AWAIT = VM_OC_NONE, /**< generator await operation */
VM_OC_EXT_RETURN = VM_OC_NONE, /**< return which also clears the stack */
VM_OC_ASYNC_EXIT = VM_OC_NONE, /**< return from async function */
VM_OC_STRING_CONCAT = VM_OC_NONE, /**< string concatenation */
VM_OC_GET_TEMPLATE_OBJECT = VM_OC_NONE, /**< GetTemplateObject operation */
VM_OC_PUSH_NEW_TARGET = VM_OC_NONE, /**< push new.target onto the stack */
VM_OC_REQUIRE_OBJECT_COERCIBLE = VM_OC_NONE, /**< RequireObjectCoercible opretaion */
VM_OC_ASSIGN_SUPER = VM_OC_NONE, /**< assign super reference */
VM_OC_SET__PROTO__ = VM_OC_NONE, /**< set prototype when __proto__: form is used */
VM_OC_PUSH_STATIC_FIELD_FUNC = VM_OC_NONE, /**< push static field initializer function */
VM_OC_ADD_COMPUTED_FIELD = VM_OC_NONE, /**< add computed field name */
#endif /* !JERRY_ESNEXT */
#if !JERRY_MODULE_SYSTEM
VM_OC_MODULE_IMPORT = VM_OC_NONE, /**< module dynamic import */
VM_OC_MODULE_IMPORT_META = VM_OC_NONE, /**< module import.meta */