@@ -652,44 +652,40 @@ opfunc_call_n (opcode_t opdata, /**< operation data */
652
652
653
653
int_data->pos ++;
654
654
655
- bool this_arg_var_idx_set = false ;
656
655
idx_t this_arg_var_idx = INVALID_VALUE;
657
- idx_t args_number;
656
+
657
+ opcode_call_flags_t call_flags = OPCODE_CALL_FLAGS__EMPTY;
658
658
659
659
opcode_t next_opcode = vm_get_opcode (int_data->opcodes_p , int_data->pos );
660
660
if (next_opcode.op_idx == __op__idx_meta
661
- && next_opcode.data .meta .type == OPCODE_META_TYPE_THIS_ARG )
661
+ && next_opcode.data .meta .type == OPCODE_META_TYPE_CALL_SITE_INFO )
662
662
{
663
- this_arg_var_idx = next_opcode.data .meta .data_1 ;
664
- JERRY_ASSERT (is_reg_variable (int_data, this_arg_var_idx));
665
-
666
- this_arg_var_idx_set = true ;
663
+ call_flags = (opcode_call_flags_t ) next_opcode.data .meta .data_1 ;
667
664
668
- JERRY_ASSERT (args_number_idx > 0 );
669
- args_number = (idx_t ) (args_number_idx - 1 );
665
+ if (call_flags & OPCODE_CALL_FLAGS_HAVE_THIS_ARG)
666
+ {
667
+ this_arg_var_idx = next_opcode.data .meta .data_2 ;
668
+ JERRY_ASSERT (is_reg_variable (int_data, this_arg_var_idx));
669
+ }
670
670
671
671
int_data->pos ++;
672
672
}
673
- else
674
- {
675
- args_number = args_number_idx;
676
- }
677
673
678
- MEM_DEFINE_LOCAL_ARRAY (arg_values, args_number , ecma_value_t );
674
+ MEM_DEFINE_LOCAL_ARRAY (arg_values, args_number_idx , ecma_value_t );
679
675
680
676
ecma_length_t args_read;
681
677
ecma_completion_value_t get_arg_completion = fill_varg_list (int_data,
682
- args_number ,
678
+ args_number_idx ,
683
679
arg_values,
684
680
&args_read);
685
681
686
682
if (ecma_is_completion_value_empty (get_arg_completion))
687
683
{
688
- JERRY_ASSERT (args_read == args_number );
684
+ JERRY_ASSERT (args_read == args_number_idx );
689
685
690
686
ecma_completion_value_t get_this_completion_value;
691
687
692
- if (this_arg_var_idx_set )
688
+ if (call_flags & OPCODE_CALL_FLAGS_HAVE_THIS_ARG )
693
689
{
694
690
get_this_completion_value = get_variable_value (int_data, this_arg_var_idx, false );
695
691
}
@@ -713,7 +709,7 @@ opfunc_call_n (opcode_t opdata, /**< operation data */
713
709
ecma_op_function_call (func_obj_p,
714
710
this_value,
715
711
arg_values,
716
- args_number ),
712
+ args_number_idx ),
717
713
ret_value);
718
714
719
715
ret_value = set_variable_value (int_data, lit_oc,
@@ -1679,7 +1675,7 @@ opfunc_meta (opcode_t opdata, /**< operation data */
1679
1675
1680
1676
case OPCODE_META_TYPE_SCOPE_CODE_FLAGS:
1681
1677
case OPCODE_META_TYPE_UNDEFINED:
1682
- case OPCODE_META_TYPE_THIS_ARG :
1678
+ case OPCODE_META_TYPE_CALL_SITE_INFO :
1683
1679
case OPCODE_META_TYPE_FUNCTION_END:
1684
1680
case OPCODE_META_TYPE_CATCH_EXCEPTION_IDENTIFIER:
1685
1681
{
0 commit comments