@@ -653,44 +653,40 @@ opfunc_call_n (opcode_t opdata, /**< operation data */
653653
654654 int_data->pos ++;
655655
656- bool this_arg_var_idx_set = false ;
657656 idx_t this_arg_var_idx = INVALID_VALUE;
658- idx_t args_number;
657+
658+ opcode_call_flags_t call_flags = OPCODE_CALL_FLAGS__EMPTY;
659659
660660 opcode_t next_opcode = vm_get_opcode (int_data->opcodes_p , int_data->pos );
661661 if (next_opcode.op_idx == __op__idx_meta
662- && next_opcode.data .meta .type == OPCODE_META_TYPE_THIS_ARG )
662+ && next_opcode.data .meta .type == OPCODE_META_TYPE_CALL_SITE_INFO )
663663 {
664- this_arg_var_idx = next_opcode.data .meta .data_1 ;
665- JERRY_ASSERT (is_reg_variable (int_data, this_arg_var_idx));
666-
667- this_arg_var_idx_set = true ;
664+ call_flags = (opcode_call_flags_t ) next_opcode.data .meta .data_1 ;
668665
669- JERRY_ASSERT (args_number_idx > 0 );
670- args_number = (idx_t ) (args_number_idx - 1 );
666+ if (call_flags & OPCODE_CALL_FLAGS_HAVE_THIS_ARG)
667+ {
668+ this_arg_var_idx = next_opcode.data .meta .data_2 ;
669+ JERRY_ASSERT (is_reg_variable (int_data, this_arg_var_idx));
670+ }
671671
672672 int_data->pos ++;
673673 }
674- else
675- {
676- args_number = args_number_idx;
677- }
678674
679- MEM_DEFINE_LOCAL_ARRAY (arg_values, args_number , ecma_value_t );
675+ MEM_DEFINE_LOCAL_ARRAY (arg_values, args_number_idx , ecma_value_t );
680676
681677 ecma_length_t args_read;
682678 ecma_completion_value_t get_arg_completion = fill_varg_list (int_data,
683- args_number ,
679+ args_number_idx ,
684680 arg_values,
685681 &args_read);
686682
687683 if (ecma_is_completion_value_empty (get_arg_completion))
688684 {
689- JERRY_ASSERT (args_read == args_number );
685+ JERRY_ASSERT (args_read == args_number_idx );
690686
691687 ecma_completion_value_t get_this_completion_value;
692688
693- if (this_arg_var_idx_set )
689+ if (call_flags & OPCODE_CALL_FLAGS_HAVE_THIS_ARG )
694690 {
695691 get_this_completion_value = get_variable_value (int_data, this_arg_var_idx, false );
696692 }
@@ -714,7 +710,7 @@ opfunc_call_n (opcode_t opdata, /**< operation data */
714710 ecma_op_function_call (func_obj_p,
715711 this_value,
716712 arg_values,
717- args_number ),
713+ args_number_idx ),
718714 ret_value);
719715
720716 ret_value = set_variable_value (int_data, lit_oc,
@@ -1680,7 +1676,7 @@ opfunc_meta (opcode_t opdata, /**< operation data */
16801676
16811677 case OPCODE_META_TYPE_SCOPE_CODE_FLAGS:
16821678 case OPCODE_META_TYPE_UNDEFINED:
1683- case OPCODE_META_TYPE_THIS_ARG :
1679+ case OPCODE_META_TYPE_CALL_SITE_INFO :
16841680 case OPCODE_META_TYPE_FUNCTION_END:
16851681 case OPCODE_META_TYPE_CATCH_EXCEPTION_IDENTIFIER:
16861682 {
0 commit comments