Example #1
0
 void chain_back(T *i)
 {
   if (_active_back == NULL)
   {
     unchain(i);
     _active_front = (list_item<T>*)i;
     _active_back = _active_front;
     return;
   }
   chain_next(_active_back, (list_item<T>*)i);
 }
Example #2
0
static int searchidentchain_utf(utf *ident) 
{
	utf *u = chain_first(ident_chain);     /* first element of list */
	int count = 0;

	while (u) {
		if (u==ident) count++;         /* string found */
		u = chain_next(ident_chain);   /* next element in list */ 
	}

	return count;
}
Example #3
0
void chain_removespecific(chain *c, void *e)
{
	void *ce;
	
	ce = chain_first(c);
	while (ce) {
		if (e == ce) {
			chain_remove(c);
			return;
		}

        ce = chain_next(c);
	}
}
Example #4
0
{
  char dummy;
};

/* Language-dependent contents of an identifier.  This must include a
   tree_identifier.  */

struct GTY(()) lang_identifier
{
  struct tree_identifier common;
};

/* The resulting tree type.  */

union GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
	   chain_next ("CODE_CONTAINS_STRUCT (TREE_CODE (&%h.generic), TS_COMMON) ? ((union lang_tree_node *) TREE_CHAIN (&%h.generic)) : NULL")))
lang_tree_node
{
  union tree_node GTY((tag ("0"),
		       desc ("tree_node_structure (&%h)"))) generic;
  struct lang_identifier GTY((tag ("1"))) identifier;
};

/* We don't use language_function.  */

struct GTY(()) language_function
{
  int dummy;
};

/* GC-marking callback for use from jit_root_tab.
#include "ggc.h"
#include "coverage.h"
#include "langhooks.h"
#include "hash-table.h"
#include "tree-iterator.h"
#include "cgraph.h"
#include "dumpfile.h"
#include "diagnostic-core.h"
#include "intl.h"
#include "filenames.h"
#include "target.h"

#include "gcov-io.h"
#include "gcov-io.c"

struct GTY((chain_next ("%h.next"))) coverage_data
{
  struct coverage_data *next;	 /* next function */
  unsigned ident;		 /* function ident */
  unsigned lineno_checksum;	 /* function lineno checksum */
  unsigned cfg_checksum;	 /* function cfg checksum */
  tree fn_decl;			 /* the function decl */
  tree ctr_vars[GCOV_COUNTERS];	 /* counter variables.  */
};

/* Counts information for a function.  */
typedef struct counts_entry
{
  /* We hash by  */
  unsigned ident;
  unsigned ctr;
Example #6
0
size_t
DVDGraph::get_info(char *_buf, size_t _len) const
{
  Speakers spk;
  static const size_t buf_size = 2048;
  char buf[buf_size];
  size_t pos = 0;

  spk = get_input();
  pos += sprintf(buf + pos, "Input format: %s %s %i\n", spk.format_text(), spk.mode_text(), spk.sample_rate);

  spk = user_spk;
  pos += sprintf(buf + pos, "User format: %s %s %i\n", spk.format_text(), spk.mode_text(), spk.sample_rate);

  spk = get_output();
  pos += sprintf(buf + pos, "Output format: %s %s %i\n", spk.format_text(), spk.mode_text(), spk.sample_rate);

  if (use_spdif)
  {
    pos += sprintf(buf + pos, "\nUse SPDIF\n");

    pos += sprintf(buf + pos, "  SPDIF status: ");
    switch (spdif_status)
    {
      case SPDIF_MODE_NONE:        pos += sprintf(buf + pos, "No data\n"); break;
      case SPDIF_MODE_DISABLED:    pos += sprintf(buf + pos, "Disabled "); break;
      case SPDIF_MODE_PASSTHROUGH: pos += sprintf(buf + pos, "SPDIF passthrough\n"); break;
      case SPDIF_MODE_ENCODE:      pos += sprintf(buf + pos, "AC3 encode\n"); break;
      default:                     pos += sprintf(buf + pos, "Unknown\n"); break;
    }

    if (spdif_status == SPDIF_MODE_DISABLED)
    {
      switch (spdif_err)
      {
        case SPDIF_ERR_STEREO_PCM:       pos += sprintf(buf + pos, "(Do not encode stereo PCM)\n"); break;
        case SPDIF_ERR_FORMAT:           pos += sprintf(buf + pos, "(Format is not allowed for passthrough)\n"); break;
        case SPDIF_ERR_SAMPLE_RATE:      pos += sprintf(buf + pos, "(Disallowed sample rate)\n"); break;
        case SPDIF_ERR_SINK:             pos += sprintf(buf + pos, "(SPDIF output is not supported)\n"); break;
        case SPDIF_ERR_ENCODER_DISABLED: pos += sprintf(buf + pos, "(AC3 encoder disabled)\n"); break;
        case SPDIF_ERR_PROC:             pos += sprintf(buf + pos, "(Cannot determine format to encode)\n"); break;
        case SPDIF_ERR_ENCODER:          pos += sprintf(buf + pos, "(Encoder does not support the format given)\n"); break;
        default:                         pos += sprintf(buf + pos, "\n"); break;
      }
    }

    pos += sprintf(buf + pos, "  SPDIF passthrough for:");
    if (spdif_pt & FORMAT_MASK_MPA) pos += sprintf(buf + pos, " MPA");
    if (spdif_pt & FORMAT_MASK_AC3) pos += sprintf(buf + pos, " AC3");
    if (spdif_pt & FORMAT_MASK_DTS) pos += sprintf(buf + pos, " DTS");
    pos += sprintf(buf + pos, spdif_pt? "\n": " -\n");

    if (spdif_encode)
      pos += sprintf(buf + pos, "  Use AC3 encoder (%s)\n",
        spdif_stereo_pt? "do not encode stereo PCM": "encode stereo PCM");
    else
      pos += sprintf(buf + pos, "  Do not use AC3 encoder\n");

    if (spdif_as_pcm)
      pos += sprintf(buf + pos, "  SPDIF as PCM output");

    if (spdif_check_sr)
    {
      if (!spdif_allow_48 && !spdif_allow_44 && !spdif_allow_32)
        pos += sprintf(buf + pos, "  Check SPDIF sample rate: NO ONE SAMPLE RATE ALLOWED!\n");
      else
      {
        pos += sprintf(buf + pos, "  Check SPDIF sample rate (allow:");
        if (spdif_allow_48) pos += sprintf(buf + pos, " 48kHz");
        if (spdif_allow_44) pos += sprintf(buf + pos, " 44.1kHz");
        if (spdif_allow_32) pos += sprintf(buf + pos, " 32kHz");
        pos += sprintf(buf + pos, ")\n");
      }
    }
    else
      pos += sprintf(buf + pos, "  Do not check SPDIF sample rate\n");

    if (query_sink)
      pos += sprintf(buf + pos, "  Query for SPDIF output support\n");
    else
      pos += sprintf(buf + pos, "  Do not query for SPDIF output support\n");
  }

  if (chain_next(node_start) != node_end)
  {
    pos += sprintf(buf + pos, "\nDecoding chain:\n");
    pos += chain_text(buf + pos, buf_size - pos);

    pos += sprintf(buf + pos, "\n\nFilters info (in order of processing):\n\n");
    int node = chain_next(node_start);
    while (node != node_end)
    {
      const char *filter_name = get_name(node);
      if (!filter_name) filter_name = "Unknown filter";
      pos += sprintf(buf + pos, "%s:\n", filter_name);

      switch (node)
      {
      case state_spdif_pt:
        pos += spdifer_pt.get_info(buf + pos, buf_size - pos);
        break;

      case state_decode:
        pos += dec.get_info(buf + pos, buf_size - pos);
        break;

      case state_proc:
      case state_proc_enc:
        pos += proc.get_info(buf + pos, buf_size - pos);
        pos += sprintf(buf + pos, "\n");
        break;

      case state_spdif_enc:
        pos += spdifer_enc.get_info(buf + pos, buf_size - pos);
        break;

      default:
        pos += sprintf(buf + pos, "-\n");
        break;
      }
      pos += sprintf(buf + pos, "\n");
      node = chain_next(node);
    }
  }

  if (pos + 1 > _len) pos = _len - 1;
  memcpy(_buf, buf, pos + 1);
  _buf[pos] = 0;
  return pos;
}
Example #7
0
	   && (TREE_CODE (TREE_OPERAND (arg, 0)) == VAR_DECL
	       || TREE_CODE (TREE_OPERAND (arg, 0)) == PARM_DECL))
    (*fn) ("%s of read-only reference %qD", string, TREE_OPERAND (arg, 0));
  else if (TREE_CODE (arg) == RESULT_DECL)
    (*fn) ("%s of read-only named return value %qD", string, arg);
  else if (TREE_CODE (arg) == FUNCTION_DECL)
    (*fn) ("%s of function %qD", string, arg);
  else
    (*fn) ("%s of read-only location", string);
}


/* Structure that holds information about declarations whose type was
   incomplete and we could not check whether it was abstract or not.  */

struct pending_abstract_type GTY((chain_next ("%h.next")))
{
  /* Declaration which we are checking for abstractness. It is either
     a DECL node, or an IDENTIFIER_NODE if we do not have a full
     declaration available.  */
  tree decl;

  /* Type which will be checked for abstractness.  */
  tree type;

  /* Position of the declaration. This is only needed for IDENTIFIER_NODEs,
     because DECLs already carry locus information.  */
  location_t locus;

  /* Link to the next element in list.  */
  struct pending_abstract_type* next;
Example #8
0
#include "cpp.h"
#include "trans.h"
#include "trans-types.h"
#include "trans-const.h"

/* Language-dependent contents of an identifier.  */

struct GTY(())
lang_identifier {
  struct tree_identifier common;
};

/* The resulting tree type.  */

union GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
     chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)")))

lang_tree_node {
  union tree_node GTY((tag ("0"),
		       desc ("tree_node_structure (&%h)"))) generic;
  struct lang_identifier GTY((tag ("1"))) identifier;
};

/* Save and restore the variables in this file and elsewhere
   that keep track of the progress of compilation of the current function.
   Used for nested functions.  */

struct GTY(())
language_function {
  /* struct gfc_language_function base; */
  struct binding_level *binding_level;