@@ -2955,6 +2955,20 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
29552955 case VM_OC_PROP_PRE_DECR :
29562956 case VM_OC_PROP_POST_INCR :
29572957 case VM_OC_PROP_POST_DECR :
2958+ if (byte_code_start_p [-3 ] == CBC_EXT_OPCODE
2959+ && byte_code_start_p [-2 ] == CBC_EXT_PUSH_PRIVATE_PROP_LITERAL_REFERENCE )
2960+ {
2961+ if (opcode < CBC_PRE_INCR )
2962+ {
2963+ break ;
2964+ }
2965+ result = right_value ;
2966+ stack_top_p += 1 ;
2967+ left_value = right_value ;
2968+ /* Use right_value as the marker for private field */
2969+ right_value = ECMA_VALUE_EMPTY ;
2970+ }
2971+ else
29582972 {
29592973 result = vm_op_get_value (left_value , right_value );
29602974
@@ -3018,7 +3032,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
30183032 }
30193033
30203034 result = (ecma_value_t ) (int_value + int_increase );
3021- break ;
3035+ goto unary_arithmetic_operation_break ;
30223036 }
30233037 result_number = (ecma_number_t ) ecma_get_integer_from_value (result );
30243038 }
@@ -3068,7 +3082,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
30683082 {
30693083 goto error ;
30703084 }
3071- break ;
3085+ goto unary_arithmetic_operation_break ;
30723086 }
30733087#endif /* JERRY_BUILTIN_BIGINT */
30743088
@@ -3089,7 +3103,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
30893103 POST_INCREASE_DECREASE_PUT_RESULT (result );
30903104
30913105 result = ecma_make_number_value (result_number + increase );
3092- break ;
3106+ goto unary_arithmetic_operation_break ;
30933107 }
30943108
30953109 if (ecma_is_value_integer_number (result ))
@@ -3100,6 +3114,35 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
31003114 {
31013115 result = ecma_update_float_number (result , result_number + increase );
31023116 }
3117+ unary_arithmetic_operation_break :
3118+ if (JERRY_UNLIKELY (right_value == ECMA_VALUE_EMPTY ))
3119+ {
3120+ right_value = ECMA_VALUE_UNDEFINED ;
3121+
3122+ if (opcode_data & VM_OC_PUT_REFERENCE )
3123+ {
3124+ ecma_value_t property = * (-- stack_top_p );
3125+ ecma_value_t base = * (-- stack_top_p );
3126+ ecma_value_t set_value_result = opfunc_private_set (base , property , result );
3127+ ecma_free_value (base );
3128+ ecma_free_value (property );
3129+
3130+ if (ECMA_IS_VALUE_ERROR (set_value_result ))
3131+ {
3132+ ecma_free_value (result );
3133+ result = set_value_result ;
3134+ goto error ;
3135+ }
3136+
3137+ if (!(opcode_data & (VM_OC_PUT_STACK | VM_OC_PUT_BLOCK )))
3138+ {
3139+ ecma_fast_free_value (result );
3140+ goto free_both_values ;
3141+ }
3142+
3143+ opcode_data &= (uint32_t ) ~VM_OC_PUT_REFERENCE ;
3144+ }
3145+ }
31033146 break ;
31043147 }
31053148 case VM_OC_ASSIGN :
0 commit comments