ecma_snapshot_resolve_serializable_values (const ecma_compiled_code_t *compiled_code_p, /**< compiled code */
                                           uint8_t *bytecode_end_p) /**< end of the bytecode */
{
  ecma_value_t *base_p = (ecma_value_t *) bytecode_end_p;

  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED)
  {
    uint32_t argument_end;
    if (compiled_code_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)
    {
      argument_end = ((cbc_uint16_arguments_t *) compiled_code_p)->argument_end;
    }
    else
    {
      argument_end = ((cbc_uint8_arguments_t *) compiled_code_p)->argument_end;
    }

    base_p -= argument_end;
  }

#if JERRY_ESNEXT
  /* function name */
  if (CBC_FUNCTION_GET_TYPE (compiled_code_p->status_flags) != CBC_FUNCTION_CONSTRUCTOR)
  {
    base_p--;
  }
#endif /* JERRY_ESNEXT */

  return base_p;
} /* ecma_snapshot_resolve_serializable_values */
ecma_snapshot_resolve_serializable_values (const ecma_compiled_code_t *compiled_code_p,  
                                           uint8_t *bytecode_end_p)  
{
  ecma_value_t *base_p = (ecma_value_t *) bytecode_end_p;

  if (compiled_code_p->status_flags & CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED)
  {
    uint32_t argument_end;
    if (compiled_code_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)
    {
      argument_end = ((cbc_uint16_arguments_t *) compiled_code_p)->argument_end;
    }
    else
    {
      argument_end = ((cbc_uint8_arguments_t *) compiled_code_p)->argument_end;
    }

    base_p -= argument_end;
  }

#if JERRY_ESNEXT
   
  if (CBC_FUNCTION_GET_TYPE (compiled_code_p->status_flags) != CBC_FUNCTION_CONSTRUCTOR)
  {
    base_p--;
  }
#endif  

  return base_p;
}  